specify_production_to_resources: Convert Production Flows to Resource Flows

View source: R/specify.R

specify_production_to_resourcesR Documentation

Convert Production Flows to Resource Flows

Description

The IEA gives resource extraction in rows where the Flow is "Production". This function changes the "Production" string to "⁠Resources [of Product]⁠", where product is the name of the energy carrier for this resource.

Usage

specify_production_to_resources(
  .tidy_iea_df,
  flow = IEATools::iea_cols$flow,
  product = IEATools::iea_cols$product,
  production = IEATools::tpes_flows$production,
  resources = IEATools::tpes_flows$resources,
  notation = RCLabels::from_notation
)

Arguments

.tidy_iea_df

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

flow

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

product

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

production

A string identifying production in the flow column. Default is IEATools::tpes_flows$production.

resources

A string identifying resource industries to be added to .tidy_iea_df. Default is IEATools::tpes_flows$resources.

notation

A list of specification notations. Default is IEATools::bracket_notation.

Details

This function should be called after specify_primary_production(), which adjusts for energy industry own use of some primary energy producing industries. If this function is called first, EIOU will not be accounted correctly.

Value

A .tidy_iea_df with Production changed to ⁠resources .resources_open product .resources_close⁠ in the flow column

Examples

load_tidy_iea_df() %>% 
  specify_primary_production() %>% 
  specify_production_to_resources()

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