read_aggregation_region_table | R Documentation |
This functions loads a user-defined aggregation table that re-routes each IEA region to a user-defined region. By default, the concordance matrix used re-routes IEA regions to Exiobase regions (for 2019 version of IEA data). See details for more information.
read_aggregation_region_table(
file_path = default_aggregation_region_table_path(2019),
country = IEATools::iea_cols$country,
iea_regions = "IEA_regions",
destination_regions = "Destination_regions"
)
file_path |
The path of the file (xlsx file) to be loaded. The default path leads to an aggregation table converting IEA regions
into Exiobase regions for 2019 IEA data. Using the |
country |
The name of the |
iea_regions |
The name of the column containing IEA regions in the aggregation table. Default is "IEA_regions". |
destination_regions |
The name of the column containing the destination regions. Default is "Destination_regions". |
The aggregation table must have a column that identifies the IEA regions to be re-routed (default is "IEA_regions"),
and a second column that identifies the new regions to IEA regions are re-routed (default is "Destination_regions").
There is no need to include all IEA regions;
those that are not included will be removed when calling the aggregate_regions()
function.
IEA regions that are rerouted to "NA" or to an empty value are also removed when calling the aggregate_regions()
function.
Note that the default IEA to Exiobase mapping are only valid for the time periods relevant to Exiobase (from 1995 onward). Using it for previous years will lead to a situation where the energy consumption of particular countries, like Former Soviet Union or Former Yugoslavia, disappear from the data frame (because they do not correspond to an Exiobase region.
A three column concordance table (as a data frame) mapping the iea_regions
column to a destination_regions
column,
using a country
column (with ISO country IDs) as intermediate, which is added to the loaded aggregation table
within the function.
For those IEA regions that do not match to an ISO code (for instance, "World marine bunkers"),
the full IEA region name is kept in the country
column.
# Returns the default aggregation table for the year 2019
read_aggregation_region_table()
# Returns the default aggregation table for the year 2020
read_aggregation_region_table(file_path = default_aggregation_region_table_path(2020))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.