aggregate_item_regions: Aggregate country-level quantity flow data to iTEM analysis...

View source: R/model-downscale.R

aggregate_item_regionsR Documentation

Aggregate country-level quantity flow data to iTEM analysis regions

Description

This function takes in a data frame with quantity flow data by ISO code and a mapping from ISO code to iTEM region. It joins in the appropriate iTEM region for each country ISO code, aggregates by these regions, and returns a dataframe.

Usage

aggregate_item_regions(
  downscaled_data,
  item_region_map = load_country_region_mappings()[["item"]],
  compute_global_totals = FALSE,
  ...
)

Arguments

downscaled_data

data frame with downscaled (i.e. country-level) data. Can also include global totals, assigned to iso code "All".

item_region_map

data table mapping from 3-digit ISO code to iTEM region, called from (load_country_region_mappings)

compute_global_totals

logical indicating whether to compute the global totals. The default is FALSE, as it is assumed that this step has been conducted under (aggregate_all_permutations).

Details

The mapping from ISO code to iTEM region is user-specified with a provided default.


transportenergy/item_mip_data_processing documentation built on July 6, 2023, 7:51 p.m.