Specify EIOU Industries and Flows
Matthew Kuperus Heun
2024-12-09
specify.Rmd
Introduction
The IEA extended energy balance data include some Flow
s
that are Energy industry own use
(EIOU), the consumption of
energy by energy-producing industries. This vignette demonstrates how to
deal with the EIOU flows, especially if an analyst is moving toward
performing Physical Supply-Use Table (PSUT) analyses with the IEA data.
In particular, this vignette will identify some of the problems with
using such flows (as they are present in data from the IEA) and how to
use functions in the IEATools
package to prepare for PSUT
analysis.
We’ll use data supplied with this package and accessed by the
load_tidy_iea_df()
function to illustrate.
The IEA approach to Energy Industry Own Use (EIOU) flows
The EIOU flows can be found as shown in the following code. The
Flow
column indicates the industry to which EIOU of type
Product
is flowing.
library(dplyr)
library(IEATools)
library(magrittr)
EIOU_flows <- load_tidy_iea_df() %>%
filter(FlowAggregationPoint == "Energy industry own use")
EIOU_flows %>%
select(Country, Year, Flow, Product)
#> # A tibble: 15 × 4
#> Country Year Flow Product
#> <chr> <dbl> <chr> <chr>
#> 1 GHA 1971 Oil refineries Refinery gas
#> 2 GHA 2000 Oil refineries Refinery gas
#> 3 GHA 1971 Own use in electricity, CHP and heat plants Electricity
#> 4 GHA 2000 Own use in electricity, CHP and heat plants Electricity
#> 5 ZAF 1971 Coal mines Electricity
#> 6 ZAF 2000 Coal mines Electricity
#> 7 ZAF 2000 Oil and gas extraction Electricity
#> 8 ZAF 2000 Coke ovens Electricity
#> 9 ZAF 2000 Oil refineries Gas works gas
#> 10 ZAF 2000 Oil refineries Refinery gas
#> 11 ZAF 1971 Oil refineries Fuel oil
#> 12 ZAF 2000 Oil refineries Electricity
#> 13 ZAF 1971 Own use in electricity, CHP and heat plants Electricity
#> 14 ZAF 2000 Own use in electricity, CHP and heat plants Electricity
#> 15 ZAF 2000 Pumped storage plants Electricity
And EIOU
-consuming industries can be found by the
following code.
EIOU_flows$Flow %>% unique()
#> [1] "Oil refineries"
#> [2] "Own use in electricity, CHP and heat plants"
#> [3] "Coal mines"
#> [4] "Oil and gas extraction"
#> [5] "Coke ovens"
#> [6] "Pumped storage plants"
Note that one of the industries that receives EIOU is
Coal mines (energy)
, but coal is not produced by
Coal mines (energy)
in the IEA data. (The suffix
(energy)
indicates EIOU.) Rather, coal (of various types)
first appears in rows where the Flow
is
Production
.
load_tidy_iea_df() %>%
filter(FlowAggregationPoint == "Total primary energy supply",
Product %in% coal_and_coal_products) %>%
select(Country, FlowAggregationPoint, Flow, Product) %>%
unique()
#> # A tibble: 8 × 4
#> Country FlowAggregationPoint Flow Product
#> <chr> <chr> <chr> <chr>
#> 1 ZAF Total primary energy supply Production Hard coal (if no detail)
#> 2 ZAF Total primary energy supply Production Coking coal
#> 3 ZAF Total primary energy supply Production Other bituminous coal
#> 4 ZAF Total primary energy supply Imports Coking coal
#> 5 ZAF Total primary energy supply Exports Hard coal (if no detail)
#> 6 ZAF Total primary energy supply Exports Coking coal
#> 7 ZAF Total primary energy supply Exports Other bituminous coal
#> 8 ZAF Total primary energy supply Stock changes Other bituminous coal
Problems with the IEA approach to EIOU
There are two problems with the IEA’s approach to energy industry own use (EIOU).
- Assigning all originating flows to
Production
(as the IEA does) means that some EIOU is routed to an industry that does not produce anything. In the example above,Electricity
is routed toCoal mines (energy)
, but coal is produced byProduction
. - Furthermore, if all primary energy carriers originate at
Production
, there will be problems with “upstream swims” in an Input-Output analysis: demand for one primary energy carrier will imply proportional demand for all other primary energy carriers.
Solving the problems presented by the IEA’s approach to EIOU
To solve these problems, the following fixed need to be implemented:
- First, generic
Production
Flow
s need to be specified. In the example above,coal_and_coal_product
s should be produced byCoal mines
, not the genericProduction
industry. Likewise,oil_product
s should be produced byOil extraction
, andgas_product
s byNatural gas extraction
. For all other products, the production industry is named asManufacture [of product]
. - Second, the resources matrix formulation needs to be implemented,
meaning that
Production
Flow
s need to come from resources industries, which supply resource-products, that are then used in each of the manufacturing industries (Coal mines
,Oil and gas extraction
, andManufacture [of product]
) for manufacturing the actual products.
The specify_primary_production()
function accomplishes
these tasks.
Specify primary production
(specify_primary_production()
)
By default, the specify_primary_produciton()
function
performs the following actions:
First,
Production
Flow
s for a givenProduct
are duplicated.Second, the first duplicate of
Production
Flow
s for a givenProduct
are replaced by aResource [of Product]
Flow
, which producesProduct [from Resources]
.-
Third, the second duplicate of
Production
Flow
s for a givenProduct
are replaced by a manufacturing industry flow, that takes as input theProduct [from Resources]
supplied by the newResource [of Product]
Flow
, and that supplies as output the actualProduct
. The manufacturing industry is named:-
Coal mines
in the case ofcoal_and_coal_products
; -
Oil extraction
in the case ofoil_products
; -
Natural gas extraction
in the case ofnatural_gas_products
; -
Manufacture [of Product]
for all other products.
-
The code below demonstrates
specify_primary_production()
. Note that the
Resources
Flow
s are tagged as belonging to the
Resources matrix (R
) by the
add_psut_matnames()
function.
Specific_primary_production <- load_tidy_iea_df() %>%
specify_primary_production() %>%
add_psut_matnames()
Specific_primary_production %>%
filter(Flow %in% c("Resources (Coal)", "Resources (Oil and natural gas)")) %>%
select(-Method, -LastStage, -EnergyType, -LedgerSide, -Unit) %>%
as.data.frame()
#> [1] Country Year FlowAggregationPoint
#> [4] Flow Product Edot
#> [7] matnames
#> <0 rows> (or 0-length row.names)
Furthermore, the added flows from the Resource
industries are tagged as Transformation processes
and
belong in the U_feed
and V
matrices. The EIOU
flows are shown to belong in the U_EIOU
matrix.
Specific_primary_production %>%
filter(Flow %in% c("Coal mines", "Oil and gas extraction")) %>%
as.data.frame()
#> Country Method EnergyType LastStage Year LedgerSide FlowAggregationPoint
#> 1 ZAF PCM E Final 1971 Supply Energy industry own use
#> 2 ZAF PCM E Final 1971 Supply Transformation processes
#> 3 ZAF PCM E Final 1971 Supply Transformation processes
#> 4 ZAF PCM E Final 2000 Supply Energy industry own use
#> 5 ZAF PCM E Final 2000 Supply Energy industry own use
#> 6 ZAF PCM E Final 2000 Supply Transformation processes
#> 7 ZAF PCM E Final 2000 Supply Transformation processes
#> 8 ZAF PCM E Final 2000 Supply Transformation processes
#> 9 ZAF PCM E Final 2000 Supply Transformation processes
#> Flow Product Unit
#> 1 Coal mines Electricity TJ
#> 2 Coal mines Hard coal (if no detail) TJ
#> 3 Coal mines Hard coal (if no detail) [from Resources] TJ
#> 4 Coal mines Electricity TJ
#> 5 Oil and gas extraction Electricity TJ
#> 6 Coal mines Coking coal TJ
#> 7 Coal mines Coking coal [from Resources] TJ
#> 8 Coal mines Other bituminous coal TJ
#> 9 Coal mines Other bituminous coal [from Resources] TJ
#> Edot matnames
#> 1 -2192.40 U_EIOU
#> 2 1384341.60 V
#> 3 -1384341.60 U_feed
#> 4 -9939.60 U_EIOU
#> 5 -3.60 U_EIOU
#> 6 99307.98 V
#> 7 -99307.98 U_feed
#> 8 5214842.61 V
#> 9 -5214842.61 U_feed
Specific_primary_production %>%
filter(FlowAggregationPoint == "Energy industry own use" ) %>%
select(Country, Year, Flow, Product, Edot, matnames) %>%
as.data.frame()
#> Country Year Flow Product
#> 1 GHA 1971 Oil refineries Refinery gas
#> 2 GHA 1971 Own use in electricity, CHP and heat plants Electricity
#> 3 GHA 2000 Oil refineries Refinery gas
#> 4 GHA 2000 Own use in electricity, CHP and heat plants Electricity
#> 5 ZAF 1971 Coal mines Electricity
#> 6 ZAF 1971 Oil refineries Fuel oil
#> 7 ZAF 1971 Own use in electricity, CHP and heat plants Electricity
#> 8 ZAF 2000 Coal mines Electricity
#> 9 ZAF 2000 Coke ovens Electricity
#> 10 ZAF 2000 Oil and gas extraction Electricity
#> 11 ZAF 2000 Oil refineries Electricity
#> 12 ZAF 2000 Oil refineries Gas works gas
#> 13 ZAF 2000 Oil refineries Refinery gas
#> 14 ZAF 2000 Own use in electricity, CHP and heat plants Electricity
#> 15 ZAF 2000 Pumped storage plants Electricity
#> Edot matnames
#> 1 -817.6988 U_EIOU
#> 2 -104.4020 U_EIOU
#> 3 -1106.2991 U_EIOU
#> 4 -158.3992 U_EIOU
#> 5 -2192.4000 U_EIOU
#> 6 -24280.8000 U_EIOU
#> 7 -12787.2000 U_EIOU
#> 8 -9939.6000 U_EIOU
#> 9 -3.6000 U_EIOU
#> 10 -3.6000 U_EIOU
#> 11 -47991.6000 U_EIOU
#> 12 -24.3000 U_EIOU
#> 13 -44059.6000 U_EIOU
#> 14 -44067.6000 U_EIOU
#> 15 -2322.0000 U_EIOU
Convert Production
to Resources
(specify_production_to_resources()
)
The IEA extended energy balances give resource extraction in rows
where the Flow
is “Production
”.
specify_production_to_resources()
changes the
“Production
” string to “Resources (product)
”,
where product
is the name of the energy carrier for this
resource. specify_production_to_resources()
should be
called after specify_primary_production()
, which
adjusts for energy industry own use of some primary energy producing
industries. If this function is called first, energy industry own use
will not be accounted correctly.
load_tidy_iea_df() %>%
specify_primary_production() %>%
specify_production_to_resources() %>%
filter(startsWith(Flow, "Resources")) %>%
glimpse()
#> Rows: 15
#> Columns: 11
#> $ Country <chr> "GHA", "GHA", "GHA", "GHA", "ZAF", "ZAF", "ZAF", …
#> $ Method <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", …
#> $ EnergyType <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",…
#> $ LastStage <chr> "Final", "Final", "Final", "Final", "Final", "Fin…
#> $ Year <dbl> 1971, 1971, 2000, 2000, 1971, 1971, 1971, 2000, 2…
#> $ LedgerSide <chr> "Supply", "Supply", "Supply", "Supply", "Supply",…
#> $ FlowAggregationPoint <chr> "Total primary energy supply", "Total primary ene…
#> $ Flow <chr> "Resources [of Hydro]", "Resources [of Primary so…
#> $ Product <chr> "Hydro [from Resources]", "Primary solid biofuels…
#> $ Unit <chr> "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "…
#> $ Edot <dbl> 10472.40, 87400.00, 23792.40, 162909.00, 1384341.…
Be more specific about interface industries
(specify_interface_industries()
)
An interface industry is one that moves energy carriers into or out
of a country. When Flow
is any of the interface industries,
we need to be more specific. If we don’t separate these
Flow
s by Product
, we run into trouble in the
PSUT framework:
- upstream swims will result in all
Product
s being produced even if only one is needed and - embodied energy calculations will result in many types of energy being embodied, even if only one should be.
To solve these problems, specify_interface_industries()
adds a suffix (Product)
to each of these interface
industries.
Note that “Production
” Flow
s also needs to
be specified, but that is accomplished in the
specify_primary_production()
and
specify_production_to_resources()
functions.
load_tidy_iea_df() %>%
specify_interface_industries() %>%
filter(starts_with_any_of(Flow, IEATools::interface_industries)) %>%
glimpse()
#> Rows: 69
#> Columns: 11
#> $ Country <chr> "GHA", "GHA", "GHA", "GHA", "GHA", "GHA", "GHA", …
#> $ Method <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", …
#> $ EnergyType <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",…
#> $ LastStage <chr> "Final", "Final", "Final", "Final", "Final", "Fin…
#> $ Year <dbl> 1971, 2000, 2000, 2000, 1971, 2000, 1971, 2000, 1…
#> $ LedgerSide <chr> "Supply", "Supply", "Supply", "Supply", "Supply",…
#> $ FlowAggregationPoint <chr> "Total primary energy supply", "Total primary ene…
#> $ Flow <chr> "Imports [of Crude oil]", "Imports [of Crude oil]…
#> $ Product <chr> "Crude oil", "Crude oil", "Liquefied petroleum ga…
#> $ Unit <chr> "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "…
#> $ Edot <dbl> 38359.8007, 54769.2683, 1655.4984, 18009.5997, 44…
Be more specific about Transformation process Energy industry own
use (specify_tp_eiou()
)
The extended energy balance data from the IEA present some issues when linking “Energy Industry Own Use” (EIOU) flows to “Transformation processes” flows:
- In some instances the data includes “Energy industry own use” (EIOU) flows for industries that are not described as transformation processes. For instance, the “Nuclear industry” appears as an EIOU flow but does not appear as a transformation process.
- In some other instances the data includes transformation processes for which no “Energy Industry Own Use” flow is reported. For instance, the “Main activity producer electricity plants” is a transformation process, but no EIOU is associated.
The specify_tp_eiou
function enables to deal with these
inconsistencies. Effectively, it is a convenience function that bundles
together several other functions:
gather_producer_autoproducer()
route_pumped_storage()
split_oil_gas_extraction_eiou()
route_own_use_elect_chp_heat()
add_nuclear_industry()
route_non_specified_eiou()
route_non_specified_tp()
Details can be found in the documentation of each function, but essentially they do the following:
- The
gather_producer_autoproducer()
function gathers separately the transformation processes “Main activity producer plants” and “Autoproducer plants” for each of three types: electricity, heat, and CHP. - The
route_pumped_storage()
function routes the “Pumped storage plants” EIOU flow to “Main activity producer electricity plants.” - The
route_own_use_elect_chp_heat()
routes the “Own use in electricity, heat and CHP plants” EIOU flow to “Main activity producer electricity plants”, “Main activity producer CHP plants,” and “Main activity producer heat plants.” It does so according to either the input or output shares of each of the industries, depending on the arguments of the function. - The
split_oil_gas_extraction_eiou()
function splits the EIOU of “Oil and gas extraction” in EIOU of “Oil extraction” and EIOU of “Natural gas extraction”, by using the shares of production of each of these industries, meaning that the ratio EIOU to output is the same for “Oil extraction” and “Natural gas extraction”. - The
add_nuclear_industry()
function adds a nuclear industry in transformation processes, and modifies each of the “Main activity producer electricity plants” and “Main activity producer CHP plants” according to their inputs of nuclear fuel as reported by the IEA. - The
route_non_specified_eiou()
function routes the “Non-specified” EIOU flow to the different EIOU industries. It performs the split according to the shares of use of EIOU of all EIOU industries (excluding the non-specified one). - The
route_non_specified_tp()
function routes the “Non-specified” transformation processes flows to the different transformation processes industries. It performs the split according to the shares of use and supply of each product, by each transformation process industry (excluding the non-specified one).
The following two pieces of code are therefore equivalent:
load_tidy_iea_df() %>%
specify_tp_eiou() %>%
glimpse()
#> Rows: 398
#> Columns: 11
#> $ Country <chr> "GHA", "GHA", "GHA", "GHA", "GHA", "GHA", "GHA", …
#> $ Method <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", …
#> $ EnergyType <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",…
#> $ LastStage <chr> "Final", "Final", "Final", "Final", "Final", "Fin…
#> $ Year <dbl> 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1…
#> $ LedgerSide <chr> "Consumption", "Consumption", "Consumption", "Con…
#> $ FlowAggregationPoint <chr> "Industry", "Industry", "Industry", "Industry", "…
#> $ Flow <chr> "Industry not elsewhere specified", "Industry not…
#> $ Product <chr> "Electricity", "Fuel oil", "Gas/diesel oil excl. …
#> $ Unit <chr> "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "…
#> $ Edot <dbl> 918.0020, 3698.4014, 1645.3998, 6100.0001, 698.40…
load_tidy_iea_df() %>%
gather_producer_autoproducer() %>%
route_pumped_storage() %>%
split_oil_gas_extraction_eiou() %>%
route_own_use_elect_chp_heat() %>%
add_nuclear_industry() %>%
route_non_specified_eiou() %>%
route_non_specified_tp() %>%
glimpse()
#> Rows: 398
#> Columns: 11
#> $ Country <chr> "GHA", "GHA", "GHA", "GHA", "GHA", "GHA", "GHA", …
#> $ Method <chr> "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", "PCM", …
#> $ EnergyType <chr> "E", "E", "E", "E", "E", "E", "E", "E", "E", "E",…
#> $ LastStage <chr> "Final", "Final", "Final", "Final", "Final", "Fin…
#> $ Year <dbl> 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1971, 1…
#> $ LedgerSide <chr> "Consumption", "Consumption", "Consumption", "Con…
#> $ FlowAggregationPoint <chr> "Industry", "Industry", "Industry", "Industry", "…
#> $ Flow <chr> "Industry not elsewhere specified", "Industry not…
#> $ Product <chr> "Electricity", "Fuel oil", "Gas/diesel oil excl. …
#> $ Unit <chr> "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "TJ", "…
#> $ Edot <dbl> 918.0020, 3698.4014, 1645.3998, 6100.0001, 698.40…
Identify Transformation process sinks and sources
(tp_sinks_sources()
)
In the IEA extended energy balance data, transformation processes (tp) ought to both consume and produce energy. But some transformation processes consume energy without producing any energy; others produce without consuming. Such transformation processes can be called “transformation sinks” and “transformation sources,” respectively. This function finds and identifies transformation processes that act as sinks or sources.
It is important to identify transformation sinks, because they cause two problems for physical supply-use table (PSUT) analysis. First, when swimming upstream, a PSUT analysis cannot “see” the sunk energy carriers, because they have no downstream effects. Thus, upstream swims cannot conserve energy. Second, when calculating embodied energy for each downstream energy carrier, the sunk energy carriers cannot be embodied in any final demand energy carriers. Thus, embodied energy calculations cannot conserve energy.
Transformation sources can also cause problems for physical supply-use table (PSUT) analysis. In particular, when swimming upstream, a PSUT analysis will “see” the final energy sources, but cannot see any associated primary energy carriers.
Transformation sinks and sources are identified by the following algorithm:
- Identify (per group in
.tidy_iea_df
) allTransformation processes
that consume energy (negative value forEdot
). Energy consumption can be for the transformation process itself or for Energy industry own use. - Identify (per group in
.tidy_iea_df
) allTransformation processes
that produce energy (positive value forEdot
). - Take the set difference between the two (consumers less producers for sinks and producers less consumers for sources). The set difference is the list of transformation sinks or sources, respectively.
tp_sinks_sources()
is a function not unlike
dplyr::summarise()
; it returns a summary containing
grouping variables and industries that are transformation sinks or
sources. The various specify_*()
functions should also be
called before calling [tp_sinks_sources()]. The
specify_*()
functions clean up the IEA data, ensuring that
energy is routed to the right places.
Note that this function only identifies transformation sinks or
sources; it does not fix the problem. To solve the problem of
transformation sinks, see the [tp_sinks_to_nonenergy()] function.
tp_sinks_to_nonenergy()
uses the output of
tp_sinks_sources()
to route energy consumed by
transformation sinks to
Non-energy use industry/transformation/energy
. There is no
function to solve the problem of transformation sources at this
time.
tp_sinks_sources()
returns metadata columns and the
Flow
column. The Flow
column contains
industries that are sinks or sources, depending on the value of the
type
argument.
# The included data sets to not have any transformation process sinks or sources.
# Demonstrate with a made-up data set.
data.frame(Flow = c("Automobiles", "Automobiles", "Furnaces"),
Edot = c(-1, 1, 2),
stringsAsFactors = FALSE) %>%
dplyr::mutate(
Country = "A country",
FlowAggregationPoint = "Transformation processes",
Product = "A product"
) %>%
# Automobiles both consume and produce energy,
# so Automobiles are not reported by tp_sinks_sources.
# However, Furnaces make Product without consuming any energy,
# and are, therefore, a transformation source.
tp_sinks_sources(type = "sources")
#> # A tibble: 1 × 2
#> Country Flow
#> <chr> <chr>
#> 1 A country Furnaces
Convert Transformation process sinks to Non-energy flows
(tp_sinks_to_nonenergy()
)
This function reclassifies energy flowing into transformation process
sinks as non_energy_flow
, by default “Non-energy use in
industry/transformation/energy”. If there was already some Non-energy
use, the new Non-energy use is added to the existing Non-energy use.
tp_sinks_to_nonenergy()
uses the
tp_sinks_sources()
function internally to identify
transformation process sinks.
DF <- data.frame(
Ledger.side = c("Supply", "Supply", "Supply", "Consumption"),
FlowAggregationPoint = c("Transformation processes",
"Transformation processes",
"Transformation processes",
"Non-energy use"),
Flow = c("Automobiles", "Automobiles", "Furnaces",
"Non-energy use industry/transformation/energy"),
Product = c("Petrol", "MD", "Coal", "Coal"),
Edot = c(-1, 1, -2, 8),
stringsAsFactors = FALSE
) %>%
mutate(
Method = "PCM",
LastStage = "Final",
EnergyType = "E",
Country = "Bogus",
Year = 1971
)
DF
#> Ledger.side FlowAggregationPoint
#> 1 Supply Transformation processes
#> 2 Supply Transformation processes
#> 3 Supply Transformation processes
#> 4 Consumption Non-energy use
#> Flow Product Edot Method LastStage
#> 1 Automobiles Petrol -1 PCM Final
#> 2 Automobiles MD 1 PCM Final
#> 3 Furnaces Coal -2 PCM Final
#> 4 Non-energy use industry/transformation/energy Coal 8 PCM Final
#> EnergyType Country Year
#> 1 E Bogus 1971
#> 2 E Bogus 1971
#> 3 E Bogus 1971
#> 4 E Bogus 1971
# In this example, Furnaces are a transformation process sink:
# they consume Coal but produce nothing.
# There are already 8 units of Coal consumption for Non-energy uses.
# The 2 units of Coal are added to the existing 8 units
# Non-energy consumption to make 10 units of Non-energy consumption.
DF %>%
tp_sinks_to_nonenergy() %>%
as.data.frame()
#> Ledger.side FlowAggregationPoint
#> 1 Supply Transformation processes
#> 2 Supply Transformation processes
#> 3 Consumption Non-energy use
#> 4 Supply Non-energy use
#> Flow Product Edot Method LastStage
#> 1 Automobiles Petrol -1 PCM Final
#> 2 Automobiles MD 1 PCM Final
#> 3 Non-energy use industry/transformation/energy Coal 8 PCM Final
#> 4 Non-energy use industry/transformation/energy Coal 2 PCM Final
#> EnergyType Country Year LedgerSide
#> 1 E Bogus 1971 <NA>
#> 2 E Bogus 1971 <NA>
#> 3 E Bogus 1971 <NA>
#> 4 E Bogus 1971 Consumption
Put it all together (specify_all()
)
specify_all()
is a convenience function that bundles
several others:
specify_primary_production()
specify_production_to_resources()
specify_tp_eiou()
specify_interface_industries()
tp_sinks_to_nonenergy()
Each bundled function is called in turn using default arguments.
Simple <- load_tidy_iea_df() %>%
specify_all()
Complicated <- load_tidy_iea_df() %>%
specify_primary_production() %>%
specify_production_to_resources() %>%
specify_tp_eiou() %>%
specify_interface_industries() %>%
tp_sinks_to_nonenergy()
all(Simple == Complicated)
#> [1] FALSE
Conclusion
This vignette demonstrated how to specify details of primary and transformation process flows. The next step could be to prepare the IEA data for use within the PSUT framework. For details, see the Prep PSUT vignette.