# A tibble: 86 × 26
Time ...2 `1995` `1996` `1997` `1998` `1999` `2000` `2001` `2002`
<chr> <lgl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Country NA NA NA NA NA NA NA NA NA
2 WLD: W… NA 2.14e4 2.18e4 2.22e4 2.24e4 2.25e4 2.32e4 2.36e4 2.39e4
3 OECD: … NA 1.30e4 1.33e4 1.35e4 1.37e4 1.40e4 1.46e4 1.44e4 1.44e4
4 AUS: A… NA 2.78e2 2.84e2 2.98e2 3.22e2 3.20e2 3.24e2 3.22e2 3.40e2
5 AUT: A… NA 8.51e1 8.94e1 8.36e1 8.57e1 8.37e1 8.39e1 8.57e1 8.44e1
6 BEL: B… NA 1.30e2 1.32e2 1.27e2 1.31e2 1.27e2 1.27e2 1.25e2 1.21e2
7 CAN: C… NA 4.09e2 4.17e2 4.36e2 4.39e2 4.46e2 4.57e2 4.50e2 4.71e2
8 CHL: C… NA 3.99e1 4.62e1 5.31e1 5.66e1 5.59e1 5.39e1 5.10e1 5.37e1
9 COL: C… NA 6.55e1 6.56e1 7.22e1 7.23e1 5.97e1 5.99e1 6.11e1 6.09e1
10 CRI: C… NA 8.05e0 7.77e0 8.17e0 9.12e0 9.01e0 8.71e0 8.84e0 9.31e0
# … with 76 more rows, and 16 more variables: `2003` <dbl>, `2004` <dbl>,
# `2005` <dbl>, `2006` <dbl>, `2007` <dbl>, `2008` <dbl>, `2009` <dbl>,
# `2010` <dbl>, `2011` <dbl>, `2012` <dbl>, `2013` <dbl>, `2014` <dbl>,
# `2015` <dbl>, `2016` <dbl>, `2017` <dbl>, `2018` <dbl>
view(OECD_emissions_trade_based_raw)
#omitting data that has no value OECD_emissions_trade_actual <- OECD_emissions_trade_based_raw %>%select(-`...2`) |>filter(Time !="Country")#renaming column to match the data OECD_emissions_trade_actual <- OECD_emissions_trade_actual %>%rename(geography = Time)view(OECD_emissions_trade_actual)
# A tibble: 85 × 1
geography
<chr>
1 WLD: World
2 OECD: OECD member countries
3 AUS: Australia
4 AUT: Austria
5 BEL: Belgium
6 CAN: Canada
7 CHL: Chile
8 COL: Colombia
9 CRI: Costa Rica
10 CZE: Czech Republic
# … with 75 more rows
#standarizing geography to geography codegeography_tda_2 <- geography_tda |>separate(col = geography, into =c("geography_code", "geography_name"), sep =":", remove =FALSE) |>mutate(across(c("geography_code", "geography_name"), str_trim))geography_tda_2
# A tibble: 85 × 3
geography geography_code geography_name
<chr> <chr> <chr>
1 WLD: World WLD World
2 OECD: OECD member countries OECD OECD member countries
3 AUS: Australia AUS Australia
4 AUT: Austria AUT Austria
5 BEL: Belgium BEL Belgium
6 CAN: Canada CAN Canada
7 CHL: Chile CHL Chile
8 COL: Colombia COL Colombia
9 CRI: Costa Rica CRI Costa Rica
10 CZE: Czech Republic CZE Czech Republic
# … with 75 more rows
#creating country code index functiongeography_tda_2 |>mutate(country_name =countrycode(sourcevar = geography_code, origin ="iso3c", destination ="country.name")) |>filter(is.na(country_name))
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `country_name = countrycode(sourcevar = geography_code, origin =
"iso3c", destination = "country.name")`.
Caused by warning in `countrycode_convert()`:
! Some values were not matched unambiguously: APEC, ASEAN, DATA EXTRACTED ON 05 MAR 2023 17, EA19, EASIA, EU13, EU15, EU27_2020, EU28, G20, NONOECD, OECD, ROW, WLD, ZASI, ZEUR, ZNAM, ZOTH, ZSCA
# A tibble: 19 × 4
geography geogr…¹ geogr…² count…³
<chr> <chr> <chr> <chr>
1 WLD: World WLD World <NA>
2 OECD: OECD member countries OECD OECD m… <NA>
3 NONOECD: Non-OECD economies and aggregates NONOECD Non-OE… <NA>
4 ROW: Rest of the World ROW Rest o… <NA>
5 APEC: Asia-Pacific Economic Cooperation APEC Asia-P… <NA>
6 ASEAN: Association of South East Asian Nations ASEAN Associ… <NA>
7 EASIA: Eastern Asia EASIA Easter… <NA>
8 EU27_2020: European Union (27 countries) EU27_2… Europe… <NA>
9 EU28: European Union (28 countries) EU28 Europe… <NA>
10 EU15: European Union (15 countries) EU15 Europe… <NA>
11 EU13: EU28 excluding EU15 EU13 EU28 e… <NA>
12 EA19: Euro area (19 countries) EA19 Euro a… <NA>
13 G20: Group of Twenty G20 Group … <NA>
14 ZEUR: Europe ZEUR Europe <NA>
15 ZASI: East and Southeastern Asia ZASI East a… <NA>
16 ZNAM: North America ZNAM North … <NA>
17 ZSCA: South and Central America ZSCA South … <NA>
18 ZOTH: Other regions ZOTH Other … <NA>
19 Data extracted on 05 Mar 2023 17:31 UTC (GMT) from O… Data e… 31 UTC… <NA>
# … with abbreviated variable names ¹geography_code, ²geography_name,
# ³country_name
#standarizing and adding country name and ISO code further geography_proc <- geography_tda_2 |>mutate(country_name =countrycode(sourcevar = geography_code, origin ="iso3c", destination ="country.name")) |>mutate(country_or_region =if_else(is.na(country_name), true ="region",false ="country")) |>mutate(country_name =if_else(is.na(country_name),true = geography_name,false = country_name)) |>select(geography, country_name, iso3c = geography_code, country_or_region)
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `country_name = countrycode(sourcevar = geography_code, origin =
"iso3c", destination = "country.name")`.
Caused by warning in `countrycode_convert()`:
! Some values were not matched unambiguously: APEC, ASEAN, DATA EXTRACTED ON 05 MAR 2023 17, EA19, EASIA, EU13, EU15, EU27_2020, EU28, G20, NONOECD, OECD, ROW, WLD, ZASI, ZEUR, ZNAM, ZOTH, ZSCA
geography_proc
# A tibble: 85 × 4
geography country_name iso3c country_or_region
<chr> <chr> <chr> <chr>
1 WLD: World World WLD region
2 OECD: OECD member countries OECD member countries OECD region
3 AUS: Australia Australia AUS country
4 AUT: Austria Austria AUT country
5 BEL: Belgium Belgium BEL country
6 CAN: Canada Canada CAN country
7 CHL: Chile Chile CHL country
8 COL: Colombia Colombia COL country
9 CRI: Costa Rica Costa Rica CRI country
10 CZE: Czech Republic Czechia CZE country
# … with 75 more rows
step3_ <- geography_proc |>left_join(OECD_emissions_trade_actual, by ="geography") |>select(-geography)step3_
# A tibble: 85 × 27
count…¹ iso3c count…² `1995` `1996` `1997` `1998` `1999` `2000` `2001` `2002`
<chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 World WLD region 2.14e4 2.18e4 2.22e4 2.24e4 2.25e4 2.32e4 2.36e4 2.39e4
2 OECD m… OECD region 1.30e4 1.33e4 1.35e4 1.37e4 1.40e4 1.46e4 1.44e4 1.44e4
3 Austra… AUS country 2.78e2 2.84e2 2.98e2 3.22e2 3.20e2 3.24e2 3.22e2 3.40e2
4 Austria AUT country 8.51e1 8.94e1 8.36e1 8.57e1 8.37e1 8.39e1 8.57e1 8.44e1
5 Belgium BEL country 1.30e2 1.32e2 1.27e2 1.31e2 1.27e2 1.27e2 1.25e2 1.21e2
6 Canada CAN country 4.09e2 4.17e2 4.36e2 4.39e2 4.46e2 4.57e2 4.50e2 4.71e2
7 Chile CHL country 3.99e1 4.62e1 5.31e1 5.66e1 5.59e1 5.39e1 5.10e1 5.37e1
8 Colomb… COL country 6.55e1 6.56e1 7.22e1 7.23e1 5.97e1 5.99e1 6.11e1 6.09e1
9 Costa … CRI country 8.05e0 7.77e0 8.17e0 9.12e0 9.01e0 8.71e0 8.84e0 9.31e0
10 Czechia CZE country 1.05e2 1.09e2 1.06e2 9.98e1 9.61e1 1.02e2 1.03e2 1.02e2
# … with 75 more rows, 16 more variables: `2003` <dbl>, `2004` <dbl>,
# `2005` <dbl>, `2006` <dbl>, `2007` <dbl>, `2008` <dbl>, `2009` <dbl>,
# `2010` <dbl>, `2011` <dbl>, `2012` <dbl>, `2013` <dbl>, `2014` <dbl>,
# `2015` <dbl>, `2016` <dbl>, `2017` <dbl>, `2018` <dbl>, and abbreviated
# variable names ¹country_name, ²country_or_region
# A tibble: 2,040 × 5
country_name iso3c country_or_region year value
<chr> <chr> <chr> <int> <dbl>
1 World WLD region 1995 21367.
2 World WLD region 1996 21815.
3 World WLD region 1997 22214.
4 World WLD region 1998 22391.
5 World WLD region 1999 22527.
6 World WLD region 2000 23240.
7 World WLD region 2001 23587.
8 World WLD region 2002 23924.
9 World WLD region 2003 24956.
10 World WLD region 2004 26130.
# … with 2,030 more rows
# A tibble: 1 × 4
Indicator Indus…¹ Partner Unit
<chr> <chr> <chr> <chr>
1 FD_CO2: CO2 emissions embodied in domestic final demand… DTOTAL… WLD: W… Tonn…
# … with abbreviated variable name ¹Industry
oecd_metadata_jenny <-tribble(~my_indicator_name,"CO2 from international trade")oecd_metadata_jenny
# A tibble: 1 × 1
my_indicator_name
<chr>
1 CO2 from international trade
# A tibble: 2,016 × 9
country_name iso3c country_or_re…¹ year value indic…² indus…³ partner unit
<chr> <chr> <chr> <int> <dbl> <chr> <chr> <chr> <chr>
1 World WLD region 1995 21367. FD_CO2… DTOTAL… WLD: W… Tonn…
2 World WLD region 1996 21815. FD_CO2… DTOTAL… WLD: W… Tonn…
3 World WLD region 1997 22214. FD_CO2… DTOTAL… WLD: W… Tonn…
4 World WLD region 1998 22391. FD_CO2… DTOTAL… WLD: W… Tonn…
5 World WLD region 1999 22527. FD_CO2… DTOTAL… WLD: W… Tonn…
6 World WLD region 2000 23240. FD_CO2… DTOTAL… WLD: W… Tonn…
7 World WLD region 2001 23587. FD_CO2… DTOTAL… WLD: W… Tonn…
8 World WLD region 2002 23924. FD_CO2… DTOTAL… WLD: W… Tonn…
9 World WLD region 2003 24956. FD_CO2… DTOTAL… WLD: W… Tonn…
10 World WLD region 2004 26130. FD_CO2… DTOTAL… WLD: W… Tonn…
# … with 2,006 more rows, and abbreviated variable names ¹country_or_region,
# ²indicator, ³industry
GDP_PPP_raw <-read_excel("gdp_by_ppp.xlsx", sheet ="Data", skip =3)library(dplyr)#getting rid of empty data columnsGDP_PPP <- GDP_PPP_raw %>%select(-matches("^196[0-9]$"), -matches("^197[0-9]$"), -matches("^198[0-9]$"))#country year and GDP PPP are all columns GDP_PPP <- GDP_PPP %>%pivot_longer("1990":"2021",names_to ="year",values_to ="GDP_PPP_dollars")GDP_PPP <- GDP_PPP %>%na.omit()GDP_PPP <- GDP_PPP %>%select(-c("Indicator Name", "Indicator Code")) %>%rename(country_name ="Country Name", iso3c ="Country Code")view(GDP_PPP)
Introduction
International trade generates GHG emissions. Emissions from international trade are complex and goes beyond emissions from production and international transportation. Trade affects where production is taking place and, if carbon intensity of production is not the same everywhere, this also affects the level of emissions. Therefore, tracking and measuring the GHGs emitted during the production and consumption of goods and services is a complex task since production often involves multiple inputs and may be carried out in different places.
Carbon emission accounting measures the amount of GHG emissions embedded in international activities, along with other economic activities, by estimating the level of GHGs emitted during production, transport and consumption along supply chains in and between countries. According a study done in 2011 and 2018, carbon emission accounting studies suggest that aboug 20-30 per cent of total carbon dioxide emissions are associated with international trade, with developing economies tending to emit more GHG emissions per unit of output than developed economies. For the purpose of this paper, I will be addressing governments across the globe to invest in carbon-free international trade methods.
# Convert the year column in GDP_PPP to integer bc it said an error when i tried it without GDP_PPP <- GDP_PPP %>%mutate(year =as.integer(year))trade_oecd_gdp_ppp <-full_join(step4_, GDP_PPP, by =c("year"="year", "country_name"="country_name", "iso3c"="iso3c"))trade_oecd_gdp_ppp <- trade_oecd_gdp_ppp %>%na.omit()trade_oecd_gdp_ppp <- trade_oecd_gdp_ppp %>%rename("emission_based_on_trade"="value")view(trade_oecd_gdp_ppp)
#saving as csv filewrite.csv(trade_oecd_gdp_ppp, "trade_oecd_gdp_ppp.csv", row.names =FALSE)
Graph 1 shows, based on the data analyzed in the plot, it appears that as GDP per PPP has increased over time, emissions based on trade have also risen. The plot shows a positive correlation between the two variables, with higher levels of GDP per PPP generally corresponding to higher levels of emissions based on trade. This trend may be driven by several factors, such as increased international trade and globalization, rising consumer demand for goods and services, and changes in production methods and technology. It is important to note, however, that correlation does not necessarily is equal to causation, and further analysis would be needed to establish the precise relationship between GDP per PPP and emissions based on trade.
trade_oecd_gdp_ppp %>%filter(country_name =="World") %>%ggplot(aes(x = emission_based_on_trade, y = GDP_PPP_dollars, color = year)) +geom_point(na.rm =TRUE) +geom_smooth(na.rm =TRUE) +labs(title ="Graph 1")
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Warning: The following aesthetics were dropped during statistical transformation: colour
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
It is interesting to note that in 1995, the United States was the largest emitter based on trade, a fact that underscores the significant changes that have taken place in the global economy over the past few decades. In the mid-1990s, the United States was the world’s largest economy and a major exporter of emissions-intensive products such as automobiles and heavy machinery. The high level of emissions associated with U.S. trade in this period may have reflected these factors, as well as the growing importance of international trade to the U.S. economy. It is worth noting that the issue of emissions and trade was not yet a major concern for policymakers, At the time, the Kyoto Protocol, an international treaty aimed at reducing greenhouse gas emissions, had just been signed but had not gone into effect. The protocol did not include provisions specifically addressing emissions based on trade, and it would take years until the concept of climate change and carbon footprint would be a concern for policymakers and the general public alike.
trade_oecd_gdp_ppp %>%filter(year =="1995"& country_name !="World") %>%ggplot(aes(x= country_name, y = GDP_PPP_dollars, fill = country_name)) +geom_bar(stat ="identity") +labs(x ="Country", y ="Emission based on trade", title ="Graph 2: Emissions based on trade by country in 1995") +theme(axis.text.x =element_text(angle =90, vjust =0.5, hjust=1, size=10))
In the year 2015, data taken twenty years after graph 2, China and the United States were the two largest emitters based on trade. Since 1995, the global economy has become more integrated, with many countries including China and other emerging economies becoming major players in international trade. As a result, the pattern of emissions based on trade has shifted, with China and the United States emerging as the two largest emitters in more recent years. China was responsible for the largest volume of emissions associated with exports, followed closely by the United States. This finding is not surprising, given that China and the United States are two of the largest economies in the world and major trading partners with many countries. The high levels of emissions based on trade in these countries may reflect their significant contributions to global supply chains and the production of emissions-intensive goods such as steel, cement, and electronics.
The year 2015 was also the year Paris Agreement was adopted. The Paris Agreement seeked to limit global warming to well below 2 degrees Celsius above pre-industrial levels, with a target of 1.5 degrees Celsius. Furthermore, it called to address emissions associated with international trade, such as calling for increased cooperation between countries on issues related to climate change, including emissions from international trade.
Since the adoption of the Paris Agreement, there have been several policy actions taken at the national and international levels aimed at reducing emissions from international trade. For example, some countries have implemented carbon pricing schemes or emissions trading systems that seek to account for emissions associated with imports and exports. International organizations such as the World Trade Organization (WTO) and the International Maritime Organization (IMO) have also taken steps to address emissions from international trade, including through the development of international standards and guidelines for shipping and other transportation modes. Overall, the issue of emissions from international trade is likely to remain an important area of focus for policymakers in the coming years as efforts to address climate change continue to intensify.
trade_oecd_gdp_ppp %>%filter(year =="2015"& country_name !="World") %>%ggplot(aes(x= country_name, y = emission_based_on_trade, fill = country_name)) +geom_bar(stat ="identity") +labs(x ="Country", y ="Emission based on trade", title ="Graph 3: Emissions based on trade by country in 2015") +theme(axis.text.x =element_text(angle =90, vjust =0.5, hjust=1, size=10))
It was worth mentioning China since it is the biggest emitter in regard to trade. China has experienced a rapid economic rise over the past few decades, becoming the world’s second-largest economy and a major player in global trade. As its economy has grown, China’s emissions have also increased, making it the world’s largest emitter of greenhouse gases. Much of China’s emissions come from the industrial and manufacturing sectors, which have expanded rapidly to support the country’s export-oriented economy. China has taken steps to address its environmental challenges, including introducing stricter environmental regulations and investing in renewable energy sources. Despite these efforts, China’s emissions remain high, and the country faces significant challenges in balancing economic growth with environmental sustainability. As a major player in global trade, China’s approach to emissions reductions will be a critical factor in efforts to address climate change on a global scale.
trade_oecd_gdp_ppp %>%filter(country_name =="China") %>%ggplot(aes(x = year)) +geom_line(aes(y = emission_based_on_trade, color ="Emissions based on trade"), na.rm =TRUE) +geom_line(aes(y = GDP_PPP_dollars/1000000000, color ="GDP (PPP) per capita (billions of dollars)"), na.rm =TRUE) +scale_color_manual(values =c("red", "blue")) +labs(color ="", title ="Graph 4: Emissions based on trade and GDP per capita (PPP) over time in China") +ylab("Emissions based on trade\nGDP (PPP) per capita (billions of dollars)") +theme(legend.position ="bottom")
Graph 5 depicts a comparison of emissions based on trade and GDP per capita by country in 2018, which is the most recent data available after matching up the two datasets. The graph reveals that China and the United States continue to be the largest outliers, with the highest emissions based on trade and GDP per capita. Despite the efforts to reduce carbon emissions in recent years, China’s economy has grown significantly, and this growth has resulted in a surge in carbon emissions. Similarly, the United States’ economy has been expanding over the years, accompanied by an increase in carbon emissions. China and the United States continue to be the two biggest emitters based on trade, far outpacing other countries in terms of emissions per unit of GDP. The graph suggests that these two countries are facing major challenges in reducing their carbon footprint while maintaining their economic growth.
library(scales)
Attaching package: 'scales'
The following object is masked from 'package:purrr':
discard
The following object is masked from 'package:readr':
col_factor
trade_oecd_gdp_ppp %>%filter(year =="2018"& country_name !="World") %>%ggplot(aes(x = emission_based_on_trade, y = GDP_PPP_dollars, color = country_name)) +geom_point(na.rm =TRUE, alpha =0.6) +scale_x_continuous(labels = comma) +scale_y_continuous(labels = comma) +labs(x ="Emissions based on trade", y ="GDP per capita (PPP dollars)", title ="Graph 5: Emissions based on trade vs GDP per capita by country in 2018") +theme_bw()
In conclusion, as certain countries and overall world GDP per PPP get higher, so does the emissions based on trade. While I am still a firm believer in globalization and world trade, we cannot deny that nternational trade has contributed to the rise in global emissions. While some countries have successfully managed to reduce their carbon footprint while maintaining their economic growth, others remain major emitters. As the world moves towards a low-carbon economy, investing in carbon-free trade presents a significant opportunity to reduce emissions while promoting economic growth. Developing and implementing policies that incentivize carbon-free trade can accelerate the transition to a more sustainable future. By working towards a low-carbon economy, countries can not only reduce their carbon footprint but also improve the health and well-being of their citizens, protect the environment, and support sustainable economic growth.