Impacts of Climate Change in World Regions; A report by Sunday Babatunde Benjamin.
Climate Change and its Impacts in World Regions
According to the United Nations, Climate change refers to long-term shifts in temperatures and weather patterns. Such shifts can be natural, due to changes in the sun’s activity or large volcanic eruptions. But since the 1800s, human activities have been the main driver of climate change, primarily due to the burning of fossil fuels like coal, oil, and gas.
The consequences of climate change now include, among others, intense droughts, water scarcity, severe fires, rising sea levels, flooding, melting polar ice, catastrophic storms, and declining biodiversity.
You work for a Non-governmental organization tasked with reporting the state of climate change in Africa at the upcoming African Union Summit. The head of analytics has provided you with IEA-EDGAR CO2 dataset which you will clean, combine and analyze to create a report on the state of climate change in Africa. You will also provide insights on the impact of climate change on African regions (with four countries, one from each African region, as case studies).
Dataset
The dataset, IEA-EDGAR CO2, is a component of the EDGAR (Emissions Database for Global Atmospheric Research) Community GHG database version 7.0 (2022) including or based on data from IEA (2021) Greenhouse Gas Emissions from Energy, www.iea.org/statistics, as modified by the Joint Research Centre. The data source was the EDGARv7.0_GHG website provided by Crippa et. al. (2022) and with DOI.
The dataset contains three sheets - IPCC 2006, 1PCC 1996, and TOTALS BY COUNTRY on the amount of CO2 (a greenhouse gas) generated by countries between 1970 and 2021. You can download the dataset from your workspace or inspect the dataset directly here.
TOTALS BY COUNTRY SHEET
This sheet contains the annual CO2 (kt) produced between 1970 - 2021 in each country. The relevant columns in this sheet are:
| Columns | Description |
|---|---|
C_group_IM24_sh | The region of the world |
Country_code_A3 | The country code |
Name | The name of the country |
Y_1970 - Y_2021 | The amount of CO2 (kt) from 1970 - 2021 |
IPCC 2006
These sheets contain the amount of CO2 by country and the industry responsible.
| Columns | Description |
|---|---|
C_group_IM24_sh | The region of the world |
Country_code_A3 | The country code |
Name | The name of the country |
Y_1970 - Y_2021 | The amount of CO2 (kt) from 1970 - 2021 |
ipcc_code_2006_for_standard_report_name | The industry responsible for generating CO2 |
1 hidden cell
# Setup
library(dplyr)
library(readxl)
library(readr)
library(tidyr)
library(ggplot2)
library(assertthat)
library(broom)
library(stringr)logistics_industries = c("Int. Shipping", "Int. Aviation")all_regions = read_xlsx("IEA_EDGAR_CO2_1970-2021.xlsx",
sheet = 'IPCC 2006', skip = 10) %>%
filter(!C_group_IM24_sh %in% logistics_industries)all_regions data set
all_regions# Reading in the data into R
totals_by_country_all_regions = read_xlsx("IEA_EDGAR_CO2_1970-2021.xlsx",
sheet = 'TOTALS BY COUNTRY', skip = 10) %>%
filter(!C_group_IM24_sh %in% logistics_industries)totals_by_country_all_regions data set
totals_by_country_all_regions# Cleaning the data
# for the all_regions data set
all_regions = all_regions %>%
rename(Region = C_group_IM24_sh,
Code = Country_code_A3,
Industry = ipcc_code_2006_for_standard_report_name) %>%
select(-1,-5, -7) %>%
gather(key = "Year", value = "CO2", 6:Y_2021) %>%
drop_na() %>%
mutate(Year = as.integer(str_remove(Year, "Y_")))
# From the stringr package (EXAMPLE for Two Steps)
#ipcc_2006_africa$Year = str_replace(ipcc_2006_africa$Year, "Y_", " ")
#ipcc_2006_africa$Year = as.integer(ipcc_2006_africa$Year)
# EXAMPLE FOR ONE STEP
# OR (1) ############
# ipcc_2006_africa %>%
# mutate(Year = as.integer(str_replace(Year, "Y_", " ")))
# OR (2) ###########
# ipcc_2006_africa %>%
# mutate(Year = as.integer(str_remove(Year, "Y_")))
# B PART
# For the totals_by_country_all_regions data set
totals_by_country_all_regions = totals_by_country_all_regions %>%
rename(Region = C_group_IM24_sh,
Code = Country_code_A3) %>%
select(-1,-5) %>%
gather(key = "Year", value = "CO2", 4:Y_2021) %>%
drop_na() %>%
mutate(Year = as.integer(str_remove(Year, "Y_")))
Reshaped Data for both "all_regions" and "totals_by_country_all_regions" data sets respectively
all_regions;totals_by_country_all_regionsThe trend of CO2 levels across all Regions