carriers and the IPCC 2006 fuel defaultsR/shipped-scales.R
shipped_scales.Rdnestedscales ships one scale definition, carriers, under
inst/scales/, and the IPCC tables it draws on under inst/extdata/.
read_scale("carriers") reads the scale; scale_catalog() lists it
with every other registered definition.
energypal carriers.yml; IPCC (2006), 2006 IPCC Guidelines for
National Greenhouse Gas Inventories, Volume 2 (Energy), Chapter 1,
Tables 1.2 and 1.4, https://www.ipcc-nggip.iges.or.jp/public/2006gl/.
Transcribed in data-raw/ipcc2006/.
A scale of 71 fuels in three nested frames,
group (8) > carrier (17) > fuel (71), key fuel, taken from the
carriers palette of the energypal package (its
inst/extdata/palettes/carriers.yml, which cites the IPCC 2006
Guidelines and the IEA World Energy Balances for its classification).
energypal remains the editable source of the names, hierarchy, labels
and aliases; the definition is a snapshot built by data-raw/carriers.R,
which stops when the two disagree.
The three carriers energypal declares without subtypes (Electricity,
Heat, Other) become their own fuel, so every carrier is reachable
from the atoms. Five names appear both as a group and as the carrier
inside it (Nuclear, Electricity, Heat, Storage, Other), and
Hydrogen is both a carrier (under Synthetic) and a fuel (under
Storage): every lookup names its frame.
Attributes (source "IPCC2006", 26 rows): the default net calorific
value lhv (kind property, GJ/t) and CO2 emission factor ef_co2
(kind factor, kg/TJ) of the IPCC 2006 Guidelines, Vol. 2 Ch. 1,
Tables 1.2 and 1.4, attached to the 13 fuels whose definition matches an
IPCC fuel exactly. Fuels without a matching IPCC entry carry no value;
scale_attributes() reports them as NA rather than inventing one.
Aliases (136 rows): energypal's alternative spellings (source
"energypal") and a set of model commodity codes such as GAS, LIG,
ELC (source "commodity"). scale_match() resolves them.
meta$labels carries energypal's short and long labels per member;
meta$energypal_version and meta$palette_version record the snapshot.
Colours are not stored: join them from energypal by name.
system.file("extdata", "ipcc2006_fuel_defaults.csv", package = "nestedscales") holds every row of Table 1.2 (default net calorific
values, TJ/Gg, with the lower and upper limits of the 95% confidence
interval) and Table 1.4 (default CO2 emission factors for combustion,
kg/TJ, with the 95% interval) of the IPCC 2006 Guidelines, Vol. 2
(Energy), Chapter 1, in long form, together with how each IPCC fuel maps
onto carriers. TJ/Gg is numerically identical to GJ/t, the unit the
lhv attribute uses. One row per IPCC fuel and attribute:
ipcc_fuelThe fuel's English description in the Guidelines.
attribute"lhv" (Table 1.2) or "ef_co2" (Table 1.4).
kind"property" or "factor", see SCALE_ATTRIBUTE_KINDS.
value, lower, upperThe default and its 95% interval.
unit_of_measure"GJ/t" or "kg/TJ".
table"1.2" or "1.4".
source"IPCC2006".
frame, unitThe carriers member the row maps to (NA
when not mapped).
mapping_status"mapped" (an exact or definitional
correspondence), "review" (a plausible correspondence awaiting a
ruling; not attached) or "unmapped" (no counterpart).
primaryWhether this IPCC fuel is the one carriers carries
for that member. Only mapped rows with primary = TRUE enter the
scale's attributes.
carriers <- read_scale("carriers")
carriers
#> NestedScale: carriers
#> Description: Energy carriers: fuels and energy vectors with subtypes, from energypal's carriers palette (IPCC 2006 / IEA classifications)
#> Frames (3, coarsest first):
#> - group (8)
#> - carrier (17)
#> - fuel (71)
#> Atoms: 71
#> Attributes: lhv, ef_co2 (sources: IPCC2006) -- 26 at fuel
#> Aliases: 136 (energypal, commodity)
#> Source: energypal carriers.yml
scale_units(carriers, "carrier")
#> [1] "FossilCoal" "FossilOil" "FossilGas"
#> [4] "Bioenergy" "Hydro" "Wind"
#> [7] "Solar" "Geothermal" "OtherRenewables"
#> [10] "Nuclear" "Electricity" "Heat"
#> [13] "Hydrogen" "HydrogenDerivatives" "SyntheticFuels"
#> [16] "Storage" "Other"
scale_attributes(carriers, "lhv", frame = "fuel")
#> frame unit attribute kind value lower upper
#> 1 fuel Anthracite lhv property 26.7 21.6 32.2
#> 2 fuel Bituminous lhv property 25.8 19.9 30.5
#> 3 fuel SubBituminous lhv property 18.9 11.5 26.0
#> 4 fuel Lignite lhv property 11.9 5.5 21.6
#> 5 fuel Coke lhv property 28.2 25.1 30.2
#> 6 fuel OtherFossilCoal lhv <NA> NA NA NA
#> 7 fuel Crude lhv property 42.3 40.1 44.8
#> 8 fuel ResidualFuelOil lhv property 40.4 39.8 41.7
#> 9 fuel DistillateFuelOil lhv property 43.0 41.4 43.3
#> 10 fuel MotorGasoline lhv property 44.3 42.5 44.8
#> 11 fuel JetFuel lhv property 44.1 42.0 45.0
#> 12 fuel LPG_NGL lhv property 47.3 44.8 52.2
#> 13 fuel OtherFossilOil lhv <NA> NA NA NA
#> 14 fuel NaturalGas lhv property 48.0 46.5 50.4
#> 15 fuel ShaleGas lhv <NA> NA NA NA
#> 16 fuel TightGas lhv <NA> NA NA NA
#> 17 fuel LNG lhv <NA> NA NA NA
#> 18 fuel AssociatedGas lhv <NA> NA NA NA
#> 19 fuel OtherFossilGas lhv <NA> NA NA NA
#> 20 fuel SolidBiomass lhv <NA> NA NA NA
#> 21 fuel Biogas lhv <NA> NA NA NA
#> 22 fuel Ethanol lhv <NA> NA NA NA
#> 23 fuel Biodiesel lhv property 27.0 13.6 54.0
#> 24 fuel Waste lhv <NA> NA NA NA
#> 25 fuel OtherBioenergy lhv <NA> NA NA NA
#> 26 fuel LargeHydro lhv <NA> NA NA NA
#> 27 fuel SmallHydro lhv <NA> NA NA NA
#> 28 fuel RunOfRiver lhv <NA> NA NA NA
#> 29 fuel PumpedStorage lhv <NA> NA NA NA
#> 30 fuel OtherHydro lhv <NA> NA NA NA
#> 31 fuel Onshore lhv <NA> NA NA NA
#> 32 fuel Offshore lhv <NA> NA NA NA
#> 33 fuel OtherWind lhv <NA> NA NA NA
#> 34 fuel SolarPV lhv <NA> NA NA NA
#> 35 fuel CSP lhv <NA> NA NA NA
#> 36 fuel SolarThermal lhv <NA> NA NA NA
#> 37 fuel OtherSolar lhv <NA> NA NA NA
#> 38 fuel Hydrothermal lhv <NA> NA NA NA
#> 39 fuel EGS lhv <NA> NA NA NA
#> 40 fuel OtherGeothermal lhv <NA> NA NA NA
#> 41 fuel Wave lhv <NA> NA NA NA
#> 42 fuel Tidal lhv <NA> NA NA NA
#> 43 fuel OceanThermal lhv <NA> NA NA NA
#> 44 fuel OtherOtherRenewables lhv <NA> NA NA NA
#> 45 fuel PWR lhv <NA> NA NA NA
#> 46 fuel BWR lhv <NA> NA NA NA
#> 47 fuel SMR lhv <NA> NA NA NA
#> 48 fuel OtherNuclear lhv <NA> NA NA NA
#> 49 fuel Electricity lhv <NA> NA NA NA
#> 50 fuel Heat lhv <NA> NA NA NA
#> 51 fuel GreenHydrogen lhv <NA> NA NA NA
#> 52 fuel BlueHydrogen lhv <NA> NA NA NA
#> 53 fuel GreyHydrogen lhv <NA> NA NA NA
#> 54 fuel PinkHydrogen lhv <NA> NA NA NA
#> 55 fuel TurquoiseHydrogen lhv <NA> NA NA NA
#> 56 fuel OtherHydrogen lhv <NA> NA NA NA
#> 57 fuel Ammonia lhv <NA> NA NA NA
#> 58 fuel MethanolSynthetic lhv <NA> NA NA NA
#> 59 fuel LOHC lhv <NA> NA NA NA
#> 60 fuel OtherHydrogenDerivatives lhv <NA> NA NA NA
#> 61 fuel eMethane lhv <NA> NA NA NA
#> 62 fuel eMethanol lhv <NA> NA NA NA
#> 63 fuel eDiesel lhv <NA> NA NA NA
#> 64 fuel eJetFuel lhv <NA> NA NA NA
#> 65 fuel FT_Liquids lhv <NA> NA NA NA
#> 66 fuel OtherSyntheticFuels lhv <NA> NA NA NA
#> 67 fuel Hydrogen lhv <NA> NA NA NA
#> 68 fuel Battery lhv <NA> NA NA NA
#> 69 fuel ThermalStorage lhv <NA> NA NA NA
#> 70 fuel OtherStorage lhv <NA> NA NA NA
#> 71 fuel Other lhv <NA> NA NA NA
#> unit_of_measure source note origin_frame
#> 1 GJ/t IPCC2006 Anthracite fuel
#> 2 GJ/t IPCC2006 Other Bituminous Coal fuel
#> 3 GJ/t IPCC2006 Sub-Bituminous Coal fuel
#> 4 GJ/t IPCC2006 Lignite fuel
#> 5 GJ/t IPCC2006 Coke Oven Coke and Lignite Coke fuel
#> 6 <NA> <NA> <NA> <NA>
#> 7 GJ/t IPCC2006 Crude Oil fuel
#> 8 GJ/t IPCC2006 Residual Fuel Oil fuel
#> 9 GJ/t IPCC2006 Gas/Diesel Oil fuel
#> 10 GJ/t IPCC2006 Motor Gasoline fuel
#> 11 GJ/t IPCC2006 Jet Kerosene fuel
#> 12 GJ/t IPCC2006 Liquefied Petroleum Gases fuel
#> 13 <NA> <NA> <NA> <NA>
#> 14 GJ/t IPCC2006 Natural Gas fuel
#> 15 <NA> <NA> <NA> <NA>
#> 16 <NA> <NA> <NA> <NA>
#> 17 <NA> <NA> <NA> <NA>
#> 18 <NA> <NA> <NA> <NA>
#> 19 <NA> <NA> <NA> <NA>
#> 20 <NA> <NA> <NA> <NA>
#> 21 <NA> <NA> <NA> <NA>
#> 22 <NA> <NA> <NA> <NA>
#> 23 GJ/t IPCC2006 Biodiesels fuel
#> 24 <NA> <NA> <NA> <NA>
#> 25 <NA> <NA> <NA> <NA>
#> 26 <NA> <NA> <NA> <NA>
#> 27 <NA> <NA> <NA> <NA>
#> 28 <NA> <NA> <NA> <NA>
#> 29 <NA> <NA> <NA> <NA>
#> 30 <NA> <NA> <NA> <NA>
#> 31 <NA> <NA> <NA> <NA>
#> 32 <NA> <NA> <NA> <NA>
#> 33 <NA> <NA> <NA> <NA>
#> 34 <NA> <NA> <NA> <NA>
#> 35 <NA> <NA> <NA> <NA>
#> 36 <NA> <NA> <NA> <NA>
#> 37 <NA> <NA> <NA> <NA>
#> 38 <NA> <NA> <NA> <NA>
#> 39 <NA> <NA> <NA> <NA>
#> 40 <NA> <NA> <NA> <NA>
#> 41 <NA> <NA> <NA> <NA>
#> 42 <NA> <NA> <NA> <NA>
#> 43 <NA> <NA> <NA> <NA>
#> 44 <NA> <NA> <NA> <NA>
#> 45 <NA> <NA> <NA> <NA>
#> 46 <NA> <NA> <NA> <NA>
#> 47 <NA> <NA> <NA> <NA>
#> 48 <NA> <NA> <NA> <NA>
#> 49 <NA> <NA> <NA> <NA>
#> 50 <NA> <NA> <NA> <NA>
#> 51 <NA> <NA> <NA> <NA>
#> 52 <NA> <NA> <NA> <NA>
#> 53 <NA> <NA> <NA> <NA>
#> 54 <NA> <NA> <NA> <NA>
#> 55 <NA> <NA> <NA> <NA>
#> 56 <NA> <NA> <NA> <NA>
#> 57 <NA> <NA> <NA> <NA>
#> 58 <NA> <NA> <NA> <NA>
#> 59 <NA> <NA> <NA> <NA>
#> 60 <NA> <NA> <NA> <NA>
#> 61 <NA> <NA> <NA> <NA>
#> 62 <NA> <NA> <NA> <NA>
#> 63 <NA> <NA> <NA> <NA>
#> 64 <NA> <NA> <NA> <NA>
#> 65 <NA> <NA> <NA> <NA>
#> 66 <NA> <NA> <NA> <NA>
#> 67 <NA> <NA> <NA> <NA>
#> 68 <NA> <NA> <NA> <NA>
#> 69 <NA> <NA> <NA> <NA>
#> 70 <NA> <NA> <NA> <NA>
#> 71 <NA> <NA> <NA> <NA>
#> origin_unit
#> 1 Anthracite
#> 2 Bituminous
#> 3 SubBituminous
#> 4 Lignite
#> 5 Coke
#> 6 <NA>
#> 7 Crude
#> 8 ResidualFuelOil
#> 9 DistillateFuelOil
#> 10 MotorGasoline
#> 11 JetFuel
#> 12 LPG_NGL
#> 13 <NA>
#> 14 NaturalGas
#> 15 <NA>
#> 16 <NA>
#> 17 <NA>
#> 18 <NA>
#> 19 <NA>
#> 20 <NA>
#> 21 <NA>
#> 22 <NA>
#> 23 Biodiesel
#> 24 <NA>
#> 25 <NA>
#> 26 <NA>
#> 27 <NA>
#> 28 <NA>
#> 29 <NA>
#> 30 <NA>
#> 31 <NA>
#> 32 <NA>
#> 33 <NA>
#> 34 <NA>
#> 35 <NA>
#> 36 <NA>
#> 37 <NA>
#> 38 <NA>
#> 39 <NA>
#> 40 <NA>
#> 41 <NA>
#> 42 <NA>
#> 43 <NA>
#> 44 <NA>
#> 45 <NA>
#> 46 <NA>
#> 47 <NA>
#> 48 <NA>
#> 49 <NA>
#> 50 <NA>
#> 51 <NA>
#> 52 <NA>
#> 53 <NA>
#> 54 <NA>
#> 55 <NA>
#> 56 <NA>
#> 57 <NA>
#> 58 <NA>
#> 59 <NA>
#> 60 <NA>
#> 61 <NA>
#> 62 <NA>
#> 63 <NA>
#> 64 <NA>
#> 65 <NA>
#> 66 <NA>
#> 67 <NA>
#> 68 <NA>
#> 69 <NA>
#> 70 <NA>
#> 71 <NA>
scale_match(carriers, c("GAS", "LIG", "Hydrogen"))
#> label frame unit method candidates
#> 1 GAS carrier FossilGas alias <NA>
#> 2 LIG fuel Lignite alias <NA>
#> 3 Hydrogen <NA> <NA> ambiguous carrier/Hydrogen; fuel/Hydrogen
ipcc <- read.csv(system.file("extdata", "ipcc2006_fuel_defaults.csv",
package = "nestedscales"))
table(ipcc$attribute, ipcc$mapping_status)
#>
#> mapped review unmapped
#> ef_co2 16 15 22
#> lhv 16 15 22