aggregate_regions | R Documentation |
Takes as input a tidy dataframe, an aggregation table routing IEA regions to destination regions (as a data frame), and aggregates flows per regions following the user-defined aggregation table. The boolean argument 'net_tradeā enables to perform the aggregation by keeping only net imports and/or net exports or by keeping gross imports and exports.
aggregate_regions(
.tidy_iea_df,
aggregation_table = read_aggregation_region_table(),
net_trade = FALSE,
destination_regions = "Destination_regions",
iea_regions = "IEA_regions",
imports = IEATools::interface_industries$imports,
exports = IEATools::interface_industries$exports,
country = IEATools::iea_cols$country,
e_dot = IEATools::iea_cols$e_dot,
flow = IEATools::iea_cols$flow,
year = IEATools::iea_cols$year,
ledger_side = IEATools::iea_cols$ledger_side,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
product = IEATools::iea_cols$product,
etwmb = IEATools::tpes_flows$exports_to_world_marine_bunkers,
etwab = IEATools::tpes_flows$exports_to_world_aviation_bunkers,
.net_imports = "Net_Imports"
)
.tidy_iea_df |
The |
aggregation_table |
An aggregation table that routes the IEA regions ( |
net_trade |
The boolean that defines whether imports and exports by aggregation region should be converted
into net imports / exports or not. Default is |
destination_regions |
The name of the |
iea_regions |
The name of the |
imports |
The name of the |
exports |
The name of the |
country |
The name of the |
e_dot |
The name of the |
flow |
The name of the |
year |
The name of the |
ledger_side |
The name of the |
flow_aggregation_point |
The name of the |
product |
The name of the |
etwmb , etwab |
The string identifiers for exports to world marine and aviation bunkers.
These exports are out of a country and into the "WMBK" or "WABK" countries.
Defaults are |
.net_imports |
The name of the |
A .tidy_iea_df
that contains the data of the input .tidy_iea_df
aggregated by regions as specified in the user-defined
country aggregation table provided.
# Performs the regional aggregation using the default IEA to Exiobase mapping
# for IEA data 2019, using the example `.tidy_iea_df`
# returned by the `load_tidy_iea_df()` function when run without argument.
aggregate_regions(.tidy_iea_df = load_tidy_iea_df())
# Performs the regional aggregation using the default IEA to Exiobase mapping
# for IEA data 2020, using the example `.tidy_iea_df`
# returned by the `load_tidy_iea_df()` function when run without argument.
aggregate_regions(.tidy_iea_df = load_tidy_iea_df(),
aggregation_table = read_aggregation_region_table(
default_aggregation_region_table_path(2020)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.