Find transformation sinks and sources
tp_sinks_sources.Rd
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.
Usage
tp_sinks_sources(
.tidy_iea_df,
type = c("sinks", "sources"),
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
transformation_processes = IEATools::tfc_compare_flows$transformation_processes,
eiou = IEATools::tfc_compare_flows$energy_industry_own_use,
flow = IEATools::iea_cols$flow,
product = IEATools::iea_cols$product,
e_dot = IEATools::iea_cols$e_dot
)
Arguments
- .tidy_iea_df
a tidy data frame containing IEA extended energy balance data
- type
one of "sinks" or "sources"
- flow_aggregation_point
the name of the flow aggregation point column in
.tidy_iea_df
. Default is "Flow.aggregation.point
".- transformation_processes
a string that identifies transformation processes in the
flow_aggregation_point
column. Default is "Transformation processes
".- eiou
a string that identifies energy industry own use in the
flow_aggregation_point
column. Default is "Energy industry own use
".- flow
the name of the flow column in
.tidy_iea_df
. Default is "Flow
".- product
the name of the product column in
.tidy_iea_df
. Default is "Product
".- e_dot
the name of the energy rate column in
.tidy_iea_df
. Default is "Edot
".
Value
The grouping_vars
and the flow
column,
with one row for each industry that is a transformation sink or source.
Industries that are transformation sinks or sources are named in the flow
column.
Details
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.
So be sure to specify (or accept defaults for)
the grouping_vars
argument.
Typical grouping variables are Method
, Last.stage
, Country
, Year
, EnergyType
.
Don't group on Flow.aggregation.point
, because energy from different aggregation points
(Energy industry own use
and Transformation processes
) flows into each machine.
Don't group on Flow
, Product
, or Edot
, either.
If groups are not set,
flow
s will be analyzed together, possibly leading to missed 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.
Examples
library(dplyr)
load_tidy_iea_df() %>%
specify_primary_production() %>%
specify_interface_industries() %>%
specify_tp_eiou() %>%
tp_sinks_sources()
#> # A tibble: 0 × 8
#> # ℹ 8 variables: Country <chr>, Method <chr>, EnergyType <chr>,
#> # LastStage <chr>, Year <dbl>, LedgerSide <chr>, Unit <chr>, Flow <chr>
load_tidy_iea_df() %>%
specify_primary_production() %>%
specify_interface_industries() %>%
specify_tp_eiou() %>%
tp_sinks_sources(type = "sources")
#> # A tibble: 0 × 8
#> # ℹ 8 variables: Country <chr>, Method <chr>, EnergyType <chr>,
#> # LastStage <chr>, Year <dbl>, LedgerSide <chr>, Unit <chr>, Flow <chr>