Source: World Bank “Climate Change”, https://data.worldbank.org/topic/climate-change
Dataset: downloaded CSV file from World Bank:
API_19_DS2_en_csv_v2_1741755.csv Metadata_Indicator_API_19_DS2_en_csv_v2_1741755.csv Metadata_Country_API_19_DS2_en_csv_v2_1741755.csv
Output RPubs in: https://rpubs.com/rmiranda/704901
Output, database and source files at github: https://github.com/raul-miranda/DS110Project3
install.packages("tidyverse")
##
## The downloaded binary packages are in
## /var/folders/f2/clwdhl813kv3ls5yc62jk9v40000gn/T//RtmpgixElw/downloaded_packages
install.packages("readr")
##
## The downloaded binary packages are in
## /var/folders/f2/clwdhl813kv3ls5yc62jk9v40000gn/T//RtmpgixElw/downloaded_packages
install.packages("Metrics")
##
## The downloaded binary packages are in
## /var/folders/f2/clwdhl813kv3ls5yc62jk9v40000gn/T//RtmpgixElw/downloaded_packages
library(tidyverse)
library(dplyr)
library(ggplot2)
library(plotly)
library(RColorBrewer)
library(viridis)
library(Metrics)
library(splines)
library(mgcv)
library(psych)
library(GGally)
worldclim <- read.csv("API_19_DS2_en_csv_v2_1741755.csv", header = FALSE) # file with header
head(worldclim)
## V1 V2
## 1 Data Source World Development Indicators
## 2 Last Updated Date 2020-10-15
## 3 Country Name Country Code
## 4 Aruba ABW
## 5 Aruba ABW
## 6 Aruba ABW
## V3 V4 V5
## 1 NA
## 2 NA
## 3 Indicator Name Indicator Code 1960.000
## 4 Urban population (% of total population) SP.URB.TOTL.IN.ZS 50.776
## 5 Urban population SP.URB.TOTL 27526.000
## 6 Urban population growth (annual %) SP.URB.GROW NA
## V6 V7 V8 V9 V10 V11
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 1961.000000 1962.000000 1.963000e+03 1.964000e+03 1.965000e+03 1.966000e+03
## 4 50.761000 50.746000 5.073000e+01 5.071500e+01 5.070000e+01 5.068500e+01
## 5 28141.000000 28532.000000 2.876100e+04 2.892400e+04 2.908200e+04 2.925300e+04
## 6 2.209658 1.379868 7.994038e-01 5.651398e-01 5.447726e-01 5.862706e-01
## V12 V13 V14 V15 V16 V17
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 1.967000e+03 1.968000e+03 1.969000e+03 1.970000e+03 1.971000e+03 1.972000e+03
## 4 5.067000e+01 5.065400e+01 5.063900e+01 5.062400e+01 5.060900e+01 5.059300e+01
## 5 2.941600e+04 2.957500e+04 2.973800e+04 2.990000e+04 3.008200e+04 3.027500e+04
## 6 5.556611e-01 5.390666e-01 5.496279e-01 5.432791e-01 6.068506e-01 6.395303e-01
## V18 V19 V20 V21 V22
## 1 NA NA NA NA NA
## 2 NA NA NA NA NA
## 3 1.973000e+03 1.974000e+03 1.975000e+03 1976.0000000 1977.0000000
## 4 5.057800e+01 5.056300e+01 5.054800e+01 50.5320000 50.5170000
## 5 3.047000e+04 3.060500e+04 3.066100e+04 30615.0000000 30495.0000000
## 6 6.420304e-01 4.420801e-01 1.828094e-01 -0.1501404 -0.3927349
## V23 V24 V25 V26 V27
## 1 NA NA NA NA NA
## 2 NA NA NA NA NA
## 3 1978.0000000 1979.0000000 1.980000e+03 1.981000e+03 1982.000000
## 4 50.5020000 50.4870000 5.047200e+01 5.045600e+01 50.441000
## 5 30353.0000000 30282.0000000 3.033200e+04 3.056000e+04 30943.000000
## 6 -0.4667376 -0.2341883 1.649784e-01 7.488703e-01 1.245484
## V28 V29 V30 V31 V32 V33
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 1983.000000 1.984000e+03 1.98500e+03 1986.0000000 1987.000000 1988.000000
## 4 50.426000 5.041100e+01 5.03950e+01 50.3800000 50.365000 50.350000
## 5 31365.000000 3.167600e+04 3.17620e+04 31560.0000000 31142.000000 30753.000000
## 6 1.354582 9.866675e-01 2.71131e-01 -0.6380111 -1.333311 -1.256984
## V34 V35 V36 V37 V38 V39
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 1989.0000000 1990.00000 1991.000000 1992.000000 1993.000000 1994.000000
## 4 50.3350000 50.31900 50.304000 49.998000 49.588000 49.177000
## 5 30720.0000000 31273.00000 32507.000000 34116.000000 35953.000000 37719.000000
## 6 -0.1073642 1.78412 3.870035 4.831103 5.244605 4.795142
## V40 V41 V42 V43 V44 V45
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 1995.000000 1996.000000 1997.000000 1998.000000 1999.000000 2000.000000
## 4 48.767000 48.356000 47.946000 47.536000 47.127000 46.717000
## 5 39172.000000 40232.000000 40970.000000 41488.000000 41945.000000 42444.000000
## 6 3.779826 2.670049 1.817739 1.256414 1.095501 1.182632
## V46 V47 V48 V49 V50 V51
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 2001.000000 2002.00000 2003.00000 2.004000e+03 2.005000e+03 2.006000e+03
## 4 46.339000 45.97200 45.60600 4.524000e+01 4.487500e+01 4.451100e+01
## 5 43048.000000 43670.00000 44246.00000 4.466900e+04 4.488900e+04 4.488200e+04
## 6 1.413021 1.43456 1.31036 9.514777e-01 4.913027e-01 -1.559524e-02
## V52 V53 V54 V55 V56
## 1 NA NA NA NA NA
## 2 NA NA NA NA NA
## 3 2007.000000 2008.0000000 2009.0000000 2010.0000000 2.011000e+03
## 4 44.147000 43.7830000 43.4210000 43.0590000 4.294000e+01
## 5 44686.000000 44378.0000000 44053.0000000 43778.0000000 4.381900e+04
## 6 -0.437657 -0.6916402 -0.7350397 -0.6262046 9.361052e-02
## V57 V58 V59 V60 V61 V62
## 1 NA NA NA NA NA NA
## 2 NA NA NA NA NA NA
## 3 2.012000e+03 2.013000e+03 2.014000e+03 2.015000e+03 2.016000e+03 2.017000e+03
## 4 4.295700e+01 4.299000e+01 4.304100e+01 4.310800e+01 4.319200e+01 4.329300e+01
## 5 4.405700e+04 4.434800e+04 4.466500e+04 4.497900e+04 4.529600e+04 4.561600e+04
## 6 5.416737e-01 6.583362e-01 7.122585e-01 7.005517e-01 7.023014e-01 7.039804e-01
## V63 V64 V65 V66
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 2.01800e+03 2.019000e+03 2020 NA
## 4 4.34110e+01 4.354600e+01 NA NA
## 5 4.59480e+04 4.629500e+04 NA NA
## 6 7.25179e-01 7.523642e-01 NA NA
worldclim <- worldclim[-(1:2),] # delete first two rows of header
colnames(worldclim) <- worldclim[1,] # make column name = first row
worldclim <- worldclim[-1,] # delete first row
names(worldclim) <- gsub(" ", "_", names(worldclim)) # replace space in var name with underscore
worldclim <- worldclim[,-ncol(worldclim)] # delete last column - empty
worldclim <- gather(worldclim, key="year", value="quantity", "1960":"2020") # make long
worldclim$year <- as.numeric(worldclim$year) # convert chr to numeric, needed for plots and stats
str(worldclim)
## 'data.frame': 1223904 obs. of 6 variables:
## $ Country_Name : chr "Aruba" "Aruba" "Aruba" "Aruba" ...
## $ Country_Code : chr "ABW" "ABW" "ABW" "ABW" ...
## $ Indicator_Name: chr "Urban population (% of total population)" "Urban population" "Urban population growth (annual %)" "Population, total" ...
## $ Indicator_Code: chr "SP.URB.TOTL.IN.ZS" "SP.URB.TOTL" "SP.URB.GROW" "SP.POP.TOTL" ...
## $ year : num 1960 1960 1960 1960 1960 1960 1960 1960 1960 1960 ...
## $ quantity : num 50.8 27526 NA 54211 NA ...
# Notes: some details when using variable names in grepl or logical comparisons
# note: for var name with a space, I had to use backquotes such as `Country Name`;
# all vars were cleaned of spaces to avoid this complication
# note: for grepl I used the escape with parentheses: \\( \\)
# however, for logical comparisons, I had to remove the escape!!
# note: to grepl more than one Indicator I used paste(): grepl(paste(c("Energy use", "CO2
# emissions"),collapse = "|"), Indicator_Name, ignore.case = TRUE)
USclim <- filter (worldclim, grepl("United States", Country_Name) & grepl(paste(c("Population, total", "Energy use \\(kg of oil equivalent per capita\\)", "CO2 emissions \\(metric tons per capita\\)"), collapse = "|"), Indicator_Name))
# scale the Indicator values for clearer graphs
USclimodf <- within(USclim, {
f <- Indicator_Name == 'Population, total'
quantity[f] <- quantity[f]/10^6}) #Population in million
USclimodf <- within(USclimodf, {
f <- Indicator_Name == 'Energy use (kg of oil equivalent per capita)'
quantity[f] <- quantity[f]/25}) # Energy use: multiply 25 kg Oil-E-P-Capita
USclimodf <- within(USclimodf, {
f <- Indicator_Name == 'CO2 emissions (metric tons per capita)'
quantity[f] <- quantity[f]*10}) # CO2 emission: multiply 0.1 ton Per Capita
USclimodf$f <- NULL # remove the added column 'f'
USclimgrp <- group_by(USclimodf, Indicator_Name, year) # not absolutely necessary if not followed by aggregation
head(USclimgrp)
## # A tibble: 6 x 6
## # Groups: Indicator_Name, year [6]
## Country_Name Country_Code Indicator_Name Indicator_Code year quantity
## <chr> <chr> <chr> <chr> <dbl> <dbl>
## 1 United States USA Population, total SP.POP.TOTL 1960 181.
## 2 United States USA CO2 emissions (metri… EN.ATM.CO2E.PC 1960 160.
## 3 United States USA Energy use (kg of oi… EG.USE.PCAP.K… 1960 226.
## 4 United States USA Population, total SP.POP.TOTL 1961 184.
## 5 United States USA CO2 emissions (metri… EN.ATM.CO2E.PC 1961 157.
## 6 United States USA Energy use (kg of oi… EG.USE.PCAP.K… 1961 224.
p0 <- ggplot(data=USclimgrp,aes(x=year, y=quantity, color=Indicator_Name)) +
theme_linedraw() +
geom_point() +
geom_line() +
facet_wrap(~ Indicator_Name, scales = "free_y",
labeller = labeller(Indicator_Name = label_wrap_gen(width = 60))) +
theme (axis.text.x = element_text(angle = 90, hjust = 1), axis.title.x = element_blank()) +
scale_x_continuous(guide = guide_axis(check.overlap = TRUE )) +
theme(legend.position="bottom", legend.title = element_blank())
# Notes: tried facet_grid - useful for more than one country
# facet_grid(Indicator_Name ~ Country_Name, margins=TRUE, scales = "free_y")
# scale_x_discrete(guide = guide_axis(n.dodge = 6 )) # x-label was too cluttered
# geom_smooth(aes(x=year, y=quantity, color=Indicator_Name)) # smooth is less precise
p0
# describeBy(USclimgrp[,3:6],'Indicator_Name') # basic statistics
by(USclimgrp[,3:6], USclimgrp[,'Indicator_Name'], summary) # basic statistics
## Indicator_Name: CO2 emissions (metric tons per capita)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :155.0
## Class :character Class :character 1st Qu.:1975 1st Qu.:181.2
## Mode :character Mode :character Median :1990 Median :193.2
## Mean :1990 Mean :190.1
## 3rd Qu.:2005 3rd Qu.:198.6
## Max. :2020 Max. :225.1
## NA's :4
## ------------------------------------------------------------
## Indicator_Name: Energy use (kg of oil equivalent per capita)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :224.5
## Class :character Class :character 1st Qu.:1975 1st Qu.:282.8
## Mode :character Mode :character Median :1990 Median :306.1
## Mean :1990 Mean :296.9
## 3rd Qu.:2005 3rd Qu.:313.8
## Max. :2020 Max. :337.5
## NA's :5
## ------------------------------------------------------------
## Indicator_Name: Population, total
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :180.7
## Class :character Class :character 1st Qu.:1975 1st Qu.:215.4
## Mode :character Mode :character Median :1990 Median :248.2
## Mean :1990 Mean :253.8
## 3rd Qu.:2005 3rd Qu.:293.5
## Max. :2020 Max. :328.2
## NA's :1
p1 <- ggplot(data=USclimgrp,aes(x=year, y=quantity, color=Indicator_Name, alpha = Indicator_Name=='Population, total')) + # reduce the alpha only for Population
theme_dark() +
geom_point(size = 3) +
geom_line() +
scale_alpha_manual(values = c(1, .4), guide=FALSE) +
theme (axis.text.x = element_text(angle = 0, hjust = 0.5), axis.title.x = element_blank()) +
scale_x_continuous(guide = guide_axis(check.overlap = TRUE)) +
# scale_y_continuous(sec.axis= sec_axis(~.*25, name ="Energy Use and CO2 Emissions, per capita")) + # adding a second y axis became more cluttered, so showing only one y axis
ylab("Population, Energy Use and CO2 Emissions") +
theme(legend.position="bottom", legend.title = element_blank()) +
theme(plot.subtitle=element_text(hjust = 0.05)) +
# set the order and labels of Indicators in the legend using scale_color_discrete
scale_color_discrete(
limits = c('Population, total', 'Energy use (kg of oil equivalent per capita)', 'CO2 emissions (metric tons per capita)'),
labels = c('Population (Million)', 'Energy use per capita (/25 kg oil equivalent)', 'CO2 emissions per capita (*10 ton)')) +
labs(title="Fig. 1 - US Population, Energy Use and Emissions", subtitle = "A 55-Year History Showing Promise",
caption = "Source: World Bank, https://data.worldbank.org/topic/climate-change")
p1
ggplotly(p1)
USsocioec <- filter (worldclim, grepl("United States", Country_Name) & grepl(paste(c("Urban population \\(% of total population\\)", "Mortality rate, under-5 \\(per 1,000 live births\\)", "Population in urban agglomerations of more than 1 million \\(% of total population\\)","^Population living in areas where elevation is below 5 meters \\(% of total population\\)","Access to electricity \\(% of population\\)"), collapse = "|"), Indicator_Name, ignore.case = TRUE))
str(USsocioec)
## 'data.frame': 305 obs. of 6 variables:
## $ Country_Name : chr "United States" "United States" "United States" "United States" ...
## $ Country_Code : chr "USA" "USA" "USA" "USA" ...
## $ Indicator_Name: chr "Urban population (% of total population)" "Mortality rate, under-5 (per 1,000 live births)" "Population in urban agglomerations of more than 1 million (% of total population)" "Population living in areas where elevation is below 5 meters (% of total population)" ...
## $ Indicator_Code: chr "SP.URB.TOTL.IN.ZS" "SH.DYN.MORT" "EN.URB.MCTY.TL.ZS" "EN.POP.EL5M.ZS" ...
## $ year : num 1960 1960 1960 1960 1960 ...
## $ quantity : num 70 30.1 38.7 NA NA ...
p2 <- ggplot(data=USsocioec,aes(x=year, y=quantity, color=Indicator_Name)) +
theme_linedraw() +
geom_point() +
geom_line() +
facet_wrap(~ Indicator_Name, scales = "free_y",
labeller = labeller(Indicator_Name = label_wrap_gen(width = 60))) +
theme (axis.text.x = element_text(angle = 90, hjust = 1), axis.title.x = element_blank()) +
scale_x_continuous(guide = guide_axis(check.overlap = TRUE )) +
theme(legend.position="bottom", legend.title = element_blank())
p2
by(USsocioec[,3:6], USsocioec[,'Indicator_Name'], summary) # basic statistics
## USsocioec[, "Indicator_Name"]: Access to electricity (% of population)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :100
## Class :character Class :character 1st Qu.:1975 1st Qu.:100
## Mode :character Mode :character Median :1990 Median :100
## Mean :1990 Mean :100
## 3rd Qu.:2005 3rd Qu.:100
## Max. :2020 Max. :100
## NA's :32
## ------------------------------------------------------------
## USsocioec[, "Indicator_Name"]: Mortality rate, under-5 (per 1,000 live births)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 6.500
## Class :character Class :character 1st Qu.:1975 1st Qu.: 8.075
## Mode :character Mode :character Median :1990 Median :11.400
## Mean :1990 Mean :14.038
## 3rd Qu.:2005 3rd Qu.:19.025
## Max. :2020 Max. :30.100
## NA's :1
## ------------------------------------------------------------
## USsocioec[, "Indicator_Name"]: Population in urban agglomerations of more than 1 million (% of total population)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :38.73
## Class :character Class :character 1st Qu.:1975 1st Qu.:41.23
## Mode :character Mode :character Median :1990 Median :42.11
## Mean :1990 Mean :42.48
## 3rd Qu.:2005 3rd Qu.:44.02
## Max. :2020 Max. :46.49
## NA's :1
## ------------------------------------------------------------
## USsocioec[, "Indicator_Name"]: Population living in areas where elevation is below 5 meters (% of total population)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :2.502
## Class :character Class :character 1st Qu.:1975 1st Qu.:2.507
## Mode :character Mode :character Median :1990 Median :2.513
## Mean :1990 Mean :2.530
## 3rd Qu.:2005 3rd Qu.:2.544
## Max. :2020 Max. :2.575
## NA's :58
## ------------------------------------------------------------
## USsocioec[, "Indicator_Name"]: Urban population (% of total population)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :70.00
## Class :character Class :character 1st Qu.:1975 1st Qu.:73.65
## Mode :character Mode :character Median :1990 Median :75.19
## Mean :1990 Mean :76.37
## 3rd Qu.:2005 3rd Qu.:79.80
## Max. :2020 Max. :82.46
## NA's :1
USclimagric <- filter (worldclim, grepl("United States", Country_Name) & grepl(paste(c("Terrestrial and marine protected areas \\(% of total territorial area\\)","Marine protected areas \\(% of territorial waters\\)","Terrestrial protected areas \\(% of total land area\\)","Forest area \\(sq. km\\)", "Agricultural land \\(sq. km\\)", "Rural land area where elevation is below 5 meters \\(sq. km\\)", "Average precipitation in depth \\(mm per year\\)", "Annual freshwater withdrawals, total \\(billion cubic meters\\)", "Cereal yield \\(kg per hectare\\)" ), collapse = "|"), Indicator_Name, ignore.case = TRUE))
str(USclimagric)
## 'data.frame': 549 obs. of 6 variables:
## $ Country_Name : chr "United States" "United States" "United States" "United States" ...
## $ Country_Code : chr "USA" "USA" "USA" "USA" ...
## $ Indicator_Name: chr "Terrestrial and marine protected areas (% of total territorial area)" "Marine protected areas (% of territorial waters)" "Terrestrial protected areas (% of total land area)" "Annual freshwater withdrawals, total (billion cubic meters)" ...
## $ Indicator_Code: chr "ER.PTD.TOTL.ZS" "ER.MRN.PTMR.ZS" "ER.LND.PTLD.ZS" "ER.H2O.FWTL.K3" ...
## $ year : num 1960 1960 1960 1960 1960 ...
## $ quantity : num NA NA NA NA NA NA NA NA NA NA ...
p3 <- ggplot(data=USclimagric, aes(x=year, y=quantity, color=Indicator_Name)) +
theme_linedraw() +
geom_point() +
geom_line() +
facet_wrap(~ Indicator_Name, scales = "free_y",
labeller = labeller(Indicator_Name = label_wrap_gen(width = 60))) +
theme (axis.text.x = element_text(angle = 90, hjust = 1), axis.title.x = element_blank()) +
scale_x_continuous(guide = guide_axis(check.overlap = TRUE )) +
theme(legend.position="bottom", legend.title = element_blank())
p3
by(USclimagric[,3:6], USclimagric[,'Indicator_Name'], summary) # basic statistics
## USclimagric[, "Indicator_Name"]: Agricultural land (sq. km)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :4046693
## Class :character Class :character 1st Qu.:1975 1st Qu.:4137434
## Mode :character Mode :character Median :1990 Median :4269480
## Mean :1990 Mean :4237117
## 3rd Qu.:2005 3rd Qu.:4313990
## Max. :2020 Max. :4475090
## NA's :5
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Annual freshwater withdrawals, total (billion cubic meters)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :418.7
## Class :character Class :character 1st Qu.:1975 1st Qu.:465.1
## Mode :character Mode :character Median :1990 Median :473.5
## Mean :1990 Mean :470.7
## 3rd Qu.:2005 3rd Qu.:478.6
## Max. :2020 Max. :517.6
## NA's :56
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Average precipitation in depth (mm per year)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :715
## Class :character Class :character 1st Qu.:1975 1st Qu.:715
## Mode :character Mode :character Median :1990 Median :715
## Mean :1990 Mean :715
## 3rd Qu.:2005 3rd Qu.:715
## Max. :2020 Max. :715
## NA's :49
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Cereal yield (kg per hectare)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :2522
## Class :character Class :character 1st Qu.:1975 1st Qu.:3683
## Mode :character Mode :character Median :1990 Median :4645
## Mean :1990 Mean :4894
## 3rd Qu.:2005 3rd Qu.:5912
## Max. :2020 Max. :8281
## NA's :4
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Forest area (sq. km)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :3024500
## Class :character Class :character 1st Qu.:1975 1st Qu.:3031559
## Mode :character Mode :character Median :1990 Median :3042686
## Mean :1990 Mean :3054828
## 3rd Qu.:2005 3rd Qu.:3083237
## Max. :2020 Max. :3103700
## NA's :34
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Marine protected areas (% of territorial waters)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :41.06
## Class :character Class :character 1st Qu.:1975 1st Qu.:41.06
## Mode :character Mode :character Median :1990 Median :41.06
## Mean :1990 Mean :41.07
## 3rd Qu.:2005 3rd Qu.:41.07
## Max. :2020 Max. :41.08
## NA's :58
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Rural land area where elevation is below 5 meters (sq. km)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :91676
## Class :character Class :character 1st Qu.:1975 1st Qu.:91676
## Mode :character Mode :character Median :1990 Median :91676
## Mean :1990 Mean :91676
## 3rd Qu.:2005 3rd Qu.:91676
## Max. :2020 Max. :91676
## NA's :58
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Terrestrial and marine protected areas (% of total territorial area)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :26.33
## Class :character Class :character 1st Qu.:1975 1st Qu.:26.33
## Mode :character Mode :character Median :1990 Median :26.33
## Mean :1990 Mean :26.33
## 3rd Qu.:2005 3rd Qu.:26.33
## Max. :2020 Max. :26.33
## NA's :58
## ------------------------------------------------------------
## USclimagric[, "Indicator_Name"]: Terrestrial protected areas (% of total land area)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :12.97
## Class :character Class :character 1st Qu.:1975 1st Qu.:12.98
## Mode :character Mode :character Median :1990 Median :12.99
## Mean :1990 Mean :12.99
## 3rd Qu.:2005 3rd Qu.:12.99
## Max. :2020 Max. :12.99
## NA's :58
USenrgemiss <- filter (worldclim, grepl("United States", Country_Name) & grepl(paste(c("GHG net emissions/removals by LUCF \\(Mt of CO2 equivalent\\)","SF6 gas emissions \\(thousand metric tons of CO2 equivalent\\)","Nitrous oxide emissions \\(thousand metric tons of CO2 equivalent\\)","Methane emissions \\(kt of CO2 equivalent\\)", "PFC gas emissions \\(thousand metric tons of CO2 equivalent\\)", "HFC gas emissions \\(thousand metric tons of CO2 equivalent\\)", "Total greenhouse gas emissions \\(kt of CO2 equivalent\\)", "Other greenhouse gas emissions, HFC, PFC and SF6 \\(thousand metric tons of CO2 equivalent\\)","CO2 emissions from solid fuel consumption \\(kt\\)","CO2 emissions from liquid fuel consumption \\(kt\\)", "CO2 emissions \\(kt\\)","CO2 emissions from gaseous fuel consumption \\(kt\\)","CO2 intensity \\(kg per kg of oil equivalent energy use\\)","Energy use \\(kg of oil equivalent per capita\\)","Electric power consumption \\(kWh per capita\\)","Renewable energy consumption \\(% of total final energy consumption\\)","Electricity production from renewable sources, excluding hydroelectric \\(% of total\\)","Renewable electricity output \\(% of total electricity output\\)","Electricity production from oil sources \\(% of total\\)", "Electricity production from nuclear sources \\(% of total\\)","Electricity production from natural gas sources \\(% of total\\)","Electricity production from hydroelectric sources \\(% of total\\)","Electricity production from coal sources \\(% of total\\)"), collapse = "|"), Indicator_Name, ignore.case = TRUE))
str(USenrgemiss)
## 'data.frame': 1403 obs. of 6 variables:
## $ Country_Name : chr "United States" "United States" "United States" "United States" ...
## $ Country_Code : chr "USA" "USA" "USA" "USA" ...
## $ Indicator_Name: chr "GHG net emissions/removals by LUCF (Mt of CO2 equivalent)" "SF6 gas emissions (thousand metric tons of CO2 equivalent)" "PFC gas emissions (thousand metric tons of CO2 equivalent)" "Nitrous oxide emissions (thousand metric tons of CO2 equivalent)" ...
## $ Indicator_Code: chr "EN.CLC.GHGR.MT.CE" "EN.ATM.SF6G.KT.CE" "EN.ATM.PFCG.KT.CE" "EN.ATM.NOXE.KT.CE" ...
## $ year : num 1960 1960 1960 1960 1960 1960 1960 1960 1960 1960 ...
## $ quantity : num NA NA NA NA NA ...
p4 <- ggplot(data=USenrgemiss, aes(x=year, y=quantity, color=Indicator_Name)) +
theme_linedraw() +
geom_point() +
geom_line() +
facet_wrap(~ Indicator_Name, scales = "free_y",
labeller = labeller(Indicator_Name = label_wrap_gen(width = 50))) +
theme (axis.text.x = element_text(angle = 90, hjust = 1), axis.title.x = element_blank()) +
scale_x_continuous(guide = guide_axis(check.overlap = TRUE )) +
theme(legend.position="bottom", legend.title = element_blank())
p4
USenrgemiss2 <- filter (worldclim, grepl("United States", Country_Name) & grepl(paste(c("Nitrous oxide emissions \\(thousand metric tons of CO2 equivalent\\)","Methane emissions \\(kt of CO2 equivalent\\)", "Total greenhouse gas emissions \\(kt of CO2 equivalent\\)", "Other greenhouse gas emissions, HFC, PFC and SF6 \\(thousand metric tons of CO2 equivalent\\)","CO2 emissions from solid fuel consumption \\(kt\\)","CO2 emissions from liquid fuel consumption \\(kt\\)", "CO2 emissions \\(kt\\)","CO2 emissions from gaseous fuel consumption \\(kt\\)","CO2 intensity \\(kg per kg of oil equivalent energy use\\)","Energy use \\(kg of oil equivalent per capita\\)","Electric power consumption \\(kWh per capita\\)","Renewable energy consumption \\(% of total final energy consumption\\)","Electricity production from renewable sources, excluding hydroelectric \\(% of total\\)", "Electricity production from oil sources \\(% of total\\)", "Electricity production from nuclear sources \\(% of total\\)","Electricity production from natural gas sources \\(% of total\\)","Electricity production from hydroelectric sources \\(% of total\\)","Electricity production from coal sources \\(% of total\\)"), collapse = "|"), Indicator_Name, ignore.case = TRUE))
p5 <- ggplot(data=USenrgemiss2, aes(x=year, y=quantity, color=Indicator_Name)) +
theme_linedraw() +
geom_point() +
geom_line() +
facet_wrap(~ Indicator_Name, scales = "free_y",
labeller = labeller(Indicator_Name = label_wrap_gen(width = 50))) +
theme (axis.text.x = element_text(angle = 90, hjust = 1), axis.title.x = element_blank()) +
scale_x_continuous(guide = guide_axis(check.overlap = TRUE )) +
theme(legend.position="bottom", legend.title = element_blank())
p5
by(USenrgemiss2[,3:6], USenrgemiss2[,'Indicator_Name'], summary) # basic statistics
## USenrgemiss2[, "Indicator_Name"]: CO2 emissions (kt)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :2880506
## Class :character Class :character 1st Qu.:1975 1st Qu.:4406330
## Mode :character Mode :character Median :1990 Median :4890861
## Mean :1990 Mean :4734172
## 3rd Qu.:2005 3rd Qu.:5263505
## Max. :2020 Max. :5789727
## NA's :4
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: CO2 emissions from gaseous fuel consumption (kt)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 630541
## Class :character Class :character 1st Qu.:1975 1st Qu.: 907443
## Mode :character Mode :character Median :1990 Median :1060078
## Mean :1990 Mean :1056871
## 3rd Qu.:2005 3rd Qu.:1179494
## Max. :2020 Max. :1498556
## NA's :4
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: CO2 emissions from liquid fuel consumption (kt)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :1282680
## Class :character Class :character 1st Qu.:1975 1st Qu.:1963084
## Mode :character Mode :character Median :1990 Median :2099024
## Mean :1990 Mean :2058767
## 3rd Qu.:2005 3rd Qu.:2271032
## Max. :2020 Max. :2494601
## NA's :4
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: CO2 emissions from solid fuel consumption (kt)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 888169
## Class :character Class :character 1st Qu.:1975 1st Qu.:1197261
## Mode :character Mode :character Median :1990 Median :1626050
## Mean :1990 Mean :1568979
## 3rd Qu.:2005 3rd Qu.:1842422
## Max. :2020 Max. :2123574
## NA's :4
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: CO2 intensity (kg per kg of oil equivalent energy use)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :2.349
## Class :character Class :character 1st Qu.:1975 1st Qu.:2.494
## Mode :character Mode :character Median :1990 Median :2.538
## Mean :1990 Mean :2.574
## 3rd Qu.:2005 3rd Qu.:2.701
## Max. :2020 Max. :2.836
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electric power consumption (kWh per capita)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 4050
## Class :character Class :character 1st Qu.:1975 1st Qu.: 8486
## Mode :character Mode :character Median :1990 Median :10887
## Mean :1990 Mean :10318
## 3rd Qu.:2005 3rd Qu.:13002
## Max. :2020 Max. :13705
## NA's :6
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electricity production from coal sources (% of total)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :34.23
## Class :character Class :character 1st Qu.:1975 1st Qu.:46.17
## Mode :character Mode :character Median :1990 Median :51.85
## Mean :1990 Mean :50.14
## 3rd Qu.:2005 3rd Qu.:53.69
## Max. :2020 Max. :57.68
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electricity production from hydroelectric sources (% of total)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 4.904
## Class :character Class :character 1st Qu.:1975 1st Qu.: 6.860
## Mode :character Mode :character Median :1990 Median : 9.342
## Mean :1990 Mean :10.775
## 3rd Qu.:2005 3rd Qu.:14.747
## Max. :2020 Max. :18.881
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electricity production from natural gas sources (% of total)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 9.464
## Class :character Class :character 1st Qu.:1975 1st Qu.:14.022
## Mode :character Mode :character Median :1990 Median :17.344
## Mean :1990 Mean :18.051
## 3rd Qu.:2005 3rd Qu.:22.088
## Max. :2020 Max. :31.942
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electricity production from nuclear sources (% of total)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 0.06928
## Class :character Class :character 1st Qu.:1975 1st Qu.: 5.78017
## Mode :character Mode :character Median :1990 Median :17.85061
## Mean :1990 Mean :13.05711
## 3rd Qu.:2005 3rd Qu.:19.33008
## Max. :2020 Max. :20.64701
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electricity production from oil sources (% of total)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. : 0.7743
## Class :character Class :character 1st Qu.:1975 1st Qu.: 2.9480
## Mode :character Mode :character Median :1990 Median : 4.8342
## Mean :1990 Mean : 6.2606
## 3rd Qu.:2005 3rd Qu.: 7.5342
## Max. :2020 Max. :17.1673
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Electricity production from renewable sources, excluding hydroelectric (% of total)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :0.01526
## Class :character Class :character 1st Qu.:1975 1st Qu.:0.14469
## Mode :character Mode :character Median :1990 Median :0.47065
## Mean :1990 Mean :1.55117
## 3rd Qu.:2005 3rd Qu.:2.13576
## Max. :2020 Max. :7.38696
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Energy use (kg of oil equivalent per capita)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :5612
## Class :character Class :character 1st Qu.:1975 1st Qu.:7069
## Mode :character Mode :character Median :1990 Median :7652
## Mean :1990 Mean :7421
## 3rd Qu.:2005 3rd Qu.:7845
## Max. :2020 Max. :8438
## NA's :5
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Methane emissions (kt of CO2 equivalent)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :499809
## Class :character Class :character 1st Qu.:1975 1st Qu.:551332
## Mode :character Mode :character Median :1990 Median :589557
## Mean :1990 Mean :581408
## 3rd Qu.:2005 3rd Qu.:605428
## Max. :2020 Max. :637636
## NA's :18
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Nitrous oxide emissions (thousand metric tons of CO2 equivalent)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :288878
## Class :character Class :character 1st Qu.:1975 1st Qu.:319030
## Mode :character Mode :character Median :1990 Median :343161
## Mean :1990 Mean :339738
## 3rd Qu.:2005 3rd Qu.:358582
## Max. :2020 Max. :390504
## NA's :18
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Other greenhouse gas emissions, HFC, PFC and SF6 (thousand metric tons of CO2 equivalent)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :-90110
## Class :character Class :character 1st Qu.:1975 1st Qu.:135415
## Mode :character Mode :character Median :1990 Median :189626
## Mean :1990 Mean :227156
## 3rd Qu.:2005 3rd Qu.:283104
## Max. :2020 Max. :580952
## NA's :18
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Renewable energy consumption (% of total final energy consumption)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :4.089
## Class :character Class :character 1st Qu.:1975 1st Qu.:4.691
## Mode :character Mode :character Median :1990 Median :5.454
## Mean :1990 Mean :5.958
## 3rd Qu.:2005 3rd Qu.:7.227
## Max. :2020 Max. :8.754
## NA's :35
## ------------------------------------------------------------
## USenrgemiss2[, "Indicator_Name"]: Total greenhouse gas emissions (kt of CO2 equivalent)
## Indicator_Name Indicator_Code year quantity
## Length:61 Length:61 Min. :1960 Min. :5400504
## Class :character Class :character 1st Qu.:1975 1st Qu.:5803574
## Mode :character Mode :character Median :1990 Median :6185748
## Mean :1990 Mean :6267232
## 3rd Qu.:2005 3rd Qu.:6718882
## Max. :2020 Max. :7244272
## NA's :18
# select population, energy total and electric
USenergy <- filter (worldclim, grepl("United States", Country_Name) & grepl(paste(c("Population, total", "Energy use \\(kg of oil equivalent per capita\\)","Electric power consumption \\(kWh per capita\\)"), collapse = "|"), Indicator_Name))
# Obtain total energy by multiplying Population * energy per capita
# Convert units of energy to QUAD in the indicators
# conversion factors: 1 kWh = 3.412*10^-12 QUAD
# 1 kg Oil Equiv = 39.686*10-12 QUAD
USenermdf <- within(USenergy, {
f <- Indicator_Name == 'Population, total'
g <- Indicator_Name == 'Electric power consumption (kWh per capita)'
quantity[g] <- quantity[f]*quantity[g]*3.412*(10^-12)}) # elec energy in Quads
USenermdf <- within(USenermdf, {
f <- Indicator_Name == 'Population, total'
g <- Indicator_Name == 'Electric power consumption (kWh per capita)'
h <- Indicator_Name == 'Energy use (kg of oil equivalent per capita)'
quantity[h] <- quantity[f]*quantity[h]*39.686*(10^-12) - quantity[g]}) # Energy Tot-Elec Quads
USenermdf <- filter(USenermdf, ! Indicator_Name == "Population, total") # remove Population from the plot
p6 <- ggplot(USenermdf, aes(x=year, y=quantity, fill= factor(Indicator_Name))) +
geom_area(stat="identity", color = "white") +
theme_dark() +
theme (axis.text.x = element_text(angle = 0, hjust = 0.5, size = 10), axis.title.x = element_blank()) +
theme (axis.text.y = element_text(size =10)) +
scale_x_continuous(guide = guide_axis(check.overlap = FALSE )) +
ylab("Energy Consumed in the USA (QUAD)") +
theme(legend.position="top", legend.title = element_blank(), legend.text = element_text(size=10)) +
# set the order and labels of Indicators in the legend using scale_fill_discrete
scale_fill_discrete(
limits = c('Electric power consumption (kWh per capita)', 'Energy use (kg of oil equivalent per capita)'),
labels = c('Electric Energy', 'Non-Electric Energy') )+
labs(title="Fig. 2 - Electric Energy Fraction is Increasing",
caption = "1 QUAD = 10^15 BTU = 2.52*10^7 Ton Oil Equiv = 2.93*10^8 MWh \n Source: World Bank, https://data.worldbank.org/topic/climate-change")
p6
ggplotly(p6)
R. Miranda December 15, 2020
World Bank “Climate Change” indicators, https://data.worldbank.org/topic/climate-change
The 2014 assessment report of the Intergovernmental Panel on Climate Change (IPCC), which followed the Paris Agreement, reiterated the ambitious goal set in the 2007 report of limiting the extent of global warming to less than 2 degrees Celsius above pre-industrial levels [1]. Special studies that are ongoing in preparation for a 2022 assessment report have concluded that a more drastic limit of 1.5 degrees Celsius is imperative. The key finding in all reports is that human influence on the climate system is clear; that not acting now imposes severe risks and irreversible impacts; and that we have the means to respond to the threat of climate change while building a sustainable and prosperous future for all humankind.
Among the 17 sustainability goals of the United Nations [2], goal 13 is to take urgent action to combat climate change and its impacts, but it is intimately linked to other goals, such as ending poverty and inequality everywhere, promoting sustainable agriculture, water availability, sustainable energy, sustainable industrialization, cities, forests, oceans and ecosystems. Climate change is likely to affect developing countries the worst. Global cooperation across borders will become increasingly critical, in order to identify a global solution as well as individual solutions tailored to the needs of the various countries.
Temperature rise above the normal historic cycles is but one indicator of human influence. The underlying cause for temperature rise is an excess of gases such as CO2, methane, chlorofluorocarbons and others that produce a greenhouse effect, trapping heat in the atmosphere. The leading cause of excessive greenhouse gases (GHG) has been the combustion of carbon-containing fuels; combustion has produced the majority of the energy necessary for the rapid industrial and economic growth of the past 150 years.
Hence one approach to ameliorate GHG accumulation has been the transition towards carbon-free or carbon-neutral fuels, which started to accelerate 30 years ago. Another approach has been the increasing efficiency with which energy and raw materials are being used for transportation, industry, construction, communications, agriculture, houses, buildings, consumables, that is, all aspects of modern societies. A third important approach has been to increase absorption of GHG by land and oceans, for example with more forests and treated waters. Yet other approaches have been to convert CO2 back to chemicals (artificial photosynthesis), inject it underground to assist oil and gas extraction, or permanently trap it as carbonate minerals. Despite such initial efforts, we are far from reaching the sustainable path promoted by the IPCC.
This project is an initial step to examine the measurable quantities identified by the World Bank as descriptors or indicators of causes and effects of climate change. In this initial step the analysis is limited to the USA. Understanding how the various causes and effects have progressed over the past 55 years is instructive and may motivate more personal action.
The World Bank “Climate Change” dataset includes over 20,000 records of 66 variables (wide format) and 75 indicators covering a broad range of aspects: social factors, types of gaseous emissions, land and agricultural measures, and energy production and consumption measures. It lacks several of the economic factors, such as GDP and various industrial and commercial productivity measures. Some of the highly relevant factors, such as arable or habitable land changes, floods, disasters, are not well populated, preventing significant inference from them. The dataset covers over 170 countries, but data are scarce for many of them, particularly during the 1960-1990 period.
All of the indicators are defined in the metadata file available at the github link for this project, https://github.com/raul-miranda/DS110Project3 and are not reproduced here.
As a starting step, this project was focused on the USA, or about 25,000 records covering all of the indicators during the entire time period.
In order to obtain an impression of the 55-year evolution, we isolated the three indicators and scaled their values appropriately for a clear graphical depiction in a scatterplot format. Notice that in the exploratory plots, Population is expressed in million, while Energy use expressed as kg oil equivalent per capita must be multiplied by 25, and CO2 emission expressed as ton per capita must be divided by 10.
Fig. 1 shows that while the US population grew linearly over the entire time period, the energy use per capita had drastic variations. Energy use increased by over 50% in the 1960s, reaching its peak in 1973, when the two oil crises of 1973 and 1979 caused it to descend by 20%. Energy use then rose slowly in the 1980-2000 period up to 10% below its 1973 peak. Since 2000 energy use per capita has been steadily decreasing and is now at the level it was in 1968. This has been made possible by progress in all technologies that are making more efficient use of energy, even with a constantly rising standard of living. The CO2 emission curve shows a parallel trend to that of energy use, an indication that CO2 emission is mainly due to total combustion of carbon-containing fuels. The very encouraging sign is that CO2 emission per capita is at a level equivalent to that of 1960. This is due not only to more efficient use of energy but also to active approaches to reduce the CO2 emitted per unit of energy, by substituting coal by liquid fuels, and more recently, natural gas. The transition from coal-based energy supply to liquid and gas energy supply over the last decades was studied and shown in Project 2. In this third project, we are being surprised by the drastic decrease shown by the data for energy use and CO2 emission per capita.
We wanted to see whether the consequences of global warming, such as temperature rise and ocean level rise, would be reflected in the basic socioeconomic measures available within this dataset. The general conclusion is that the data available for the US alone does not allow a logical correlation between those indicators and global warming. Perhaps a broader study including all of the countries would be more informative.
For the US, access to electricity has been 100% over the entire time period. Population living in areas less than 5 m above sea level has been an average of 2.53%, growing from 2.50 to 2.58% in 55 years, perhaps an indication of sea level rise, although the population may have chosen to move closer to the low-level areas.
The rapid decrease in mortality rate under the age of 5 from 30 to 6 deaths per 1000 live births has clearly been the consequence of increasing standard of living (access to health services) and more advanced medical technology. From the Gapminder case study, we saw that mortality rate has decreased globally, although some countries have seen lower rate of progress, and in some cases a reversal has occurred in some of the war-ridden areas.
A clear marker of a growing and more affluent population is the rapid urbanization of society. The US has averaged 76% of the population living in urban areas, growing from 70% to 82% in 55 years. An average of 42% live in cities of more than a million, rising from 38% to 46%. One would expect that energy use and GHG emission per person would be higher in urban environments, and even higher with hotter temperatures. However, the trends seen in Figure 1 oppose such assumption, and it seems surprising.
The question in mind was how agricultural factors influence global warming and vice versa. Following my introductory comments, it is expected that extensive development of rural areas for agriculture will ameliorate greenhouse gases and thus help to combat global warming. This dataset shows some encouraging but also other discouraging signs.
Agricultural land has decreased about 10% over 55 years, perhaps associated with more of the population living in urban localities. However, land productivity (measured by cereal yield) has more than tripled from 2522 to 8281 kg per hectare, due to advanced agricultural technology. The energy cost and CO2 emissions per kg of cereal (and related food sources) have likely decreased.
The other good trend is the rise of forest land, albeit only by 3.5%, not sufficiently to absorb the excess of emitted CO2. Planned reforestation is, however, an effective approach that should be enlarged.
Average freshwater withdrawal has averaged 470 billion cubic meters, decreasing from 518 to 419 in 35 years, but the data is insufficient to show that global warming is the cause.
These indicators are likely very informative when comparing countries at various levels of economic development, particularly to compare changes in agricultural and forestation practices.
The question to explore was what specific greenhouse gases are emitted and which electrical energy sources are used in the US. Identifying the specific gases may lead to more targeted technologies. Electricity is an energy carrier and intrinsically has no GHG consequence during use. However, the means by which it is produced leads to different amounts of GHG emission.
An initial set of 23 indicators included separate charts for CFC, SF6 and HFC, which are fluorocarbons and sulfur fluoride emitted from chemicals and materials produced for electronic manufacturing, refrigerants, house and car insulation, plastic insulation of electrical cables, etc. They have a significant global warming effect, but the amount emitted is a small fraction compared to CO2 and methane emissions. Thus the set was reduced to 18 indicators that included a cumulative curve for HFC, PFC and SF6.
Other indicators included CO2 emissions from gaseous, liquid and solid fuels separately; methane emissions; and nitrous oxide emissions.
The electricity sources included coal, hydroelectric, natural gas, nuclear, oil, and renewable sources.
Visual examination of the various trends allowed us to draw the following conclusions.
The total CO2 emissions chart resembles the trace observed in Fig. 1 (emissions per capita) but multiplied by population. Thus, after a drop in total CO2 emissions that started in 2005, the current level is equivalent to the 1992 emissions, still a very encouraging sign of progress.
Examining the emissions from the various types of fuels, it can be concluded that liquid sources (oil) led to the rapid rise in the 1960-1980 period, while coal sources and natural gas produced the increases in 1980-2000. The continuous decrease after 2005 is due to the substitution of coal by natural gas. Natural gas produces less CO2 than coal or liquid hydrocarbons for the same amount of energy generated.
A fantastic trend is shown by CO2 intensity, which is the amount of CO2 emitted per unit of energy used (mean value: 2.6 kg of CO2 per kg of oil equivalent). Over the past 50 years, it has been continuously decreasing from 2.8 to 2.3 kg/kg. As reflected when examining Fig. 1, this is a sign of technological advancement, and of using more carbon-neutral and carbon-free fuels.
Methane and nitrous oxide: both have global warming effects larger than CO2 but are emitted in lesser quantities. As depicted in the charts, they represent 10% and 6%, respectively, of the corresponding amounts of CO2 and have been continuously decreasing since the early 1990s down to 8% and 5% of the amounts of CO2. While nitrous oxide is a product of combustion, like CO2, methane is released primarily through leaks in pipelines and at flares in refineries. Current regulations curtail flaring methane and are having an impact.
The chlorofluorocarbons, on the other hand, are increasing, and in aggregate represent about 10% of the corresponding amount of CO2. This is a source which could be better regulated by governments and controlled by electrical and building insulator manufacturers and users.
An examination of the charts reveals that coal sources predominated (>50% supply) since 1960 until 2005, and then have fallen to 35% supply during recent years. Oil sources upsurged in 1970-1980 (up to 15% supply). Natural gas sources have varied from 20% in 1960 to 10% in 1995 and are on the upsurge to 30% supply today, and rising. Nuclear sources did not start until 1970 and have risen to 20% and are continuing steady at present. Hydroelectric sources were popular in 1960 (15% supply) but have decreased continuously to about 5% at present. Other renewables, particularly solar sources that started in 1995, and wind sources that started recently, have increased continuously up to 9% of all electrical energy at present.
The electrical and non-electrical energy consumed in the US are compared in Fig. 2. The calculation involved multiplying energies per capita by population for each year. To obtain the non-electrical energy, the electrical energy was subtracted from the total energy consumed in the US. The units for both types of energy were converted to Quad for proper comparison (1 Quad = 10^15 BTU).
The figure shows that the fraction of electrical energy has been increasing since 1960, it is now at 16% of all energy used in the US, and the pace is accelerating. This is a good sign. As discussed in the previous section, the rise of natural gas and the emergence of solar energy are leading to less CO2 and nitrous oxide emissions. The downward trend shown by the CO2 intensity chart is indicative of continuous technological progress.
As new technologies are advanced, such as solar and wind sources, and more carbon-neutral fuels are used, progress will surely accelerate further. This, coupled with global practices such as reforestation, complete capture and conversion of CO2 from all point sources and open air, and appropriate alignment with international agreements, this planet is on route to managing global warming and climate change within this century.
This project was an initial step in analyzing the indicators provided by World Bank in the “climate change” dataset, and it was limited to the USA. With the current dataset, it remains to expand the analysis to the world. Use of geographical visualization tools would immensely improve the impact of this project.
As indicated earlier, this dataset could be complemented with other datasets from World Bank that measure better the trends in agriculture, land use, societal trends, and economic factors. With more data, correlations would lead to better understanding the effects that climate change are having on societal, agricultural and economic indicators, appropriately separating climate change related causes from other causes.