exports_to_balancing: Relocates export flows in the Balancing matrix

View source: R/cleans.R

exports_to_balancingR Documentation

Relocates export flows in the Balancing matrix

Description

This function relocates exports to the balancing matrix B. The Balancing matrix is akin to an additional final demand matrix.

Usage

exports_to_balancing(
  .tidy_iea_df,
  flow = IEATools::iea_cols$flow,
  matnames = IEATools::mat_meta_cols$matnames,
  ledger_side = IEATools::iea_cols$ledger_side,
  e_dot = IEATools::iea_cols$e_dot,
  exports = IEATools::interface_industries$exports,
  balancing_matrix = "B"
)

Arguments

.tidy_iea_df

The .tidy_iea_df for which export flows need to be relocated in the Balancing matrix.

flow

See IEATools::iea_cols.

matnames

The column name of the column containing matrices names. Default is IEATools::mat_meta_cols$matnames.

ledger_side

See IEATools::iea_cols.

e_dot

See IEATools::iea_cols.

exports

The string that identifies export flows. Default is IEATools::interface_industries$exports.

balancing_matrix

The name of the Balancing matrix. Default is "B".

Details

See the Balancing matrix vignette for more information. Note: one needs to add the column containing matrices names first, most likely using the IEATools::add_psut_matnames() function.

Value

A .tidy_iea_df with Stock changes flows relocated in the Balancing matrix.

Examples

tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
dplyr::filter(stringr::str_detect(Flow, "Exports")) %>%
exports_to_balancing() %>%
print()

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