specify_tp_eiou: Specify destinations for energy industry own use flows into...

View source: R/specify.R

specify_tp_eiouR Documentation

Specify destinations for energy industry own use flows into transformation processes

Description

The extended energy balance data from the IEA includes "Energy industry own use" (EIOU) for many transformation processes. Unfortunately, in some cases the EIOU flows into industries that aren't included in transformation processes. For example, "Electricity" is consumed by "Own use in electricity, CHP and heat plants", which is not a transformation process. We have to make some decisions to ensure that EIOU is routed to actual transformation processes. See details for a list of changes made to the .tidy_iea_df data frame.

Usage

specify_tp_eiou(
  .tidy_iea_df,
  split_own_use_elect_chp_heat_using_shares_of = c("input", "output"),
  route_non_specified_eiou = TRUE,
  route_non_specified_tp = TRUE,
  flow_aggregation_point = "Flow.aggregation.point",
  eiou = "Energy industry own use",
  transformation_processes = "Transformation processes",
  flow = "Flow",
  own_use_elect_chp_heat = "Own use in electricity, CHP and heat plants",
  pumped_storage = "Pumped storage plants",
  nuclear_industry = "Nuclear industry",
  e_dot = "E.dot",
  negzeropos = ".negzeropos",
  main_act_producer_elect = "Main activity producer electricity plants"
)

Arguments

.tidy_iea_df

An IEA data frame whose columns have been renamed by rename_iea_df_cols().

split_own_use_elect_chp_heat_using_shares_of

Indicates whether the input or outputs to Main activity producer plants should be use for splitting the Own use in electricity, chp and heat plants EIOU flow. Default is "input".

route_non_specified_eiou

Boolean stating whether non-specified EIOU flows should be routed to existing industries. Default is TRUE.

route_non_specified_tp

Boolean stating whether non-specified transformation processes flows should be routed to existing industries. Default is TRUE.

flow_aggregation_point

The name of the flow aggregation point column in .tidy_iea_df. Default is "Flow.aggregation.point".

eiou

A string identifying energy industry own use in the flow aggregation point column. Default is "Energy industry own use".

transformation_processes

A string identifying transformation processes in the flow aggregation point column. Default is "Transformation processes".

flow

The name of the flow column in .tidy_iea_df. Default is "Flow".

own_use_elect_chp_heat

A string identifying own use in electricity, CHP and heat plants in the flow column. Default is "Own use in electricity, CHP and heat plants".

pumped_storage

A string identifying pumped storage plants in the flow column. Default is "Pumped storage plants".

nuclear_industry

A string identifying nuclear plants in the flow column. Default is "Nuclear industry".

e_dot

The name of the energy flow column in .tidy_iea_df. Default is "E.dot".

negzeropos

The name of a temporary column created in .tidy_iea_df. Default is ".negzeropos".

main_act_producer_elect

A string identifying main activity producer electricity plants. Default is "Main activity producer electricity plants".

Details

The following changes are made to the .tidy_iea_df data frame:

  1. EIOU classified as own_use_elect_chp_heat is sent to main_act_producer_elect.

  2. EIOU classified as pumped_storage is sent to main_act_producer_elect.

  3. EIOU classified as nuclear_industry is sent to main_act_producer_elect.

  4. EIOU classified as non_spec_energy is sent to nonspecenergy_reclassify.

After the changes are made, reassigned EIOU may double-up pre-existing EIOU. For example, a country may already have "Electricity" EIOU flowing into "Main activity producer electricity plants". It may also have EIOU flowing into "Nuclear industry". When we switch the EIOU flow into "Nuclear industry" into "Main activity producer electricity plants", we now have two rows of electricity EIOU into "Main activity producer electricity plants". To avoid double rows, all like rows are summed before returning.

Value

A modified version of .tidy_iea_df.

Examples

library(dplyr)
load_tidy_iea_df() %>% 
  specify_tp_eiou() %>% 
  filter(Flow.aggregation.point == "Energy industry own use" & 
           Flow == "Main activity producer electricity plants")

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