specify_interface_industries: Specify interface industries

View source: R/specify.R

specify_interface_industriesR Documentation

Specify interface industries

Description

An interface industry is one that moves energy carriers into or out of a country. When flow is any of the interface industries, we need to be more specific. If we don't separate these flows by product, we run into trouble with upstream swims (e.g., all products are produced even if only one is needed) and embodied energy calculations (many types of energy are embodied, even if only one should be). This function adds a suffix "[of Product]" to each of these interface industries.

Usage

specify_interface_industries(
  .tidy_iea_df,
  flow = IEATools::iea_cols$flow,
  int_industries = c(IEATools::interface_industries, IEATools::tpes_flows$resources,
    manufacture = "Manufacture"),
  product = IEATools::iea_cols$product,
  flow_notation = RCLabels::of_notation,
  product_notation = RCLabels::bracket_notation
)

Arguments

.tidy_iea_df

A tidy data frame containing IEA extended energy balance data.

flow

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

int_industries

A string vector of industries involved in exchanges with other countries, bunkers, or stock changes. Default is c(IEATools::interface_industries, IEATools::tpes_flows$resources, manufacture = "Manufacture").

product

The name of the product column in .tidy_iea_df. Default is "Product".

flow_notation

The notation for the flow column. Default is RCLabels::of_notation.

product_notation

The notation for the product column. Default is RCLabels::bracket_notation, meaning that any type of "X [from Resources]" or "X [to Y]" will be parsed correctly for its prefix.

Details

Note that "Production" also needs to be specified, but that is accomplished in the specify_primary_production() and specify_production_to_resources() functions.

Resource flows and manufacture flows are included by default, because they need a place where they are specified, too.

Value

A modified version of .tidy_iea_df with specified interface industries.

Examples

load_tidy_iea_df() %>% 
  specify_interface_industries()

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