route_pumped_storage: Route pumped storage to Main activity electricity producer...

View source: R/specify_tp_eiou.R

route_pumped_storageR Documentation

Route pumped storage to Main activity electricity producer plant

Description

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,
  flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
  flow = IEATools::iea_cols$flow,
  e_dot = IEATools::iea_cols$e_dot,
  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,
  negzeropos = ".negzeropos"
)

Arguments

.tidy_iea_df

The .tidy_iea_df which flows need to be specified.

flow_aggregation_point

The name of the flow aggregation point column in the .tidy_iea_df. Default is IEATools::iea_cols$flow_aggregation_point.

flow

The name of the flow column in the .tidy_iea_df. Default is IEATools::iea_cols$flow.

e_dot

The name of the energy column in the .tidy_iea_df. Default is IEATools::iea_cols$flow.

eiou

A string identifying "Energy industry own use" in the flow_aggregation_point column of the .tidy_iea_df. Default is IEATools::aggregation_flows$energy_industry_own_use.

pumped_storage

A string identifying "Pumped storage plants" in the flow column of the .tidy_iea_df. Default is IEATools::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 is IEATools::main_act_plants$main_act_prod_elect_plants.

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()

MatthewHeun/IEATools documentation built on Feb. 6, 2024, 3:29 p.m.