aggregate_all_permutations: Aggregate across selected categories of quantity flow data,...

View source: R/model-downscale.R

aggregate_all_permutationsR Documentation

Aggregate across selected categories of quantity flow data, looping through all permutations

Description

Inputs are a data frame with model data, and a character vector of ID variables to loop through. All possible permutations of the variables provided are returned in the output, with no redundant categories written out. Returns the intial data frame with permutations appended.

Usage

aggregate_all_permutations(
  input_data,
  collapse_vars = ITEM_IDVARS_WITH_ALLS,
  mode_service_fn = "downscale/aggregations_serv_mode_veh.csv",
  tech_fuel_fn = "downscale/aggregations_tech_fuel_liq.csv",
  ...
)

Arguments

input_data

data table with quantity (flow) variables

collapse_vars

character string indicating the variables (columns) whose values will be collapsed (aggregated) to "All"

Details

The method implemented here assumes that all itemized elements of each variable to add to the total. Any excluded elements will not be part of the reported total, and redundant categories (e.g., gasoline, total liquid fuels) will be double counted.


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