calc_global_production_by_product: Calculates global production by product

View source: R/transform_helpers.R

calc_global_production_by_productR Documentation

Calculates global production by product

Description

This function calculates global production by product. Included flows are flows belonging to either the R or V matrices, excluding import flows.

Usage

calc_global_production_by_product(
  .tidy_iea_df,
  country = IEATools::iea_cols$country,
  ledger_side = IEATools::iea_cols$ledger_side,
  flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
  flow = IEATools::iea_cols$flow,
  e_dot = IEATools::iea_cols$e_dot,
  matnames = IEATools::mat_meta_cols$matnames,
  V_matrix = IEATools::psut_cols$V,
  R_matrix = IEATools::psut_cols$R,
  imports = IEATools::interface_industries$imports,
  Global_Production_By_Product = "Global_Production_By_Product"
)

Arguments

.tidy_iea_df

The .tidy_iea_df for which global production needs to be calculated.

country, ledger_side, flow_aggregation_point, flow, e_dot

See IEATools::iea_cols.

matnames

The column name for matrices names. Default is IEATools::mat_meta_cols$matnames.

V_matrix

The name of the V matrix. Default is IEATools::psut_cols$V.

R_matrix

The name of the R matrix. Default is IEATools::psut_cols$R.

imports

The name of imports flows in the .tidy_iea_df. Default is IEATools::interface_industries$imports.

Global_Production_By_Product

The name of the new column returning global production by product.

Details

Note: the function needs to have a column indicating matrix names added first, most likely using the IEATools::add_psut_matnames() function.

Value

A data frame representing global production by product, for each year.

Examples

tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
calc_global_production_by_product() %>%
print()

earamendia/ECCTools documentation built on May 12, 2023, 2:12 a.m.