Skip to contents

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
#>   Ledger.side   Flow.aggregation.point
#> 1      Supply Transformation processes
#> 2      Supply Transformation processes
#> 3      Supply Transformation processes
#> 4 Consumption           Non-energy use
#>                                            Flow Product E.dot Method Last.stage
#> 1                                   Automobiles  Petrol    -1    PCM      Final
#> 2                                   Automobiles      MD     1    PCM      Final
#> 3                                      Furnaces    Coal    -2    PCM      Final
#> 4 Non-energy use industry/transformation/energy    Coal     8    PCM      Final
#>   Energy.type Country Year
#> 1           E   Bogus 1971
#> 2           E   Bogus 1971
#> 3           E   Bogus 1971
#> 4           E   Bogus 1971
DF %>% 
  tp_sinks_to_nonenergy()
#>   Ledger.side   Flow.aggregation.point
#> 1      Supply Transformation processes
#> 2      Supply Transformation processes
#> 3 Consumption           Non-energy use
#>                                            Flow Product E.dot Method Last.stage
#> 1                                   Automobiles  Petrol    -1    PCM      Final
#> 2                                   Automobiles      MD     1    PCM      Final
#> 3 Non-energy use industry/transformation/energy    Coal    10    PCM      Final
#>   Energy.type Country Year
#> 1           E   Bogus 1971
#> 2           E   Bogus 1971
#> 3           E   Bogus 1971