tp_sinks_to_nonenergy: Reassign Transformation process sinks to Non-energy use

View source: R/specify.R

tp_sinks_to_nonenergyR Documentation

Reassign Transformation process sinks to Non-energy use

Description

Transformation processes that consume energy without producing any energy are called "transformation process sinks". See tp_sinks_sources() for information about why transformation process sinks are problematic. This function reclassifies energy flowing into transformation process sinks as non_energy_flow, by default "Non-energy use in industry/transformation/energy".

Usage

tp_sinks_to_nonenergy(
  .tidy_iea_df,
  ledger_side = "Ledger.side",
  consumption = "Consumption",
  flow_aggregation_point = "Flow.aggregation.point",
  non_energy_flow_agg_point = "Non-energy use",
  transformation_processes = "Transformation processes",
  eiou = "Energy industry own use",
  flow = "Flow",
  non_energy_flow = "Non-energy use industry/transformation/energy",
  product = "Product",
  e_dot = "E.dot"
)

Arguments

.tidy_iea_df

a tidy data frame containing IEA extended energy balance data

ledger_side

the name of the ledger side column in .tidy_iea_df. Default is "Ledger.side".

consumption

a string identifying the consumption side of the ledger. Default is "Consumption".

flow_aggregation_point

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

non_energy_flow_agg_point

the name of the aggregation point where transformation process sinks will be reassigned. Default is "⁠Non-energy use⁠".

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".

non_energy_flow

a sting identifying non-energy flows. Default is "⁠Non-energy use industry/transformation/energy⁠".

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 "E.dot".

Value

.tidy_iea_df with energy sunk in Transformation processes sinks reassigned to Non-energy use

Examples

library(dplyr)
DF <- data.frame(
  Ledger.side = c("Supply", "Supply", "Supply", "Consumption"),
  Flow.aggregation.point = c("Transformation processes", 
                             "Transformation processes", 
                             "Transformation processes", 
                             "Non-energy use"), 
  Flow = c("Automobiles", "Automobiles", "Furnaces", 
           "Non-energy use industry/transformation/energy"),
  Product = c("Petrol", "MD", "Coal", "Coal"),
  E.dot = c(-1, 1, -2, 8), 
  stringsAsFactors = FALSE
) %>% 
  mutate(
    Method = "PCM", 
    Last.stage = "Final",
    Energy.type = "E",
    Country = "Bogus",
    Year = 1971
  )
DF
DF %>% 
  tp_sinks_to_nonenergy()

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