Loads region aggregation table
read_aggregation_region_table.Rd
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.
Usage
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"
)
Arguments
- 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
default_aggregation_region_table_path()
function, the user can select the default IEA regions to Exiobase regions aggregation table for a different year.- country
The name of the
country`` column in the aggregation table returned by the data frame. This column contains ISO codes for the
iea_regionscolumn of the aggregation table. Default is
IEATools::iea_cols$country`.- 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".
Value
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.
Details
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.
Examples
# Returns the default aggregation table for the year 2019
read_aggregation_region_table()
#> Country IEA_regions
#> 1 ALB Albania
#> 2 DZA Algeria
#> 3 AGO Angola
#> 4 ARG Argentina
#> 5 ARM Armenia
#> 6 AUS Australia
#> 7 AUT Austria
#> 8 AZE Azerbaijan
#> 9 BHR Bahrain
#> 10 BGD Bangladesh
#> 11 BLR Belarus
#> 12 BEL Belgium
#> 13 BEN Benin
#> 14 Plurinational State of Bolivia Plurinational State of Bolivia
#> 15 Bosnia and Herzegovina Bosnia and Herzegovina
#> 16 BWA Botswana
#> 17 BRA Brazil
#> 18 Brunei Darussalam Brunei Darussalam
#> 19 BGR Bulgaria
#> 20 KHM Cambodia
#> 21 CMR Cameroon
#> 22 CAN Canada
#> 23 CHL Chile
#> 24 CHNM People's Republic of China
#> 25 COL Colombia
#> 26 Republic of the Congo Republic of the Congo
#> 27 CRI Costa Rica
#> 28 Côte d'Ivoire Côte d'Ivoire
#> 29 HRV Croatia
#> 30 CUB Cuba
#> 31 Curaçao/Netherlands Antilles Curaçao/Netherlands Antilles
#> 32 CYP Cyprus
#> 33 Czech Republic Czech Republic
#> 34 Democratic Republic of the Congo Democratic Republic of the Congo
#> 35 DNK Denmark
#> 36 DOM Dominican Republic
#> 37 ECU Ecuador
#> 38 EGY Egypt
#> 39 SLV El Salvador
#> 40 ERI Eritrea
#> 41 EST Estonia
#> 42 ETH Ethiopia
#> 43 FIN Finland
#> 44 FRA France
#> 45 GAB Gabon
#> 46 GEO Georgia
#> 47 DEU Germany
#> 48 GHA Ghana
#> 49 GRC Greece
#> 50 GTM Guatemala
#> 51 HTI Haiti
#> 52 HND Honduras
#> 53 HKG Hong Kong (China)
#> 54 HUN Hungary
#> 55 ISL Iceland
#> 56 IND India
#> 57 IDN Indonesia
#> 58 Islamic Republic of Iran Islamic Republic of Iran
#> 59 IRQ Iraq
#> 60 IRL Ireland
#> 61 ISR Israel
#> 62 ITA Italy
#> 63 JAM Jamaica
#> 64 JPN Japan
#> 65 JOR Jordan
#> 66 KAZ Kazakhstan
#> 67 KEN Kenya
#> 68 Korea Korea
#> 69 Kosovo Kosovo
#> 70 KWT Kuwait
#> 71 KGZ Kyrgyzstan
#> 72 LVA Latvia
#> 73 LBN Lebanon
#> 74 LBY Libya
#> 75 LTU Lithuania
#> 76 LUX Luxembourg
#> 77 MYS Malaysia
#> 78 MLT Malta
#> 79 MUS Mauritius
#> 80 MEX Mexico
#> 81 Republic of Moldova Republic of Moldova
#> 82 MNG Mongolia
#> 83 MNE Montenegro
#> 84 MAR Morocco
#> 85 MOZ Mozambique
#> 86 NAM Namibia
#> 87 NPL Nepal
#> 88 NLD Netherlands
#> 89 NZL New Zealand
#> 90 NIC Nicaragua
#> 91 NER Niger
#> 92 NGA Nigeria
#> 93 Republic of North Macedonia Republic of North Macedonia
#> 94 NOR Norway
#> 95 OMN Oman
#> 96 PAK Pakistan
#> 97 PAN Panama
#> 98 PRY Paraguay
#> 99 PER Peru
#> 100 PHL Philippines
#> 101 POL Poland
#> 102 PRT Portugal
#> 103 QAT Qatar
#> 104 ROU Romania
#> 105 Russian Federation Russian Federation
#> 106 SAU Saudi Arabia
#> 107 SEN Senegal
#> 108 SRB Serbia
#> 109 SGP Singapore
#> 110 Slovak Republic Slovak Republic
#> 111 SVN Slovenia
#> 112 ZAF South Africa
#> 113 ESP Spain
#> 114 LKA Sri Lanka
#> 115 SDN Sudan
#> 116 SUR Suriname
#> 117 SWE Sweden
#> 118 CHE Switzerland
#> 119 Syrian Arab Republic Syrian Arab Republic
#> 120 Chinese Taipei Chinese Taipei
#> 121 TJK Tajikistan
#> 122 United Republic of Tanzania United Republic of Tanzania
#> 123 THA Thailand
#> 124 TGO Togo
#> 125 Trinidad and Tobago Trinidad and Tobago
#> 126 TUN Tunisia
#> 127 TUR Turkey
#> 128 TKM Turkmenistan
#> 129 UKR Ukraine
#> 130 ARE United Arab Emirates
#> 131 GBR United Kingdom
#> 132 USA United States
#> 133 URY Uruguay
#> 134 UZB Uzbekistan
#> 135 Bolivarian Republic of Venezuela Bolivarian Republic of Venezuela
#> 136 Viet Nam Viet Nam
#> 137 YEM Yemen
#> 138 ZMB Zambia
#> 139 ZWE Zimbabwe
#> 140 Other Africa Other Africa
#> 141 Other non-OECD Americas Other non-OECD Americas
#> 142 Other non-OECD Asia Other non-OECD Asia
#> 143 Memo: Greenland Memo: Greenland
#> Destination_regions
#> 1 RoW Europe
#> 2 RoW Africa
#> 3 RoW Africa
#> 4 RoW America
#> 5 RoW Asia and Pacific
#> 6 Australia
#> 7 Austria
#> 8 RoW Asia and Pacific
#> 9 RoW Middle East
#> 10 RoW Asia and Pacific
#> 11 RoW Europe
#> 12 Belgium
#> 13 RoW Africa
#> 14 RoW America
#> 15 RoW Europe
#> 16 RoW Africa
#> 17 Brazil
#> 18 RoW Asia and Pacific
#> 19 Bulgaria
#> 20 RoW Asia and Pacific
#> 21 RoW Africa
#> 22 Canada
#> 23 RoW America
#> 24 China
#> 25 RoW America
#> 26 RoW Africa
#> 27 RoW America
#> 28 RoW Africa
#> 29 Croatia
#> 30 RoW America
#> 31 TESTING
#> 32 Cyprus
#> 33 Czech Republic
#> 34 RoW Africa
#> 35 Denmark
#> 36 RoW America
#> 37 RoW America
#> 38 RoW Middle East
#> 39 RoW America
#> 40 RoW Africa
#> 41 Estonia
#> 42 RoW Africa
#> 43 Finland
#> 44 France
#> 45 RoW Africa
#> 46 RoW Asia and Pacific
#> 47 Germany
#> 48 RoW Africa
#> 49 Greece
#> 50 RoW America
#> 51 RoW America
#> 52 RoW America
#> 53 RoW Asia and Pacific
#> 54 Hungary
#> 55 RoW Europe
#> 56 India
#> 57 Indonesia
#> 58 RoW Middle East
#> 59 RoW Middle East
#> 60 Ireland
#> 61 RoW Middle East
#> 62 Italy
#> 63 RoW America
#> 64 Japan
#> 65 RoW Middle East
#> 66 RoW Asia and Pacific
#> 67 RoW Africa
#> 68 South Korea
#> 69 RoW Europe
#> 70 RoW Middle East
#> 71 RoW Asia and Pacific
#> 72 Latvia
#> 73 RoW Middle East
#> 74 RoW Africa
#> 75 Lithuania
#> 76 Luxembourg
#> 77 RoW Asia and Pacific
#> 78 Malta
#> 79 RoW Africa
#> 80 Mexico
#> 81 RoW Europe
#> 82 RoW Asia and Pacific
#> 83 RoW Europe
#> 84 RoW Africa
#> 85 RoW Africa
#> 86 RoW Africa
#> 87 RoW Asia and Pacific
#> 88 Netherlands
#> 89 RoW Asia and Pacific
#> 90 RoW America
#> 91 RoW Africa
#> 92 RoW Africa
#> 93 RoW Europe
#> 94 Norway
#> 95 RoW Middle East
#> 96 RoW Asia and Pacific
#> 97 RoW America
#> 98 RoW America
#> 99 RoW America
#> 100 RoW Asia and Pacific
#> 101 Poland
#> 102 Portugal
#> 103 RoW Middle East
#> 104 Romania
#> 105 Russian Federation
#> 106 RoW Middle East
#> 107 RoW Africa
#> 108 RoW Europe
#> 109 RoW Asia and Pacific
#> 110 Slovak Republic
#> 111 Slovenia
#> 112 South Africa
#> 113 Spain
#> 114 RoW Asia and Pacific
#> 115 RoW Africa
#> 116 RoW America
#> 117 Sweden
#> 118 Switzerland
#> 119 RoW Middle East
#> 120 Taiwan
#> 121 RoW Asia and Pacific
#> 122 RoW Africa
#> 123 RoW Asia and Pacific
#> 124 RoW Africa
#> 125 RoW America
#> 126 RoW Africa
#> 127 Turkey
#> 128 RoW Asia and Pacific
#> 129 RoW Europe
#> 130 RoW Middle East
#> 131 United Kingdom
#> 132 United States
#> 133 RoW America
#> 134 RoW Asia and Pacific
#> 135 RoW America
#> 136 RoW Asia and Pacific
#> 137 RoW Middle East
#> 138 RoW Africa
#> 139 RoW Africa
#> 140 RoW Africa
#> 141 RoW America
#> 142 RoW Asia and Pacific
#> 143 RoW America
# Returns the default aggregation table for the year 2020
read_aggregation_region_table(file_path = default_aggregation_region_table_path(2020))
#> Country IEA_regions
#> 1 ALB Albania
#> 2 DZA Algeria
#> 3 AGO Angola
#> 4 ARG Argentina
#> 5 ARM Armenia
#> 6 AUS Australia
#> 7 AUT Austria
#> 8 AZE Azerbaijan
#> 9 BHR Bahrain
#> 10 BGD Bangladesh
#> 11 BLR Belarus
#> 12 BEL Belgium
#> 13 BEN Benin
#> 14 Plurinational State of Bolivia Plurinational State of Bolivia
#> 15 Bosnia and Herzegovina Bosnia and Herzegovina
#> 16 BWA Botswana
#> 17 BRA Brazil
#> 18 Brunei Darussalam Brunei Darussalam
#> 19 BGR Bulgaria
#> 20 KHM Cambodia
#> 21 CMR Cameroon
#> 22 CAN Canada
#> 23 CHL Chile
#> 24 CHNM People's Republic of China
#> 25 COL Colombia
#> 26 Republic of the Congo Republic of the Congo
#> 27 CRI Costa Rica
#> 28 Côte d'Ivoire Côte d'Ivoire
#> 29 HRV Croatia
#> 30 CUB Cuba
#> 31 CYP Cyprus
#> 32 Czech Republic Czech Republic
#> 33 Democratic Republic of the Congo Democratic Republic of the Congo
#> 34 DNK Denmark
#> 35 DOM Dominican Republic
#> 36 ECU Ecuador
#> 37 EGY Egypt
#> 38 SLV El Salvador
#> 39 GNQ Equatorial Guinea
#> 40 ERI Eritrea
#> 41 EST Estonia
#> 42 ETH Ethiopia
#> 43 FIN Finland
#> 44 FRA France
#> 45 GAB Gabon
#> 46 GEO Georgia
#> 47 DEU Germany
#> 48 GHA Ghana
#> 49 GRC Greece
#> 50 GTM Guatemala
#> 51 HTI Haiti
#> 52 HND Honduras
#> 53 HKG Hong Kong (China)
#> 54 HUN Hungary
#> 55 ISL Iceland
#> 56 IND India
#> 57 IDN Indonesia
#> 58 Islamic Republic of Iran Islamic Republic of Iran
#> 59 IRQ Iraq
#> 60 IRL Ireland
#> 61 ISR Israel
#> 62 ITA Italy
#> 63 JAM Jamaica
#> 64 JPN Japan
#> 65 JOR Jordan
#> 66 KAZ Kazakhstan
#> 67 KEN Kenya
#> 68 Korea Korea
#> 69 Kosovo Kosovo
#> 70 KWT Kuwait
#> 71 KGZ Kyrgyzstan
#> 72 Leo People’s Democratic Republic Leo People’s Democratic Republic
#> 73 LVA Latvia
#> 74 LBN Lebanon
#> 75 LBY Libya
#> 76 LTU Lithuania
#> 77 LUX Luxembourg
#> 78 MYS Malaysia
#> 79 MLT Malta
#> 80 MUS Mauritius
#> 81 MEX Mexico
#> 82 Republic of Moldova Republic of Moldova
#> 83 MNG Mongolia
#> 84 MNE Montenegro
#> 85 MAR Morocco
#> 86 MOZ Mozambique
#> 87 NAM Namibia
#> 88 NPL Nepal
#> 89 NLD Netherlands
#> 90 NZL New Zealand
#> 91 NIC Nicaragua
#> 92 NER Niger
#> 93 NGA Nigeria
#> 94 Republic of North Macedonia Republic of North Macedonia
#> 95 NOR Norway
#> 96 OMN Oman
#> 97 PAK Pakistan
#> 98 PAN Panama
#> 99 PRY Paraguay
#> 100 PER Peru
#> 101 PHL Philippines
#> 102 POL Poland
#> 103 PRT Portugal
#> 104 QAT Qatar
#> 105 ROU Romania
#> 106 Russian Federation Russian Federation
#> 107 SAU Saudi Arabia
#> 108 SEN Senegal
#> 109 SRB Serbia
#> 110 SGP Singapore
#> 111 Slovak Republic Slovak Republic
#> 112 SVN Slovenia
#> 113 ZAF South Africa
#> 114 ESP Spain
#> 115 LKA Sri Lanka
#> 116 SDN Sudan
#> 117 SUR Suriname
#> 118 SWE Sweden
#> 119 CHE Switzerland
#> 120 Syrian Arab Republic Syrian Arab Republic
#> 121 Chinese Taipei Chinese Taipei
#> 122 TJK Tajikistan
#> 123 United Republic of Tanzania United Republic of Tanzania
#> 124 THA Thailand
#> 125 TGO Togo
#> 126 Trinidad and Tobago Trinidad and Tobago
#> 127 TUN Tunisia
#> 128 TUR Turkey
#> 129 TKM Turkmenistan
#> 130 UKR Ukraine
#> 131 ARE United Arab Emirates
#> 132 GBR United Kingdom
#> 133 USA United States
#> 134 URY Uruguay
#> 135 UZB Uzbekistan
#> 136 Bolivarian Republic of Venezuela Bolivarian Republic of Venezuela
#> 137 Viet Nam Viet Nam
#> 138 YEM Yemen
#> 139 ZMB Zambia
#> 140 ZWE Zimbabwe
#> 141 Other Africa Other Africa
#> 142 Other non-OECD Americas Other non-OECD Americas
#> 143 Other non-OECD Asia Other non-OECD Asia
#> 144 Memo: Greenland Memo: Greenland
#> Destination_regions
#> 1 RoW Europe
#> 2 RoW Africa
#> 3 RoW Africa
#> 4 RoW America
#> 5 RoW Asia and Pacific
#> 6 Australia
#> 7 Austria
#> 8 RoW Asia and Pacific
#> 9 RoW Middle East
#> 10 RoW Asia and Pacific
#> 11 RoW Europe
#> 12 Belgium
#> 13 RoW Africa
#> 14 RoW America
#> 15 RoW Europe
#> 16 RoW Africa
#> 17 Brazil
#> 18 RoW Asia and Pacific
#> 19 Bulgaria
#> 20 RoW Asia and Pacific
#> 21 RoW Africa
#> 22 Canada
#> 23 RoW America
#> 24 China
#> 25 RoW America
#> 26 RoW Africa
#> 27 RoW America
#> 28 RoW Africa
#> 29 Croatia
#> 30 RoW America
#> 31 Cyprus
#> 32 Czech Republic
#> 33 RoW Africa
#> 34 Denmark
#> 35 RoW America
#> 36 RoW America
#> 37 RoW Middle East
#> 38 RoW America
#> 39 RoW Africa
#> 40 RoW Africa
#> 41 Estonia
#> 42 RoW Africa
#> 43 Finland
#> 44 France
#> 45 RoW Africa
#> 46 RoW Asia and Pacific
#> 47 Germany
#> 48 RoW Africa
#> 49 Greece
#> 50 RoW America
#> 51 RoW America
#> 52 RoW America
#> 53 RoW Asia and Pacific
#> 54 Hungary
#> 55 RoW Europe
#> 56 India
#> 57 Indonesia
#> 58 RoW Middle East
#> 59 RoW Middle East
#> 60 Ireland
#> 61 RoW Middle East
#> 62 Italy
#> 63 RoW America
#> 64 Japan
#> 65 RoW Middle East
#> 66 RoW Asia and Pacific
#> 67 RoW Africa
#> 68 South Korea
#> 69 RoW Europe
#> 70 RoW Middle East
#> 71 RoW Asia and Pacific
#> 72 RoW Asia and Pacific
#> 73 Latvia
#> 74 RoW Middle East
#> 75 RoW Africa
#> 76 Lithuania
#> 77 Luxembourg
#> 78 RoW Asia and Pacific
#> 79 Malta
#> 80 RoW Africa
#> 81 Mexico
#> 82 RoW Europe
#> 83 RoW Asia and Pacific
#> 84 RoW Europe
#> 85 RoW Africa
#> 86 RoW Africa
#> 87 RoW Africa
#> 88 RoW Asia and Pacific
#> 89 Netherlands
#> 90 RoW Asia and Pacific
#> 91 RoW America
#> 92 RoW Africa
#> 93 RoW Africa
#> 94 RoW Europe
#> 95 Norway
#> 96 RoW Middle East
#> 97 RoW Asia and Pacific
#> 98 RoW America
#> 99 RoW America
#> 100 RoW America
#> 101 RoW Asia and Pacific
#> 102 Poland
#> 103 Portugal
#> 104 RoW Middle East
#> 105 Romania
#> 106 Russian Federation
#> 107 RoW Middle East
#> 108 RoW Africa
#> 109 RoW Europe
#> 110 RoW Asia and Pacific
#> 111 Slovak Republic
#> 112 Slovenia
#> 113 South Africa
#> 114 Spain
#> 115 RoW Asia and Pacific
#> 116 RoW Africa
#> 117 RoW America
#> 118 Sweden
#> 119 Switzerland
#> 120 RoW Middle East
#> 121 Taiwan
#> 122 RoW Asia and Pacific
#> 123 RoW Africa
#> 124 RoW Asia and Pacific
#> 125 RoW Africa
#> 126 RoW America
#> 127 RoW Africa
#> 128 Turkey
#> 129 RoW Asia and Pacific
#> 130 RoW Europe
#> 131 RoW Middle East
#> 132 United Kingdom
#> 133 United States
#> 134 RoW America
#> 135 RoW Asia and Pacific
#> 136 RoW America
#> 137 RoW Asia and Pacific
#> 138 RoW Middle East
#> 139 RoW Africa
#> 140 RoW Africa
#> 141 RoW Africa
#> 142 RoW America
#> 143 RoW Asia and Pacific
#> 144 RoW America