Add required libraries and tag scenarios to remove from datasets (per plots.py)
suppressMessages(library(tidyverse))
suppressMessages(library(sf))
suppressMessages(library(tmap))
suppressMessages(library(spData))
# Unused scenarios
unused_scenarios <- c("SSP4-3.4-SPA4", "SSP4-6.0-SPA4", "SSP5-3.4-OS")
From the file country_mapping_ISO-5Regions.csv
, select
only the three columns relevant per plots.py
(adding
“Country.Name” to check which countries are mapped where, and for making
a map later).
Scroll down for an explanation.
country_mapping <-
read.csv("country_mapping_ISO-5Regions.csv") %>%
select(c(Country.Name, current.region.defs, NEW.AR6.Ch6.Fig6.4))
country_mapping
region_mapping <-
country_mapping %>%
group_by(current.region.defs, NEW.AR6.Ch6.Fig6.4) %>%
summarise(count = n()) %>%
arrange(current.region.defs)
`summarise()` has grouped output by 'current.region.defs'. You can
override using the `.groups` argument.
region_mapping
region_mapping %>%
select(!count) %>%
summarise(count = n()) %>%
arrange(desc(count))
EXPLANATION Above, you can see the 13 “current.region.defs” regions of various countries mapped to 5 different “NEW.AR6.Ch6.Fig6.4” regions. Evidently, there are some overlaps. We explore these in the next section.
First we see the breakdown of the number of countries in each of the 5 “NEW.AR6.Ch6.Fig6.4” regions.
Then we look at which countries are resonsible for there being no many-to-one mapping between the old and new region definitions.
country_mapping %>%
select(!current.region.defs) %>%
group_by(NEW.AR6.Ch6.Fig6.4) %>%
summarise(count = n()) %>%
arrange(desc(count))
region_EA <-
country_mapping %>%
filter(current.region.defs == "Eastern Asia")
region_EA %>%
filter(NEW.AR6.Ch6.Fig6.4 == "East Asia")
region_EA %>%
filter(!NEW.AR6.Ch6.Fig6.4 == "East Asia")
region_NA <-
country_mapping %>%
filter(current.region.defs == "North America")
region_NA %>%
filter(NEW.AR6.Ch6.Fig6.4 == "Central and South America")
region_NA %>%
filter(!NEW.AR6.Ch6.Fig6.4 == "Central and South America")
region_SEA_DP <-
country_mapping %>%
filter(current.region.defs == "South-East Asia and Developing Pacific")
region_SEA_DP %>%
filter(NEW.AR6.Ch6.Fig6.4 == "East Asia")
region_SEA_DP %>%
filter(!NEW.AR6.Ch6.Fig6.4 == "East Asia")
Before showing the regions on a map, we first see if the names of the countries match between the two databases. Below you can see that they don’t for several countries (and some regions, such as “French Southern and Antarctic Lands”, which are absent in the IPCC database). For example, “Russian Federation” is “Russia” in the IPCC database, while “eSwatini” is “Swaziland” etc. Nevertheless, the map below shows the distribution of regions.
world_ipcc <-
left_join(world, country_mapping,
by = join_by(name_long == Country.Name))
world_ipcc %>%
select(name_long, NEW.AR6.Ch6.Fig6.4) %>%
filter(is.na(NEW.AR6.Ch6.Fig6.4))
Simple feature collection with 18 features and 2 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -180 ymin: -89.9 xmax: 180 ymax: 81.2504
Geodetic CRS: WGS 84
tm_shape(world_ipcc) +
tm_fill(col = "NEW.AR6.Ch6.Fig6.4") +
tm_borders()
Some legend labels were too wide. These labels have been resized to 0.48. Increase legend.width (argument of tm_layout) to make the legend wider and therefore the labels larger.
Below you can see the variables from the database, the number of rows (observations), the models used, the scenarios considered and the breakdown of variables.
emissions_global <-
read.csv("ar6-wg1-ch6-emissions-global-data.csv") %>%
filter(!Scenario %in% unused_scenarios)
cols_global <- colnames(emissions_global)
cols_global
[1] "Model" "Scenario" "Region" "Variable" "Unit" "X1850"
[7] "X1851" "X1852" "X1853" "X1854" "X1855" "X1856"
[13] "X1857" "X1858" "X1859" "X1860" "X1861" "X1862"
[19] "X1863" "X1864" "X1865" "X1866" "X1867" "X1868"
[25] "X1869" "X1870" "X1871" "X1872" "X1873" "X1874"
[31] "X1875" "X1876" "X1877" "X1878" "X1879" "X1880"
[37] "X1881" "X1882" "X1883" "X1884" "X1885" "X1886"
[43] "X1887" "X1888" "X1889" "X1890" "X1891" "X1892"
[49] "X1893" "X1894" "X1895" "X1896" "X1897" "X1898"
[55] "X1899" "X1900" "X1901" "X1902" "X1903" "X1904"
[61] "X1905" "X1906" "X1907" "X1908" "X1909" "X1910"
[67] "X1911" "X1912" "X1913" "X1914" "X1915" "X1916"
[73] "X1917" "X1918" "X1919" "X1920" "X1921" "X1922"
[79] "X1923" "X1924" "X1925" "X1926" "X1927" "X1928"
[85] "X1929" "X1930" "X1931" "X1932" "X1933" "X1934"
[91] "X1935" "X1936" "X1937" "X1938" "X1939" "X1940"
[97] "X1941" "X1942" "X1943" "X1944" "X1945" "X1946"
[103] "X1947" "X1948" "X1949" "X1950" "X1951" "X1952"
[109] "X1953" "X1954" "X1955" "X1956" "X1957" "X1958"
[115] "X1959" "X1960" "X1961" "X1962" "X1963" "X1964"
[121] "X1965" "X1966" "X1967" "X1968" "X1969" "X1970"
[127] "X1971" "X1972" "X1973" "X1974" "X1975" "X1976"
[133] "X1977" "X1978" "X1979" "X1980" "X1981" "X1982"
[139] "X1983" "X1984" "X1985" "X1986" "X1987" "X1988"
[145] "X1989" "X1990" "X1991" "X1992" "X1993" "X1994"
[151] "X1995" "X1996" "X1997" "X1998" "X1999" "X2000"
[157] "X2001" "X2002" "X2003" "X2004" "X2005" "X2006"
[163] "X2007" "X2008" "X2009" "X2010" "X2011" "X2012"
[169] "X2013" "X2014" "X2015" "X2016" "X2017" "X2018"
[175] "X2019" "X2020" "X2030" "X2040" "X2050" "X2060"
[181] "X2070" "X2080" "X2090" "X2100"
nrow(emissions_global)
[1] 807
unique(emissions_global$Model)
[1] "AIM/CGE" "CMIP5" "CMIP6"
[4] "EDGAR" "Ev5a" "GAINS"
[7] "History" "IMAGE" "MESSAGE-GLOBIOM"
[10] "RCP" "REMIND-MAGPIE"
unique(emissions_global$Scenario)
[1] "SSP3-7.0-SPA0" "SSP3-LowNTCF" "History"
[4] "CLE" "MTFR" "SLCF"
[7] "GAINS-CLE" "GAINS-KA" "GAINS-MTFR"
[10] "Velders-(2015) high" "Velders-(2015) low" "ECLIPSE_Ev5a"
[13] "EDGAR" "SSP1-1.9-SPA1" "SSP1-2.6-SPA1"
[16] "SSP2-4.5-SPA2" "RCP 2.6" "RCP 4.5"
[19] "RCP 6.0" "RCP 8.5" "RCP3-PD(2.6)"
[22] "RCP4.5" "RCP6.0" "RCP8.5"
[25] "SSP5-8.5"
unique(emissions_global$Region)
[1] "World"
unique(emissions_global$Variable)
[1] "Emissions|BC"
[2] "Emissions|BC|Agricultural Waste Burning"
[3] "Emissions|BC|Aircraft"
[4] "Emissions|BC|Energy Sector"
[5] "Emissions|BC|Forest Burning"
[6] "Emissions|BC|Grassland Burning"
[7] "Emissions|BC|Industrial Sector"
[8] "Emissions|BC|International Shipping"
[9] "Emissions|BC|Peat Burning"
[10] "Emissions|BC|Residential Commercial Other"
[11] "Emissions|BC|Transportation Sector"
[12] "Emissions|BC|Waste"
[13] "Emissions|C2F6"
[14] "Emissions|CF4"
[15] "Emissions|CH4"
[16] "Emissions|CH4|Agricultural Waste Burning"
[17] "Emissions|CH4|Agriculture"
[18] "Emissions|CH4|Energy Sector"
[19] "Emissions|CH4|Forest Burning"
[20] "Emissions|CH4|Grassland Burning"
[21] "Emissions|CH4|Industrial Sector"
[22] "Emissions|CH4|International Shipping"
[23] "Emissions|CH4|Peat Burning"
[24] "Emissions|CH4|Residential Commercial Other"
[25] "Emissions|CH4|Transportation Sector"
[26] "Emissions|CH4|Waste"
[27] "Emissions|CO"
[28] "Emissions|CO2"
[29] "Emissions|CO2|AFOLU"
[30] "Emissions|CO2|Aircraft"
[31] "Emissions|CO2|Energy Sector"
[32] "Emissions|CO2|Industrial Sector"
[33] "Emissions|CO2|International Shipping"
[34] "Emissions|CO2|Residential Commercial Other"
[35] "Emissions|CO2|Solvents Production and Application"
[36] "Emissions|CO2|Transportation Sector"
[37] "Emissions|CO2|Waste"
[38] "Emissions|CO|Agricultural Waste Burning"
[39] "Emissions|CO|Aircraft"
[40] "Emissions|CO|Energy Sector"
[41] "Emissions|CO|Forest Burning"
[42] "Emissions|CO|Grassland Burning"
[43] "Emissions|CO|Industrial Sector"
[44] "Emissions|CO|International Shipping"
[45] "Emissions|CO|Peat Burning"
[46] "Emissions|CO|Residential Commercial Other"
[47] "Emissions|CO|Transportation Sector"
[48] "Emissions|CO|Waste"
[49] "Emissions|HFC"
[50] "Emissions|N2O"
[51] "Emissions|NH3"
[52] "Emissions|NH3|Agricultural Waste Burning"
[53] "Emissions|NH3|Agriculture"
[54] "Emissions|NH3|Aircraft"
[55] "Emissions|NH3|Energy Sector"
[56] "Emissions|NH3|Forest Burning"
[57] "Emissions|NH3|Grassland Burning"
[58] "Emissions|NH3|Industrial Sector"
[59] "Emissions|NH3|International Shipping"
[60] "Emissions|NH3|Peat Burning"
[61] "Emissions|NH3|Residential Commercial Other"
[62] "Emissions|NH3|Transportation Sector"
[63] "Emissions|NH3|Waste"
[64] "Emissions|NOx"
[65] "Emissions|NOx|Agricultural Waste Burning"
[66] "Emissions|NOx|Agriculture"
[67] "Emissions|NOx|Aircraft"
[68] "Emissions|NOx|Energy Sector"
[69] "Emissions|NOx|Forest Burning"
[70] "Emissions|NOx|Grassland Burning"
[71] "Emissions|NOx|Industrial Sector"
[72] "Emissions|NOx|International Shipping"
[73] "Emissions|NOx|Peat Burning"
[74] "Emissions|NOx|Residential Commercial Other"
[75] "Emissions|NOx|Transportation Sector"
[76] "Emissions|NOx|Waste"
[77] "Emissions|OC"
[78] "Emissions|OC|Agricultural Waste Burning"
[79] "Emissions|OC|Aircraft"
[80] "Emissions|OC|Energy Sector"
[81] "Emissions|OC|Forest Burning"
[82] "Emissions|OC|Grassland Burning"
[83] "Emissions|OC|Industrial Sector"
[84] "Emissions|OC|International Shipping"
[85] "Emissions|OC|Peat Burning"
[86] "Emissions|OC|Residential Commercial Other"
[87] "Emissions|OC|Transportation Sector"
[88] "Emissions|OC|Waste"
[89] "Emissions|SF6"
[90] "Emissions|Sulfur"
[91] "Emissions|Sulfur|Agricultural Waste Burning"
[92] "Emissions|Sulfur|Aircraft"
[93] "Emissions|Sulfur|Energy Sector"
[94] "Emissions|Sulfur|Forest Burning"
[95] "Emissions|Sulfur|Grassland Burning"
[96] "Emissions|Sulfur|Industrial Sector"
[97] "Emissions|Sulfur|International Shipping"
[98] "Emissions|Sulfur|Peat Burning"
[99] "Emissions|Sulfur|Residential Commercial Other"
[100] "Emissions|Sulfur|Transportation Sector"
[101] "Emissions|Sulfur|Waste"
[102] "Emissions|VOC"
[103] "Emissions|VOC|Agricultural Waste Burning"
[104] "Emissions|VOC|Aircraft"
[105] "Emissions|VOC|Energy Sector"
[106] "Emissions|VOC|Forest Burning"
[107] "Emissions|VOC|Grassland Burning"
[108] "Emissions|VOC|Industrial Sector"
[109] "Emissions|VOC|International Shipping"
[110] "Emissions|VOC|Peat Burning"
[111] "Emissions|VOC|Residential Commercial Other"
[112] "Emissions|VOC|Solvents Production and Application"
[113] "Emissions|VOC|Transportation Sector"
[114] "Emissions|VOC|Waste"
[115] "Emissions|PFC"
The same information as above is shown here, but for regional
emissions from the file
ar6-wg1-ch6-emissions-regional-data-5regions.csv
.
# N.B.: Uses five regions
emissions_regional <-
read.csv("ar6-wg1-ch6-emissions-regional-data-5regions.csv") %>%
filter(!Scenario %in% unused_scenarios)
cols_regional <- colnames(emissions_regional)
cols_regional
[1] "Model" "Scenario" "Region" "Variable" "Unit" "X1850"
[7] "X1851" "X1852" "X1853" "X1854" "X1855" "X1856"
[13] "X1857" "X1858" "X1859" "X1860" "X1861" "X1862"
[19] "X1863" "X1864" "X1865" "X1866" "X1867" "X1868"
[25] "X1869" "X1870" "X1871" "X1872" "X1873" "X1874"
[31] "X1875" "X1876" "X1877" "X1878" "X1879" "X1880"
[37] "X1881" "X1882" "X1883" "X1884" "X1885" "X1886"
[43] "X1887" "X1888" "X1889" "X1890" "X1891" "X1892"
[49] "X1893" "X1894" "X1895" "X1896" "X1897" "X1898"
[55] "X1899" "X1900" "X1901" "X1902" "X1903" "X1904"
[61] "X1905" "X1906" "X1907" "X1908" "X1909" "X1910"
[67] "X1911" "X1912" "X1913" "X1914" "X1915" "X1916"
[73] "X1917" "X1918" "X1919" "X1920" "X1921" "X1922"
[79] "X1923" "X1924" "X1925" "X1926" "X1927" "X1928"
[85] "X1929" "X1930" "X1931" "X1932" "X1933" "X1934"
[91] "X1935" "X1936" "X1937" "X1938" "X1939" "X1940"
[97] "X1941" "X1942" "X1943" "X1944" "X1945" "X1946"
[103] "X1947" "X1948" "X1949" "X1950" "X1951" "X1952"
[109] "X1953" "X1954" "X1955" "X1956" "X1957" "X1958"
[115] "X1959" "X1960" "X1961" "X1962" "X1963" "X1964"
[121] "X1965" "X1966" "X1967" "X1968" "X1969" "X1970"
[127] "X1971" "X1972" "X1973" "X1974" "X1975" "X1976"
[133] "X1977" "X1978" "X1979" "X1980" "X1981" "X1982"
[139] "X1983" "X1984" "X1985" "X1986" "X1987" "X1988"
[145] "X1989" "X1990" "X1991" "X1992" "X1993" "X1994"
[151] "X1995" "X1996" "X1997" "X1998" "X1999" "X2000"
[157] "X2001" "X2002" "X2003" "X2004" "X2005" "X2006"
[163] "X2007" "X2008" "X2009" "X2010" "X2011" "X2012"
[169] "X2013" "X2014" "X2015" "X2020" "X2030" "X2040"
[175] "X2050" "X2060" "X2070" "X2080" "X2090" "X2100"
nrow(emissions_regional)
[1] 4565
unique(emissions_regional$Model)
[1] "AIM" "CMIP5" "CMIP6" "History"
[5] "IMAGE" "MESSAGE-GLOBIOM" "RCP" "REMIND-MAGPIE"
unique(emissions_regional$Scenario)
[1] "SSP3-7.0-SPA0" "SSP3-LowNTCF" "History" "CEDS"
[5] "SSP1-1.9-SPA1" "SSP1-2.6-SPA1" "SSP2-4.5-SPA2" "RCP 2.6"
[9] "RCP 4.5" "RCP 6.0" "RCP 8.5" "SSP5-8.5"
unique(emissions_regional$Region)
[1] "Africa and Middle East"
[2] "Central and South America"
[3] "East Asia"
[4] "North America, Europe, Russia, Central Asia, and Pacific OECD"
[5] "South and South East Asia, Other Pacific"
unique(emissions_regional$Variable)
[1] "Emissions|BC"
[2] "Emissions|BC|Agricultural Waste Burning"
[3] "Emissions|BC|Agriculture"
[4] "Emissions|BC|Energy Sector"
[5] "Emissions|BC|Forest Burning"
[6] "Emissions|BC|Grassland Burning"
[7] "Emissions|BC|Industrial Sector"
[8] "Emissions|BC|Peat Burning"
[9] "Emissions|BC|Residential Commercial Other"
[10] "Emissions|BC|Solvents Production and Application"
[11] "Emissions|BC|Transportation Sector"
[12] "Emissions|BC|Waste"
[13] "Emissions|CH4"
[14] "Emissions|CH4|Agricultural Waste Burning"
[15] "Emissions|CH4|Agriculture"
[16] "Emissions|CH4|Energy Sector"
[17] "Emissions|CH4|Forest Burning"
[18] "Emissions|CH4|Grassland Burning"
[19] "Emissions|CH4|Industrial Sector"
[20] "Emissions|CH4|Peat Burning"
[21] "Emissions|CH4|Residential Commercial Other"
[22] "Emissions|CH4|Solvents Production and Application"
[23] "Emissions|CH4|Transportation Sector"
[24] "Emissions|CH4|Waste"
[25] "Emissions|CO"
[26] "Emissions|CO2"
[27] "Emissions|CO2|Agricultural Waste Burning"
[28] "Emissions|CO2|Agriculture"
[29] "Emissions|CO2|Energy Sector"
[30] "Emissions|CO2|Forest Burning"
[31] "Emissions|CO2|Grassland Burning"
[32] "Emissions|CO2|Industrial Sector"
[33] "Emissions|CO2|Peat Burning"
[34] "Emissions|CO2|Residential Commercial Other"
[35] "Emissions|CO2|Solvents Production and Application"
[36] "Emissions|CO2|Transportation Sector"
[37] "Emissions|CO2|Waste"
[38] "Emissions|CO|Agricultural Waste Burning"
[39] "Emissions|CO|Agriculture"
[40] "Emissions|CO|Energy Sector"
[41] "Emissions|CO|Forest Burning"
[42] "Emissions|CO|Grassland Burning"
[43] "Emissions|CO|Industrial Sector"
[44] "Emissions|CO|Peat Burning"
[45] "Emissions|CO|Residential Commercial Other"
[46] "Emissions|CO|Solvents Production and Application"
[47] "Emissions|CO|Transportation Sector"
[48] "Emissions|CO|Waste"
[49] "Emissions|NH3"
[50] "Emissions|NH3|Agricultural Waste Burning"
[51] "Emissions|NH3|Agriculture"
[52] "Emissions|NH3|Energy Sector"
[53] "Emissions|NH3|Forest Burning"
[54] "Emissions|NH3|Grassland Burning"
[55] "Emissions|NH3|Industrial Sector"
[56] "Emissions|NH3|Peat Burning"
[57] "Emissions|NH3|Residential Commercial Other"
[58] "Emissions|NH3|Solvents Production and Application"
[59] "Emissions|NH3|Transportation Sector"
[60] "Emissions|NH3|Waste"
[61] "Emissions|NMVOC|Agricultural Waste Burning"
[62] "Emissions|NMVOC|Agriculture"
[63] "Emissions|NMVOC|Energy Sector"
[64] "Emissions|NMVOC|Forest Burning"
[65] "Emissions|NMVOC|Grassland Burning"
[66] "Emissions|NMVOC|Industrial Sector"
[67] "Emissions|NMVOC|Peat Burning"
[68] "Emissions|NMVOC|Residential Commercial Other"
[69] "Emissions|NMVOC|Solvents Production and Application"
[70] "Emissions|NMVOC|Transportation Sector"
[71] "Emissions|NMVOC|Waste"
[72] "Emissions|NOx"
[73] "Emissions|NOx|Agricultural Waste Burning"
[74] "Emissions|NOx|Agriculture"
[75] "Emissions|NOx|Energy Sector"
[76] "Emissions|NOx|Forest Burning"
[77] "Emissions|NOx|Grassland Burning"
[78] "Emissions|NOx|Industrial Sector"
[79] "Emissions|NOx|Peat Burning"
[80] "Emissions|NOx|Residential Commercial Other"
[81] "Emissions|NOx|Solvents Production and Application"
[82] "Emissions|NOx|Transportation Sector"
[83] "Emissions|NOx|Waste"
[84] "Emissions|OC"
[85] "Emissions|OC|Agricultural Waste Burning"
[86] "Emissions|OC|Agriculture"
[87] "Emissions|OC|Energy Sector"
[88] "Emissions|OC|Forest Burning"
[89] "Emissions|OC|Grassland Burning"
[90] "Emissions|OC|Industrial Sector"
[91] "Emissions|OC|Peat Burning"
[92] "Emissions|OC|Residential Commercial Other"
[93] "Emissions|OC|Solvents Production and Application"
[94] "Emissions|OC|Transportation Sector"
[95] "Emissions|OC|Waste"
[96] "Emissions|Sulfur"
[97] "Emissions|Sulfur|Agricultural Waste Burning"
[98] "Emissions|Sulfur|Agriculture"
[99] "Emissions|Sulfur|Energy Sector"
[100] "Emissions|Sulfur|Forest Burning"
[101] "Emissions|Sulfur|Grassland Burning"
[102] "Emissions|Sulfur|Industrial Sector"
[103] "Emissions|Sulfur|Peat Burning"
[104] "Emissions|Sulfur|Residential Commercial Other"
[105] "Emissions|Sulfur|Solvents Production and Application"
[106] "Emissions|Sulfur|Transportation Sector"
[107] "Emissions|Sulfur|Waste"
[108] "Emissions|VOC"
[109] "Emissions|VOC|Agricultural Waste Burning"
[110] "Emissions|VOC|Agriculture"
[111] "Emissions|VOC|Energy Sector"
[112] "Emissions|VOC|Forest Burning"
[113] "Emissions|VOC|Grassland Burning"
[114] "Emissions|VOC|Industrial Sector"
[115] "Emissions|VOC|Peat Burning"
[116] "Emissions|VOC|Residential Commercial Other"
[117] "Emissions|VOC|Solvents Production and Application"
[118] "Emissions|VOC|Transportation Sector"
[119] "Emissions|VOC|Waste"
[120] "Emissions|N2O"
[121] "Emissions|PFC"
[122] "Emissions|SF6"
While the database of global emissions has 184 variables, that for regional emissions only has 180. Below we see which variables are missing from the latter.
janitor::compare_df_cols(emissions_global, emissions_regional) %>%
filter(is.na(emissions_regional))
The IPCC has provided two seemingly identical databases with
different names:
ar6-wg1-ch6-emissions-regional-data-5regions.csv
and
ar6-wg1-ch6-emissions-regional-data.csv
. Initially, it
seemed like the latter had more granular information about the regions
(perhaps mapped to “current.region.defs”), but this is not the case: it
has the same region names as the other file. Further exploration shows
some differences between the two files, as shown below.
emissions_current_regions <-
read.csv("ar6-wg1-ch6-emissions-regional-data.csv") %>%
filter(!Scenario %in% unused_scenarios)
# %>%
# rename(Current_Region = Region)
unique(emissions_current_regions$Region)
[1] "Africa and Middle East"
[2] "Central and South America"
[3] "East Asia"
[4] "North America, Europe, Russia, Central Asia, and Pacific OECD"
[5] "South and South East Asia, Other Pacific"
summary(arsenal::comparedf(emissions_current_regions, emissions_regional))
version | arg | ncol | nrow |
---|---|---|---|
x | emissions_current_regions | 180 | 4565 |
y | emissions_regional | 180 | 4565 |
NA
statistic | value |
---|---|
Number of by-variables | 0 |
Number of non-by variables in common | 180 |
Number of variables compared | 180 |
Number of variables in x but not y | 0 |
Number of variables in y but not x | 0 |
Number of variables compared with some values unequal | 175 |
Number of variables compared with all values equal | 5 |
Number of observations in common | 4565 |
Number of observations in x but not y | 0 |
Number of observations in y but not x | 0 |
Number of observations with some compared variables unequal | 2272 |
Number of observations with all compared variables equal | 2293 |
Number of values unequal | 29518 |
NA
No variables not shared |
NA
No other variables not compared |
NA
No observations not shared |
NA
var.x | var.y | n | NAs |
---|---|---|---|
Model | Model | 0 | 0 |
Scenario | Scenario | 0 | 0 |
Region | Region | 0 | 0 |
Variable | Variable | 0 | 0 |
Unit | Unit | 0 | 0 |
X1850 | X1850 | 30 | 0 |
X1851 | X1851 | 28 | 0 |
X1852 | X1852 | 28 | 0 |
X1853 | X1853 | 28 | 0 |
X1854 | X1854 | 28 | 0 |
X1855 | X1855 | 28 | 0 |
X1856 | X1856 | 28 | 0 |
X1857 | X1857 | 28 | 0 |
X1858 | X1858 | 28 | 0 |
X1859 | X1859 | 28 | 0 |
X1860 | X1860 | 30 | 0 |
X1861 | X1861 | 28 | 0 |
X1862 | X1862 | 28 | 0 |
X1863 | X1863 | 28 | 0 |
X1864 | X1864 | 28 | 0 |
X1865 | X1865 | 28 | 0 |
X1866 | X1866 | 28 | 0 |
X1867 | X1867 | 28 | 0 |
X1868 | X1868 | 28 | 0 |
X1869 | X1869 | 28 | 0 |
X1870 | X1870 | 30 | 0 |
X1871 | X1871 | 28 | 0 |
X1872 | X1872 | 28 | 0 |
X1873 | X1873 | 28 | 0 |
X1874 | X1874 | 28 | 0 |
X1875 | X1875 | 28 | 0 |
X1876 | X1876 | 28 | 0 |
X1877 | X1877 | 28 | 0 |
X1878 | X1878 | 28 | 0 |
X1879 | X1879 | 28 | 0 |
X1880 | X1880 | 30 | 0 |
X1881 | X1881 | 28 | 0 |
X1882 | X1882 | 28 | 0 |
X1883 | X1883 | 28 | 0 |
X1884 | X1884 | 28 | 0 |
X1885 | X1885 | 28 | 0 |
X1886 | X1886 | 28 | 0 |
X1887 | X1887 | 28 | 0 |
X1888 | X1888 | 28 | 0 |
X1889 | X1889 | 28 | 0 |
X1890 | X1890 | 30 | 0 |
X1891 | X1891 | 28 | 0 |
X1892 | X1892 | 28 | 0 |
X1893 | X1893 | 28 | 0 |
X1894 | X1894 | 28 | 0 |
X1895 | X1895 | 28 | 0 |
X1896 | X1896 | 28 | 0 |
X1897 | X1897 | 28 | 0 |
X1898 | X1898 | 28 | 0 |
X1899 | X1899 | 28 | 0 |
X1900 | X1900 | 30 | 0 |
X1901 | X1901 | 28 | 0 |
X1902 | X1902 | 28 | 0 |
X1903 | X1903 | 28 | 0 |
X1904 | X1904 | 28 | 0 |
X1905 | X1905 | 28 | 0 |
X1906 | X1906 | 28 | 0 |
X1907 | X1907 | 28 | 0 |
X1908 | X1908 | 28 | 0 |
X1909 | X1909 | 28 | 0 |
X1910 | X1910 | 30 | 0 |
X1911 | X1911 | 28 | 0 |
X1912 | X1912 | 28 | 0 |
X1913 | X1913 | 28 | 0 |
X1914 | X1914 | 28 | 0 |
X1915 | X1915 | 28 | 0 |
X1916 | X1916 | 28 | 0 |
X1917 | X1917 | 28 | 0 |
X1918 | X1918 | 28 | 0 |
X1919 | X1919 | 28 | 0 |
X1920 | X1920 | 30 | 0 |
X1921 | X1921 | 28 | 0 |
X1922 | X1922 | 28 | 0 |
X1923 | X1923 | 28 | 0 |
X1924 | X1924 | 28 | 0 |
X1925 | X1925 | 28 | 0 |
X1926 | X1926 | 28 | 0 |
X1927 | X1927 | 28 | 0 |
X1928 | X1928 | 28 | 0 |
X1929 | X1929 | 28 | 0 |
X1930 | X1930 | 30 | 0 |
X1931 | X1931 | 28 | 0 |
X1932 | X1932 | 28 | 0 |
X1933 | X1933 | 28 | 0 |
X1934 | X1934 | 28 | 0 |
X1935 | X1935 | 28 | 0 |
X1936 | X1936 | 28 | 0 |
X1937 | X1937 | 28 | 0 |
X1938 | X1938 | 28 | 0 |
X1939 | X1939 | 28 | 0 |
X1940 | X1940 | 30 | 0 |
X1941 | X1941 | 28 | 0 |
X1942 | X1942 | 28 | 0 |
X1943 | X1943 | 28 | 0 |
X1944 | X1944 | 28 | 0 |
X1945 | X1945 | 28 | 0 |
X1946 | X1946 | 28 | 0 |
X1947 | X1947 | 28 | 0 |
X1948 | X1948 | 28 | 0 |
X1949 | X1949 | 28 | 0 |
X1950 | X1950 | 30 | 0 |
X1951 | X1951 | 28 | 0 |
X1952 | X1952 | 28 | 0 |
X1953 | X1953 | 28 | 0 |
X1954 | X1954 | 28 | 0 |
X1955 | X1955 | 28 | 0 |
X1956 | X1956 | 28 | 0 |
X1957 | X1957 | 28 | 0 |
X1958 | X1958 | 28 | 0 |
X1959 | X1959 | 28 | 0 |
X1960 | X1960 | 30 | 0 |
X1961 | X1961 | 28 | 0 |
X1962 | X1962 | 28 | 0 |
X1963 | X1963 | 28 | 0 |
X1964 | X1964 | 28 | 0 |
X1965 | X1965 | 28 | 0 |
X1966 | X1966 | 28 | 0 |
X1967 | X1967 | 28 | 0 |
X1968 | X1968 | 28 | 0 |
X1969 | X1969 | 28 | 0 |
X1970 | X1970 | 32 | 0 |
X1971 | X1971 | 32 | 0 |
X1972 | X1972 | 32 | 0 |
X1973 | X1973 | 32 | 0 |
X1974 | X1974 | 32 | 0 |
X1975 | X1975 | 32 | 0 |
X1976 | X1976 | 32 | 0 |
X1977 | X1977 | 32 | 0 |
X1978 | X1978 | 32 | 0 |
X1979 | X1979 | 32 | 0 |
X1980 | X1980 | 32 | 0 |
X1981 | X1981 | 32 | 0 |
X1982 | X1982 | 32 | 0 |
X1983 | X1983 | 32 | 0 |
X1984 | X1984 | 32 | 0 |
X1985 | X1985 | 32 | 0 |
X1986 | X1986 | 32 | 0 |
X1987 | X1987 | 32 | 0 |
X1988 | X1988 | 32 | 0 |
X1989 | X1989 | 32 | 0 |
X1990 | X1990 | 316 | 0 |
X1991 | X1991 | 316 | 0 |
X1992 | X1992 | 316 | 0 |
X1993 | X1993 | 316 | 0 |
X1994 | X1994 | 316 | 0 |
X1995 | X1995 | 316 | 0 |
X1996 | X1996 | 316 | 0 |
X1997 | X1997 | 316 | 0 |
X1998 | X1998 | 316 | 0 |
X1999 | X1999 | 316 | 0 |
X2000 | X2000 | 316 | 0 |
X2001 | X2001 | 316 | 0 |
X2002 | X2002 | 316 | 0 |
X2003 | X2003 | 316 | 0 |
X2004 | X2004 | 316 | 0 |
X2005 | X2005 | 316 | 0 |
X2006 | X2006 | 316 | 0 |
X2007 | X2007 | 316 | 0 |
X2008 | X2008 | 316 | 0 |
X2009 | X2009 | 316 | 0 |
X2010 | X2010 | 316 | 0 |
X2011 | X2011 | 316 | 0 |
X2012 | X2012 | 316 | 0 |
X2013 | X2013 | 316 | 0 |
X2014 | X2014 | 316 | 0 |
X2015 | X2015 | 2272 | 0 |
X2020 | X2020 | 1704 | 0 |
X2030 | X2030 | 1704 | 0 |
X2040 | X2040 | 1704 | 0 |
X2050 | X2050 | 1704 | 0 |
X2060 | X2060 | 1704 | 0 |
X2070 | X2070 | 1704 | 0 |
X2080 | X2080 | 1702 | 0 |
X2090 | X2090 | 1702 | 0 |
X2100 | X2100 | 1694 | 0 |
NA
var.x | var.y | ..row.names.. | values.x | values.y | row.x | row.y |
---|---|---|---|---|---|---|
X1850 | X1850 | 1229 | 0.1505004 | 0.1504872 | 1229 | 1229 |
X1850 | X1850 | 1253 | 22.50398 | 22.50319 | 1253 | 1253 |
X1850 | X1850 | 1277 | 0.5179229 | 0.5176253 | 1277 | 1277 |
X1850 | X1850 | 1300 | 0.9042424 | 0.9042411 | 1300 | 1300 |
X1850 | X1850 | 1312 | 1.046345 | 1.046293 | 1312 | 1312 |
X1850 | X1850 | 1324 | 0.1680475 | 0.1680454 | 1324 | 1324 |
X1850 | X1850 | 1336 | 4.115626 | 4.115514 | 1336 | 1336 |
X1850 | X1850 | 1337 | 0.4094407 | 0.3228789 | 1337 | 1337 |
X1850 | X1850 | 1349 | 5.189415 | 4.260081 | 1349 | 1349 |
X1850 | X1850 | 1361 | 53.58271 | 38.89107 | 1361 | 1361 |
X1851 | X1851 | 1229 | 0.1501614 | 0.1501485 | 1229 | 1229 |
X1851 | X1851 | 1253 | 22.42899 | 22.42821 | 1253 | 1253 |
X1851 | X1851 | 1277 | 0.5197037 | 0.5194107 | 1277 | 1277 |
X1851 | X1851 | 1300 | 0.9009933 | 0.900992 | 1300 | 1300 |
X1851 | X1851 | 1312 | 1.043122 | 1.043071 | 1312 | 1312 |
X1851 | X1851 | 1324 | 0.1691642 | 0.1691622 | 1324 | 1324 |
X1851 | X1851 | 1336 | 4.100179 | 4.100069 | 1336 | 1336 |
X1851 | X1851 | 1337 | 0.4064968 | 0.3199004 | 1337 | 1337 |
X1851 | X1851 | 1361 | 53.18587 | 38.49895 | 1361 | 1361 |
X1851 | X1851 | 1385 | 2.256342 | 2.04618 | 1385 | 1385 |
X1852 | X1852 | 1229 | 0.149141 | 0.1491282 | 1229 | 1229 |
X1852 | X1852 | 1253 | 22.22951 | 22.22874 | 1253 | 1253 |
X1852 | X1852 | 1277 | 0.5200344 | 0.5197443 | 1277 | 1277 |
X1852 | X1852 | 1300 | 0.8920096 | 0.8920084 | 1300 | 1300 |
X1852 | X1852 | 1312 | 1.034633 | 1.034582 | 1312 | 1312 |
X1852 | X1852 | 1324 | 0.1695278 | 0.1695258 | 1324 | 1324 |
X1852 | X1852 | 1336 | 4.059667 | 4.059557 | 1336 | 1336 |
X1852 | X1852 | 1337 | 0.402734 | 0.3172693 | 1337 | 1337 |
X1852 | X1852 | 1361 | 52.6472 | 38.16506 | 1361 | 1361 |
X1852 | X1852 | 1385 | 2.240239 | 2.032107 | 1385 | 1385 |
X1853 | X1853 | 1229 | 0.1494289 | 0.1494161 | 1229 | 1229 |
X1853 | X1853 | 1253 | 22.24423 | 22.24346 | 1253 | 1253 |
X1853 | X1853 | 1277 | 0.523373 | 0.5230808 | 1277 | 1277 |
X1853 | X1853 | 1300 | 0.8918505 | 0.8918492 | 1300 | 1300 |
X1853 | X1853 | 1312 | 1.036115 | 1.036064 | 1312 | 1312 |
X1853 | X1853 | 1324 | 0.1712046 | 0.1712026 | 1324 | 1324 |
X1853 | X1853 | 1336 | 4.059909 | 4.059798 | 1336 | 1336 |
X1853 | X1853 | 1337 | 0.4006968 | 0.315039 | 1337 | 1337 |
X1853 | X1853 | 1361 | 52.4047 | 37.90016 | 1361 | 1361 |
X1853 | X1853 | 1385 | 2.227885 | 2.01911 | 1385 | 1385 |
X1854 | X1854 | 1229 | 0.1501585 | 0.1501456 | 1229 | 1229 |
X1854 | X1854 | 1253 | 22.33223 | 22.33145 | 1253 | 1253 |
X1854 | X1854 | 1277 | 0.5276405 | 0.5273462 | 1277 | 1277 |
X1854 | X1854 | 1300 | 0.894728 | 0.8947267 | 1300 | 1300 |
X1854 | X1854 | 1312 | 1.041123 | 1.041072 | 1312 | 1312 |
X1854 | X1854 | 1324 | 0.1733496 | 0.1733476 | 1324 | 1324 |
X1854 | X1854 | 1336 | 4.074119 | 4.074007 | 1336 | 1336 |
X1854 | X1854 | 1337 | 0.3980772 | 0.3126279 | 1337 | 1337 |
X1854 | X1854 | 1361 | 52.06323 | 37.60535 | 1361 | 1361 |
X1854 | X1854 | 1385 | 2.214194 | 2.005584 | 1385 | 1385 |
NA
No non-identical attributes |
NA
Based on the below graph (and the ones in the sections below), it appears that the emissions recorded by just the name of the chemical are the aggregate value of the individual contributing factors.
emissions_regional %>%
filter(grepl("CH4", Variable)) %>%
filter(Region == "Africa and Middle East") %>%
filter(Model == "AIM") %>%
filter(grepl("LowNTCF", Scenario)) %>%
select(!Model) %>%
select(!Scenario) %>%
select(!Region) %>%
select(!Unit) %>%
rename_with(~ str_remove(., "X"), everything()) %>%
pivot_longer(
cols = "1850":"2100",
names_to = "year",
values_to = "count"
) %>%
mutate(year = as.Date(year, format = "%Y")) %>%
mutate(year = as.numeric(format(year, "%Y"))) %>%
filter(year >= 2020) %>%
#select(!year) %>%
ggplot() +
geom_col(aes(count, fct_reorder(Variable, count))) +
facet_grid(cols = vars(year))
First we look at methane emissions in Africa and the Middle East, to compare with the top-left plot from the original figure.
emissions_regional %>%
filter(Variable == "Emissions|CH4") %>%
select(!Variable) %>%
filter(Region == "Africa and Middle East") %>%
select(!Region) %>%
select(!Unit) %>%
unite(Model_Scenario, c("Model", "Scenario")) %>%
rename_with(~ str_remove(., "X"), everything()) %>%
pivot_longer(
cols = "1850":"2100",
names_to = "year",
values_to = "count"
) %>%
mutate(year = as.Date(year, format = "%Y")) %>%
mutate(year = as.numeric(format(year, "%Y"))) %>%
ggplot() +
geom_point(aes(x = year, y = count, colour = Model_Scenario)) +
geom_line(aes(x = year, y = count, colour = Model_Scenario))
Then we look at the RCP-only data, which matches with the grey area in the original figure. It appears that for each year, the minimum and maximum of all four datasets is used to plot the boundaries of the grey area.
emissions_regional %>%
filter(Variable == "Emissions|CH4") %>%
select(!Variable) %>%
filter(Region == "Africa and Middle East") %>%
select(!Region) %>%
select(!Unit) %>%
unite(Model_Scenario, c("Model", "Scenario")) %>%
rename_with(~ str_remove(., "X"), everything()) %>%
pivot_longer(
cols = "1850":"2100",
names_to = "year",
values_to = "count"
) %>%
filter(grepl("RCP", Model_Scenario)) %>%
mutate(year = as.Date(year, format = "%Y")) %>%
mutate(year = as.numeric(format(year, "%Y"))) %>%
ggplot() +
geom_point(aes(x = year, y = count, colour = Model_Scenario)) +
geom_line(aes(x = year, y = count, colour = Model_Scenario))
Below is the faceted breakdown of all emissions by region. N.B.: Where the original plot shows data for “NMVOC”, it comes from the value of ”Emissions|VOC” in the dataset. Also note that I cannot get the order of the gases to match the original plot (yet). The labelling also needs some work, but the plotting itself seems to be OK.
emissions_type <- c("Emissions|CH4"
, "Emissions|BC"
, "Emissions|Sulfur"
, "Emissions|CO"
, "Emissions|NH3"
, "Emissions|VOC"
, "Emissions|NOx"
, "Emissions|OC"
)
emissions_regional %>%
filter(Variable %in% emissions_type) %>%
mutate(Variable = as.factor(Variable)) %>%
select(!Unit) %>%
unite(Model_Scenario, c("Model", "Scenario")) %>%
rename_with(~ str_remove(., "X"), everything()) %>%
pivot_longer(
cols = "1850":"2100",
names_to = "year",
values_to = "count"
) %>%
mutate(year = as.Date(year, format = "%Y")) %>%
mutate(year = as.numeric(format(year, "%Y"))) %>%
ggplot() +
geom_point(aes(x = year, y = count, colour = Model_Scenario)) +
geom_line(aes(x = year, y = count, colour = Model_Scenario)) +
facet_grid(rows = vars(Variable), cols = vars(Region), scales = "free_y")
# mutate(Variable = fct_relevel(Variable),
# levels = c("Emissions|CH4"
# , "Emissions|BC"
# , "Emissions|OC"
# , "Emissions|Sulfur"
# , "Emissions|NOx"
# , "Emissions|CO"
# , "Emissions|VOC"
# , "Emissions|NH3"
# ))