Route pumped storage to Main activity electricity producer plant
route_pumped_storage.Rd
The function routes Energy industry own use by Pumped storage plants
to Energy industry own use by Main activity producer electricity plants
when the value is negative, as it should be.
However, for Japan, there are a few years where
Energy industry own use by Pumped storage plants is positive.
In those instances, the Flow is changed from
Energy industry own use to
Main activity producer electricity plants and
the Flow.aggregation.point is changed to "Transformation processes"
the positive value is retained.
This approach preserves the overall energy balance.
This approach implicitly assumes that Japan's reported
Energy industry own use for Pumped storage plants
is a net value, not a total value.
All other countries seemingly report total values for
Energy industry own use by Pumped Storage plants,
as those values are all negative.
This function is called within the specify_all()
function.
Usage
route_pumped_storage(
.tidy_iea_df,
specify_renewable_plants = FALSE,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
country = IEATools::iea_cols$country,
method = IEATools::iea_cols$method,
energy_type = IEATools::iea_cols$energy_type,
year = IEATools::iea_cols$year,
last_stage = IEATools::iea_cols$last_stage,
unit = IEATools::iea_cols$unit,
flow = IEATools::iea_cols$flow,
e_dot = IEATools::iea_cols$e_dot,
product = IEATools::iea_cols$product,
eiou = IEATools::aggregation_flows$energy_industry_own_use,
pumped_storage = IEATools::eiou_flows$pumped_storage_plants,
main_act_producer_elect = IEATools::main_act_plants$main_act_prod_elect_plants,
hydro_plants = IEATools::renewable_industries$hydro_plants,
hydro = IEATools::renewable_products$hydro,
negzeropos = ".negzeropos"
)
Arguments
- .tidy_iea_df
The
.tidy_iea_df
which flows need to be specified.- specify_renewable_plants
A boolean indicating whether renewable energy plants should be specified or not. Default is FALSE.
- flow_aggregation_point
The name of the flow aggregation point column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow_aggregation_point
.- country, method, energy_type, last_stage, unit, year, product
See
IEATools::iea_cols
.- flow
The name of the flow column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow
.- e_dot
The name of the energy column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow
.- eiou
A string identifying "Energy industry own use" in the
flow_aggregation_point
column of the.tidy_iea_df
. Default isIEATools::aggregation_flows$energy_industry_own_use
.- pumped_storage
A string identifying "Pumped storage plants" in the
flow
column of the.tidy_iea_df
. Default isIEATools::eiou_flows$pumped_storage_plants
.- main_act_producer_elect
A string identifying "Main activity producer electricity plants" in the
flow
column of the.tidy_iea_df
. Default isIEATools::main_act_plants$main_act_prod_elect_plants
.- hydro_plants
The name of the newly created hydropower industry. Default is
IEATools::renewable_industries$hydro_plants
.- hydro
The name of the "Hydro" product. Default is
IEATools::renewable_products$hydro
.- negzeropos
The name of a temporary column created in
.tidy_iea_df
. Default is ".negzeropos".
Value
A modified .tidy_iea_df
with "Pumped storage plants" industry routed
to the "Main activity producer electricity plant" industry.
Examples
library(dplyr)
load_tidy_iea_df() %>%
gather_producer_autoproducer()
#> # A tibble: 398 × 11
#> Country Method EnergyType LastStage Year LedgerSide FlowAggregationPoint
#> <chr> <chr> <chr> <chr> <dbl> <chr> <chr>
#> 1 GHA PCM E Final 1971 Consumption Industry
#> 2 GHA PCM E Final 1971 Consumption Industry
#> 3 GHA PCM E Final 1971 Consumption Industry
#> 4 GHA PCM E Final 1971 Consumption Industry
#> 5 GHA PCM E Final 1971 Consumption Industry
#> 6 GHA PCM E Final 1971 Consumption Industry
#> 7 GHA PCM E Final 1971 Consumption Industry
#> 8 GHA PCM E Final 1971 Consumption Non-energy use
#> 9 GHA PCM E Final 1971 Consumption Other
#> 10 GHA PCM E Final 1971 Consumption Other
#> # ℹ 388 more rows
#> # ℹ 4 more variables: Flow <chr>, Product <chr>, Unit <chr>, Edot <dbl>