Routes own use in electricity, chp, and heat plants EIOU flow to main activity producer flows
route_own_use_elect_chp_heat.Rd
This function routes the "Own use in electricity, CHP and heat plants"
Energy Industry Own Use flow to each of the three electricity, CHP and heat
main activity producer plants.
The function is called within the specify_all()
function.
Usage
route_own_use_elect_chp_heat(
.tidy_iea_df,
split_using_shares_of = c("input", "output"),
country = IEATools::iea_cols$country,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
flow = IEATools::iea_cols$flow,
ledger_side = IEATools::iea_cols$ledger_side,
method = IEATools::iea_cols$method,
energy_type = IEATools::iea_cols$energy_type,
last_stage = IEATools::iea_cols$last_stage,
year = IEATools::iea_cols$year,
product = IEATools::iea_cols$product,
unit = IEATools::iea_cols$unit,
e_dot = IEATools::iea_cols$e_dot,
supply = IEATools::ledger_sides$supply,
eiou = IEATools::aggregation_flows$energy_industry_own_use,
transformation_processes = IEATools::aggregation_flows$transformation_processes,
own_use_elect_chp_heat = IEATools::eiou_flows$own_use_elect_chp_heat_plants,
main_act_producer_elect = IEATools::main_act_plants$main_act_prod_elect_plants,
main_act_producer_chp = IEATools::main_act_plants$main_act_prod_chp_plants,
main_act_producer_heat = IEATools::main_act_plants$main_act_prod_heat_plants,
n_counting = ".n_counting",
destination_flow = ".destination_flow",
Total_main_activity_From_Func = ".Total_main_activity_From_Func",
Total_per_main_activity_From_Func = ".Total_per_main_activity_From_Func",
Share_per_main_activity_From_Func = ".Share_per_main_activity_From_Func"
)
Arguments
- .tidy_iea_df
The
.tidy_iea_df
which flows need to be specified.A string that identifies which method is to be used for splitting the
own_use_elect_chp_heat
flow. Default is "input". The other valid value is "output". See details for more information.- country
The name of the country column in the
.tidy_iea_df
. Default isIEATools::iea_cols$country
.- flow_aggregation_point
The name of the flow aggregation point column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow_aggregation_point
.- flow
The name of the flow column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow
.- ledger_side
The name of the ledger side column in the
.tidy_iea_df
. Default isIEATools::iea_cols$ledger_side
.- method
The name of the method column in the
.tidy_iea_df
. Default isIEATools::iea_cols$method
.- energy_type
The name of the energy_type column in the
.tidy_iea_df
. Default isIEATools::iea_cols$energy_type
.- last_stage
The name of the last stage column in the
.tidy_iea_df
. Default isIEATools::iea_cols$last_stage
.- year
The name of the year column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow
.- product
The name of the product column in the
.tidy_iea_df
. Default isIEATools::iea_cols$product
.- unit
The name of the unit column in the
.tidy_iea_df
. Default isIEATools::iea_cols$unit
.- e_dot
The name of the energy column in the
.tidy_iea_df
. Default isIEATools::iea_cols$flow
.- supply
A string identifying "Supply" in the
ledger_side
column of the.tidy_iea_df
. Default isIEATools::ledger_sides$supply
.- 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
.- transformation_processes
A string identifying transformation processes in the
flow_aggregation_point
column of the.tidy_iea_df
Default isIEATools::aggregation_flows$flow_aggregation_point
.- own_use_elect_chp_heat
A string identifying "Own use in electricity, CHP and heat plants" in the
flow
column of the.tidy_iea_df
. Default isIEATools::eiou_flows$own_use_elect_chp_heat_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
.- main_act_producer_chp
A string identifying "Main activity producer CHP plants" in the
flow
column of the.tidy_iea_df
. Default isIEATools::main_act_plants$main_act_prod_chp_plants
.- main_act_producer_heat
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_heat_plants
.- n_counting
The name of a temporary column created in
.tidy_iea_df
. Default is ".n_counting".- destination_flow
The name of a temporary column created in
.tidy_iea_df
. Default is ".destination_flow".- Total_main_activity_From_Func
The name of a temporary column created in
.tidy_iea_df
. Default is ".Total_main_activity_From_Func".- Total_per_main_activity_From_Func
The name of a temporary column created in
.tidy_iea_df
. Default is ".Total_per_main_activity_From_Func".The name of a temporary column created in
.tidy_iea_df
. Default is ".Share_per_main_activity_From_Func".
Value
A modified version of the .tidy_iea_df
, in which the own_use_elect_chp_heat
flow has been routed to the main activity producer industries.
Details
The function either performs the routing using the share of outputs or of inputs of each of the three main activity producer industries.
The method is selected using the split_using_shares_of
argument,
to which either the have the "input" or "output" value can be passed.
When none of the main activity producer industries is present in the data frame, the "Own use in electricity, CHP and heat plants" flow is ascribed by default to the "Main activity producer electricity plant".
Examples
library(dplyr)
load_tidy_iea_df() %>%
route_own_use_elect_chp_heat()
#> # A tibble: 403 × 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
#> # ℹ 393 more rows
#> # ℹ 4 more variables: Flow <chr>, Product <chr>, Unit <chr>, Edot <dbl>