Introduction

Column

Why this matters?

Recently, Trump claimed that the United States will withdraw from the Paris Climate Agreement. The public began to worry about the carbon emission will rise significantly in the near future. This news reminded me of the air pollution in my home country, China. People kept saying about developing countries sacrificed their environment for more energy production and economic development. However, I like thinking critically instead of guessing based on common sense. I’d love to dig more into the data to see if the country’s development is contradicted with the environment. I’ll take China as my target country.

Primary Concern: What’s the relationship among industrial development, energy consumption, and Co2 emission?

Additional Concerns:

  • How’s the development of sustainable energy?

  • What will be the effects that the United States withdraw from the Paris Climate Agreement?

What does the results mean to me/us?

I used to play around small hills and beautiful forests near my parents’ countryside home when I was very young. About 5 years ago, all those sceneries became mud, trucks, and noises. The climate became very hot in summer. We took all the kids to the city since their faces could never be cleaned by polluted water near the village. I was shocked and angry. I believe the industrial development hurts our environment but I also hope new energy/technology will emerge to save our future. I hope there’s a balance point between benefits and the environment.

From this analysis, we can have a clearer understanding of our energy and environment situation. I touched on industries so that we know the relationship between industrial development and Co2 emission. During my research, I also found some interesting topics, such as the relationship between Service sector and its energy consumption and Co2 emission; the relationship between energy production type and its Co2 emission.

Extra Study I also researched on additional topics based on my concerns.

  • The trends of renewable/clean energies

  • Comparing the Co2 emission of the United States with other similar countries.

Column

Resources

These data were retrieved from The World Bank’s databank. They were updated frequently (latest update was June 01, 2017). As the major data are available from 1990 to 2012, my research only used data from 1990 to 2012.

How?

  • Methods:
    • Descriptive analysis:
      • Descriptive graphs are used to show the changes of variables by time.
    • Predictive (Regression) analysis:
      • ANOVA analysis to figure out the relationship among industry development, energy consumption and Co2 emission.
  • Visualization tools: scatterplot, line, bar chart,table, geomap, etc.

Packages Used

library(tidyr)      #tidy unclean data into a clean 
library(dplyr)      #do data transformation, help format a needed dataframe
library(ggplot2)    #make elegant graphs
library(readr)      #import dataset into R
library(readxl)     #import Excel files into R
library(magrittr)   #pipe dataframe to functions
library(plotly)     #initiate a plotly visualization
library(flexdashboard)   #create interactive dashboards
library(DT)         #show dataframe in a nicer way

Package “tidyverse” includes: tidyr, dplyr, ggplot2, readr, readxl, magrittr

Data Preparation

Column

Importing Data

Datasets information:

  • The original GDPCO2.csv dataset has 26 variables, observations from 1990 to 2012, some sentences at the bottom.

  • The original energy_sector.csv dataset has 30 variables, observations from 1990 to 2012, some sentences at the bottom.

Both datasets were sorted by Year (Time) and have very complicated and long variable names. In this part, I cleaned the datasets by drop unuseful lines and variables, merged 3 different datasets into 1 master dataframe, and changed variable names to readable names.

#Import data of GDP and Co2
GDPCO2<- read.csv("GDPCO2.csv") 
#Select useful variables and observations
GDP <- GDPCO2[c(1:23),c(3,5:10,11,12,14:26)]
#Import data of energy consumption
energy_sector <- read.csv("energy_sector.csv")                
#Select useful variables and observations
energy_sector1 <- energy_sector[-c(24:28),c(3,5,7:12,14,16,18,21,22,24,27,29)]
#Merge both dataframe together by sorted variable "Time"
Total <- merge(GDP, energy_sector1, by = "Time")       
#Import data for the extra study on Co2 per capita of countries
countriesCo2 <- read.csv("Countries.csv",
                      col.names = c("Year","Year_code","Country","Code","Co2","Co2_per_capita"))

 #Write the merged file to a .csv file; read the new .csv file into R; change the complex names to recognizable names
write_csv(Total, "Total.csv")                                                     
Totaltable <- read.csv("Total.csv",                         
                col.names=c("Time","Agriculture","GDP_per_capita","GDP","GDP_growth","Industry","Service","Population_growth","Population","CO2_transportp","CO2_gasp","CO2_solidp","CO2_solid","CO2_others","CO2_gas","CO2_manu_consp","CO2_elec_heatp","CO2_rcpp","CO2","CO2_liqp","CO2_per_capita_mt","CO2_agri","Biogas","Agricultural_MJ","Industrial_MJ","Residential_MJ","Service_MJ","Transportation_MJ","Geothermal","Hydro","Liquid_Biofuel","Marine","Renewable","Solar","TFEC","Solid_Biofuel","Wind"))

The clean master dataframe includes 29 variables, 23 observations (1990-2012).

The dataset “countries” has 6 variables, 20 observations (20 countries).

Tidying Data

Problems:

  • Same type of variables sometimes have different unit.

  • Some variables need to be converted from %percentage to the original amount.

I transformed the percentage GDP to dollar amounts by multiplying the total GDP back; transformed the percentage Co2 to amount unit by multiplying the total Co2; changed all energy units to “MJ” unit.

#Change the variables to make sure same type of variables have same units
Totaltable2 <- Totaltable %>%               
  transmute(
    Time = Time,
    Agriculture = Agriculture * GDP /100,
    Industry = Industry * GDP /100,
    Service = Service * GDP /100,
    Population = Population,
    GDP = GDP,
    CO2_transport = CO2_transportp * CO2,
    CO2_others = CO2_others * CO2,
    CO2_manu_cons = CO2_manu_consp * CO2,
    CO2_elec_heat = CO2_elec_heatp * CO2,
    CO2_rcp = CO2_rcpp * CO2,
    Agricultural_MJ = Agricultural_MJ * GDP,
    Industrial_MJ = Industrial_MJ * GDP,
    Residential_MJ = Residential_MJ* 1000 * Population / 3,
    Service_MJ = Service_MJ * GDP,
    Transportation_MJ = Transportation_MJ * GDP,
    TFEC = TFEC * 1000000,
    CO2 = CO2,
    Biogas = Biogas,
    Geothermal = Geothermal,
    Hydro = Hydro,
    Liquid_Biofuel = Liquid_Biofuel,
    Marine = Marine,
    Renewable = Renewable,
    Solar = Solar,
    Solid_Biofuel = Solid_Biofuel,
    Wind = Wind)

Column

Data

Data Dictionary

Variable Name Description Type
Time Year Integer
Agriculture Agriculture’s Contribution to Total GDP Numeric
Industry Industry’s Contribution to Total GDP Numeric
Service Service’s Contribution to Total GDP Numeric
Population Population Integer
GDP Gross Domestic Production Numeric
CO2_transport Co2 Emission from Transportation Numeric
CO2_others Co2 from Other than Resi, Comme, Publ Services Numeric
CO2_manu_cons Co2 Emission from Manufacturing and Construction Numeric
CO2_elec_heat Co2 Emission from Electricity and Heat Production Numeric
CO2_rcp Co2 Emission from Resi, Comme, Publ Services Numeric
Agricultural_MJ Energy Consumption of Agricultural Sector Numeric
Industrial_MJ Energy Consumption of Industrial Sector Numeric
Residential_MJ Energy Consumption of Residential Sector Numeric
Service_MJ Energy Consumption of Service Sector Numeric
Transportation_MJ Energy Consumption of Transportation Sector Numeric
TFEC Total Final Energy Consumption Numeric
CO2 Total Co2 Emission Numeric
Biogas Biogas Energy Consumption Numeric
Geothermal Geothermal Energy Consumption Numeric
Hydro Hydro Energy Consumption Numeric
Liquid_Biofuel Liquid Biofuel Energy Consumption Numeric
Marine Marine Energy Consumption Numeric
Renewable Renewable Energy Consumption Numeric
Solar Solar Energy Consumption Numeric
Solid_Biofuel Solid Biofuel Energy Consumption Numeric
Wind Wind Energy Consumption Numeric
Country Country Names Character
Co2_per_capita Co2 Emission Divided by Population Numeric

Exploratory Analysis

GDP Growth by Sectors: From this section, you’ll see the GDP growth of sector Agriculture, Industry and Service in these 23 years.


Observation:

  • All three sectors are growing.
  • Both industry and service sectors increased rapidly, with agriculture falling far behind.

We can clearly see that China shifted its focus to industry and service rather than agriculture.

As a country famous for its manufacturing export, it’s normal to see the dramatic increase in industry sector; however, I’m surprised by the growth of the service sector. So, I took a further step to study the service sector in China.

According to the report CHINA SERVICES SECTOR ANALYSIS written by International Trade Center, the service sector has actually been constrained by the manufacturing industry and some barriers for international service trade. Nevertheless, since the Chinese government signed to join the World Trade Organization in 2011, the service export has inclined significantly. The Chinese government set its 12th Five-Year Plan to include developing key services, such as finance, logistics, education, construction, healthcare, transport, and tourism.The report admitted that the service sector is growing strongly, but it also mentions the service growth “is still smaller than it should be for an economy at China’s stage of economic development”.

In the graph, we can see that the service sector caught up with the industry sector in 2012. Lookin at the trend lines, I believe the service sector will become stronger and stronger till it conforms with China’s stage of economic development nowadays.

CO2 Emission by Sectors: Carbon dioxide is the most significant long-lived greenhouse gas. Its concentration in the Earth atmosphere has inclined dramatically after the industrialization.


Observation:

  • Co2 emitted from electricity and heat production always ranks the highest among sectors.
  • The overall trend of Co2 emission of the manufacturing is upward, with a significant turning point in 2002.
  • Unlike its growth in GDP, the service sector (Co2_transport & part of the CO2_rcp) show little growth in its Co2 emission.

Not surprised to see the Co2-manufacture sector climbing up in the past years since factories need fuels to motivate machines. The turning point at 2002 might be caused by joining World Trade Organization in 2001.

The observations above also brought me to think whether different types of fuels produce different amount of Co2. The Co2 from electricity and heat production is very high. I personally believe it’s because the production mainly uses coal. In the same way, I believe the service sector emitted less Co2 because it doesn’t need to operate large machines and it’s using petrol and natural gas most of the time.

Coal produced more Co2 comparing to petrol and natural gas. Here’s a chart from U.S. Energy Information Administration:

Fuel (million British thermal units of energy ) Pounds of CO2 emitted
Coal (anthracite) 228.6
Coal (bituminous) 205.7
Coal (lignite) 215.4
Coal (subbituminous) 214.3
Diesel fuel and heating oil 161.3
Gasoline (without ethanol) 157.2
Propane 139.0
Natural gas 117.0

Energy Consumption by Sectors: This section is going to check energy consumption among agriculture, industry, residence, service, and transportation.


Observation:

  • Transportation used a significant portion of the energy production.
  • Industry’s energy consumption increases by time. Similar to the Co2 trend line, it has a turning point around 2002.
  • The other sectors nearly have no growth in energy consumption.

The industry line is very similar to its GDP and Co2 emission lines. I assume they are highly related. To my surprise, the service sector is not using much energy. That might because the motivator/most valuable resources in the service sector is human resources. Energy is not very critical to service businesses.

The transportation is climbing rapidly, ranks the highest among all sectors. This trend started very early, earlier than 1990. China was once called “the Kingdom of Bicycles” because most people can only afford bicycles at that time. As the economy gets better, people tend to change their transportation tools. There are so many vehicles on the roads and the public transportation is also very advanced nowadays.

1980s vs. 2010s

Industry’s GDP vs. Energy vs. Co2: This part is to analyze the relationship between industry GDP and Co2; industrial energy consumption and Co2.

TWO-WAY ANOVA Analysis:

                       Df    Sum Sq   Mean Sq F value   Pr(>F)    
Industry                1 1.296e+17 1.296e+17 2375.61  < 2e-16 ***
Industrial_MJ           1 4.605e+15 4.605e+15   84.42 2.02e-08 ***
Industry:Industrial_MJ  1 1.219e+15 1.219e+15   22.35 0.000146 ***
Residuals              19 1.036e+15 5.455e+13                     
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

From the two-way ANOVA analysis, I find that the relationships are really strong:

  • The p-value for Industry is < 2e-16, less than 0.001, which indicates that the levels of industry GDP are associated with Co2 emission at a significance level of 0.001.The correlation is also very high:
         CO2_manu_cons
Industry     0.9745348
  • The p-value for Industry_MJ is 2.02e-08, which indicates that the levels of industrial energy consumption are associated with Co2 emission at a significance level of 0.001. The correlation is very high:
              CO2_manu_cons
Industrial_MJ     0.9916706
  • The p-value for the interaction between Industry*Industrial_MJ is 0.000146, which indicates that the relationship between industry GDP and Co2 emission depends on the value of industrial energy consumption.
         Industrial_MJ
Industry     0.9840749
  • Because the interaction effect between industry GDP and industrial energy consumption is statistically significant, I cannot interpret the main effects without considering the interaction effect. I assume it is a higher industry GDP needs more energy to support, more energy production will cause a higher Co2 emission as machines consume lots of energy.

Extra Study: Development of New Energies


From the study, I find that China started using solid biofuel and hydro energy earlier than 1990. These two energies developed quickly and now become the significant energy sources. To investigate deeper, I’d suggest you deselect solid biofuel and hydro in the graph.

Now, you can see the relationship between the bar chart and the renewable energy line. As more clean energies were introduced, the renewable energy production is increasing year by year, especially solar energy and biogas.

If you have an interest checking each new energy’s trend, you can simply deselect every energy and select the one you want.

Extra Study: Co2 Emission of The Top 20 Countries.

Mapping Graph

Top 20 countries include:

United Arab Emirates, China, Germany, United Kingdom, Israel, Russian Federation, Japan, Saudi Arabia, United States, France, Canada, Korea, Rep., Iran, Islamic Rep., Turkey, India, Switzerland, Australia, Italy, Sweden, Pakistan

The above list was obtained from U.S.NEWS website.

Obviously, the United States has high Co2 per capita output, the fourth highest among these 20 powerful countries. I wonder whether Trump’s withdrawal claim means the USA will produce more Co2 in the future. If so, it will bring a significant change to the global environment.

Summary

SUMMARY


My main concern is the relationship among industrial development, its energy consumption, and Co2 emission. I pulled out relative data from the World Bank database and cleaned it up.


Besides the main analysis, I also did two more studies on renewable energies and global Co2 emission. Here are my findings:


During my research, some other facts surprised me too.

Based on my analysis, we can have a clearer understanding of China’s environment conflicts with the economy. What’s more, this analysis can be used to support ideas/plans, such as the development of service sector, the development of new/renewable energy, the research on why we need more public transportation, and why Trump shouldn’t withdraw from Paris Climate Agreement (or he’d better have a better plan to control the Co2 emission).


Although I put so many efforts into this research, it’s still limited by resources and thoughts. My data came from 3 different topics that they don’t categorize sectors in the same way. The Co2 data was categorized too detailed that I think manufacturing and construction sector can not stand for the whole industry sector. Additionally, transportation should be classified as a service sub-sector but I analyze it separately.

This research is not very rigorous because of my limited experience and skills. I couldn’t find the total household information for China, so I calculated it out using the population to divide the average household size (3). I didn’t include the Co2 emission of the agriculture sector because it produces methane instead of Co2. This report can be improved to be a comprehensive one by digging deeper into the industry sectors. Do certain factories produce more Co2, consumes more energy? Which industry can shift to renewable energies? What’s the cost of using renewable energies?

I hope one day, an institute/organization can conduct a similar research but with more detailed information and accurate data. With a better report, the public or government will know not only what caused global warming, but also what’s the solution to drop greenhouse gas emission.

---
title: "Do GDP Growth and Energy Consumption Increase Cause Co2 Emission to Increase?"
output: 
  flexdashboard::flex_dashboard:
             social: menu
             source: embed
             vertical_layout: fill
             orientation: columns
             theme: flatly
---

```{r setup, include=FALSE,echo=FALSE}
library(flexdashboard)   #to create interactive dashboards

```

Introduction
=======================================================================
Column {data-width=400}
-----------------------------------------------------------------------

###**Why this matters?**

```{r, out.width= "200px", echo=FALSE, fig.align='right'} knitr::include_graphics("factory.jpg") ```
Recently, Trump claimed that the United States will withdraw from the Paris Climate Agreement. The public began to worry about the carbon emission will rise significantly in the near future. This news reminded me of the air pollution in my home country, China. People kept saying about developing countries sacrificed their environment for more energy production and economic development. However, I like thinking critically instead of guessing based on common sense. I'd love to dig more into the data to see if the country's development is contradicted with the environment. I'll take China as my target country. **Primary Concern:** What's the relationship among industrial development, energy consumption, and Co2 emission? **Additional Concerns:** - How's the development of sustainable energy? - What will be the effects that the United States withdraw from the Paris Climate Agreement? **What does the results mean to me/us?**
```{r, out.width= "100px", echo=FALSE, fig.align='right'} knitr::include_graphics("CO2.png") ```
I used to play around small hills and beautiful forests near my parents' countryside home when I was very young. About 5 years ago, all those sceneries became mud, trucks, and noises. The climate became very hot in summer. We took all the kids to the city since their faces could never be cleaned by polluted water near the village. I was shocked and angry. I believe the industrial development hurts our environment but I also hope new energy/technology will emerge to save our future. I hope there's a balance point between benefits and the environment. From this analysis, we can have a clearer understanding of our energy and environment situation. I touched on industries so that we know the relationship between industrial development and Co2 emission. During my research, I also found some interesting topics, such as the relationship between Service sector and its energy consumption and Co2 emission; the relationship between energy production type and its Co2 emission. **Extra Study** I also researched on additional topics based on my concerns. - The trends of renewable/clean energies - Comparing the Co2 emission of the United States with other similar countries. Column {data-width=500} --------------------------------------------------------------------- ###**Resources** - [GDP, Co2 Emission, Population from Wolrd Development Indicators](http://databank.worldbank.org/data/reports.aspx?source=world-development-indicators) - [ Traditional and Sustainable Energy Consumption from Sustainable Development Goals](http://databank.worldbank.org/data/reports.aspx?source=sustainable-development-goals-(sdgs)) - [Co2 Emission Among Countries](http://databank.worldbank.org/data/reports.aspx?source=world-development-indicators) These data were retrieved from [The World Bank's databank](http://databank.worldbank.org/data/home.aspx?). They were updated frequently (latest update was June 01, 2017). As the major data are available from 1990 to 2012, my research only used data from 1990 to 2012. ###**How?** - Methods: - Descriptive analysis: - Descriptive graphs are used to show the changes of variables by time. - Predictive (Regression) analysis: - ANOVA analysis to figure out the relationship among industry development, energy consumption and Co2 emission. - Visualization tools: scatterplot, line, bar chart,table, geomap, etc. ###**Packages Used** ```{r,message=F, warning=F, echo=TRUE} library(tidyr) #tidy unclean data into a clean library(dplyr) #do data transformation, help format a needed dataframe library(ggplot2) #make elegant graphs library(readr) #import dataset into R library(readxl) #import Excel files into R library(magrittr) #pipe dataframe to functions library(plotly) #initiate a plotly visualization library(flexdashboard) #create interactive dashboards library(DT) #show dataframe in a nicer way ``` Package "tidyverse" includes: tidyr, dplyr, ggplot2, readr, readxl, magrittr Data Preparation ====================================================================== Column{.tabset} ---------------------------------------------------------------------- ###**Importing Data** Datasets information: - The original GDPCO2.csv dataset has 26 variables, observations from 1990 to 2012, some sentences at the bottom. - The original energy_sector.csv dataset has 30 variables, observations from 1990 to 2012, some sentences at the bottom. Both datasets were sorted by Year (Time) and have very complicated and long variable names. In this part, I cleaned the datasets by drop unuseful lines and variables, merged 3 different datasets into 1 master dataframe, and changed variable names to readable names. ```{r,message=F, warning=F, echo=TRUE} #Import data of GDP and Co2 GDPCO2<- read.csv("GDPCO2.csv") #Select useful variables and observations GDP <- GDPCO2[c(1:23),c(3,5:10,11,12,14:26)] #Import data of energy consumption energy_sector <- read.csv("energy_sector.csv") #Select useful variables and observations energy_sector1 <- energy_sector[-c(24:28),c(3,5,7:12,14,16,18,21,22,24,27,29)] #Merge both dataframe together by sorted variable "Time" Total <- merge(GDP, energy_sector1, by = "Time") #Import data for the extra study on Co2 per capita of countries countriesCo2 <- read.csv("Countries.csv", col.names = c("Year","Year_code","Country","Code","Co2","Co2_per_capita")) #Write the merged file to a .csv file; read the new .csv file into R; change the complex names to recognizable names write_csv(Total, "Total.csv") Totaltable <- read.csv("Total.csv", col.names=c("Time","Agriculture","GDP_per_capita","GDP","GDP_growth","Industry","Service","Population_growth","Population","CO2_transportp","CO2_gasp","CO2_solidp","CO2_solid","CO2_others","CO2_gas","CO2_manu_consp","CO2_elec_heatp","CO2_rcpp","CO2","CO2_liqp","CO2_per_capita_mt","CO2_agri","Biogas","Agricultural_MJ","Industrial_MJ","Residential_MJ","Service_MJ","Transportation_MJ","Geothermal","Hydro","Liquid_Biofuel","Marine","Renewable","Solar","TFEC","Solid_Biofuel","Wind")) ``` The clean master dataframe includes 29 variables, 23 observations (1990-2012). The dataset "countries" has 6 variables, 20 observations (20 countries). ###**Tidying Data** Problems: - Same type of variables sometimes have different unit. - Some variables need to be converted from %percentage to the original amount. I transformed the percentage GDP to dollar amounts by multiplying the total GDP back; transformed the percentage Co2 to amount unit by multiplying the total Co2; changed all energy units to "MJ" unit. ```{r,message=F, warning=F, echo=TRUE} #Change the variables to make sure same type of variables have same units Totaltable2 <- Totaltable %>% transmute( Time = Time, Agriculture = Agriculture * GDP /100, Industry = Industry * GDP /100, Service = Service * GDP /100, Population = Population, GDP = GDP, CO2_transport = CO2_transportp * CO2, CO2_others = CO2_others * CO2, CO2_manu_cons = CO2_manu_consp * CO2, CO2_elec_heat = CO2_elec_heatp * CO2, CO2_rcp = CO2_rcpp * CO2, Agricultural_MJ = Agricultural_MJ * GDP, Industrial_MJ = Industrial_MJ * GDP, Residential_MJ = Residential_MJ* 1000 * Population / 3, Service_MJ = Service_MJ * GDP, Transportation_MJ = Transportation_MJ * GDP, TFEC = TFEC * 1000000, CO2 = CO2, Biogas = Biogas, Geothermal = Geothermal, Hydro = Hydro, Liquid_Biofuel = Liquid_Biofuel, Marine = Marine, Renewable = Renewable, Solar = Solar, Solid_Biofuel = Solid_Biofuel, Wind = Wind) ``` Column {.tabset} ------------------------------------------------------------------- ###**Data** ```{r,message=F, warning=F, echo = FALSE} library(DT) datatable(Totaltable2, fillContainer = TRUE, options = list(pageLength = 25)) ``` ###**Data Dictionary** Variable Name|Description|Type -------------| ----------|------ Time |Year |Integer Agriculture |Agriculture's Contribution to Total GDP|Numeric Industry|Industry's Contribution to Total GDP|Numeric Service|Service's Contribution to Total GDP|Numeric Population|Population|Integer GDP|Gross Domestic Production|Numeric CO2_transport|Co2 Emission from Transportation|Numeric CO2_others|Co2 from Other than Resi, Comme, Publ Services|Numeric CO2_manu_cons|Co2 Emission from Manufacturing and Construction|Numeric CO2_elec_heat|Co2 Emission from Electricity and Heat Production|Numeric CO2_rcp|Co2 Emission from Resi, Comme, Publ Services|Numeric Agricultural_MJ|Energy Consumption of Agricultural Sector|Numeric Industrial_MJ|Energy Consumption of Industrial Sector|Numeric Residential_MJ|Energy Consumption of Residential Sector|Numeric Service_MJ|Energy Consumption of Service Sector|Numeric Transportation_MJ|Energy Consumption of Transportation Sector|Numeric TFEC|Total Final Energy Consumption|Numeric CO2|Total Co2 Emission|Numeric Biogas|Biogas Energy Consumption|Numeric Geothermal|Geothermal Energy Consumption|Numeric Hydro|Hydro Energy Consumption|Numeric Liquid_Biofuel|Liquid Biofuel Energy Consumption|Numeric Marine|Marine Energy Consumption|Numeric Renewable|Renewable Energy Consumption|Numeric Solar|Solar Energy Consumption|Numeric Solid_Biofuel|Solid Biofuel Energy Consumption|Numeric Wind|Wind Energy Consumption|Numeric Country|Country Names|Character Co2_per_capita|Co2 Emission Divided by Population|Numeric Exploratory Analysis{.storyboard} ==================================================================== ### GDP Growth by Sectors: From this section, you'll see the GDP growth of sector Agriculture, Industry and Service in these 23 years.{data-commentary-width=600} ```{r,message=F, warning=F, echo=FALSE} p1 <- Totaltable2 %>% gather(Sector, Amount, 2:4)%>% plot_ly(x = ~Time, y = ~Amount, color = ~Sector, type = 'scatter', mode = 'lines+markers')%>% layout(title = "GDP Contribution by Sector", xaxis = list(title = "Year"), yaxis = list(title = "GDP Value Added")) p1 ``` *** Observation: - All three sectors are growing. - Both industry and service sectors increased rapidly, with agriculture falling far behind. We can clearly see that China shifted its focus to industry and service rather than agriculture. As a country famous for its manufacturing export, it's normal to see the dramatic increase in industry sector; however, I'm surprised by the growth of the service sector. So, I took a further step to study the service sector in China. According to the report [CHINA SERVICES SECTOR ANALYSIS](http://www.intracen.org/uploadedFiles/intracenorg/Content/Exporters/Sectors/Service_exports/Trade_in_services/China_ServicesBrief.pdf) written by [International Trade Center](http://www.intracen.org/), the service sector has actually been constrained by the manufacturing industry and some barriers for international service trade. Nevertheless, since the Chinese government signed to join the World Trade Organization in 2011, the service export has inclined significantly. The Chinese government set its 12th Five-Year Plan to include developing key services, such as finance, logistics, education, construction, healthcare, transport, and tourism.The report admitted that the service sector is growing strongly, but it also mentions the service growth "is still smaller than it should be for an economy at China's stage of economic development". In the graph, we can see that the service sector caught up with the industry sector in 2012. Lookin at the trend lines, I believe the service sector will become stronger and stronger till it conforms with China's stage of economic development nowadays. ```{r, out.width= "400px", echo=FALSE, fig.align='center'} knitr::include_graphics("service.jpg") ``` ### CO2 Emission by Sectors: Carbon dioxide is the most significant long-lived greenhouse gas. Its concentration in the Earth atmosphere has inclined dramatically after the industrialization.{data-commentary-width=600} ```{r,message=F, warning=F, echo=FALSE} p2 <- Totaltable2 %>% gather(Sector, Amount, 7:11)%>% plot_ly(x = ~Time, y = ~Amount, color = ~Sector, type = 'scatter', mode = 'lines+markers')%>% layout(title = "Co2 Emission by Sector(kt)", xaxis = list(title = "Year"), yaxis = list(title = "Co2")) p2 ``` *** Observation: - Co2 emitted from electricity and heat production always ranks the highest among sectors. - The overall trend of Co2 emission of the manufacturing is upward, with a significant turning point in 2002. - Unlike its growth in GDP, the service sector (Co2_transport & part of the CO2_rcp) show little growth in its Co2 emission. Not surprised to see the Co2-manufacture sector climbing up in the past years since factories need fuels to motivate machines. The turning point at 2002 might be caused by joining World Trade Organization in 2001. The observations above also brought me to think whether different types of fuels produce different amount of Co2. The Co2 from electricity and heat production is very high. I personally believe it's because the production mainly uses coal. In the same way, I believe the service sector emitted less Co2 because it doesn't need to operate large machines and it's using petrol and natural gas most of the time. Coal produced more Co2 comparing to petrol and natural gas. Here's a chart from [U.S. Energy Information Administration](https://www.eia.gov/tools/faqs/faq.php?id=73&t=11): Fuel (million British thermal units of energy ) | Pounds of CO2 emitted ------------------------------------------------|-------------------------- Coal (anthracite) | 228.6 Coal (bituminous) | 205.7 Coal (lignite) | 215.4 Coal (subbituminous) | 214.3 Diesel fuel and heating oil | 161.3 Gasoline (without ethanol) | 157.2 Propane | 139.0 Natural gas | 117.0 ### Energy Consumption by Sectors: This section is going to check energy consumption among agriculture, industry, residence, service, and transportation. {data-commentary-width=600} ```{r,message=F, warning=F, echo=FALSE} p3 <- Totaltable2 %>% gather(Sector, Consumption_MJ, 12:16) %>% plot_ly(x = ~Time, y = ~Consumption_MJ, color = ~Sector,type = 'scatter', mode = 'lines+markers')%>% layout(title = "Energy Consumption by Sector(MJ)", xaxis = list(title = "Year",type = "log"), yaxis = list(title = "Energy Amount")) p3 ``` *** Observation: - Transportation used a significant portion of the energy production. - Industry's energy consumption increases by time. Similar to the Co2 trend line, it has a turning point around 2002. - The other sectors nearly have no growth in energy consumption. The industry line is very similar to its GDP and Co2 emission lines. I assume they are highly related. To my surprise, the service sector is not using much energy. That might because the motivator/most valuable resources in the service sector is human resources. Energy is not very critical to service businesses. The transportation is climbing rapidly, ranks the highest among all sectors. This trend started very early, earlier than 1990. China was once called "the Kingdom of Bicycles" because most people can only afford bicycles at that time. As the economy gets better, people tend to change their transportation tools. There are so many vehicles on the roads and the public transportation is also very advanced nowadays. **1980s vs. 2010s** ```{r, out.width= "300px", echo=FALSE, fig.align='left'} knitr::include_graphics("bicycle1.jpg") ``` ```{r, out.width= "300px", echo=FALSE, fig.align='right'} knitr::include_graphics("transport.jpeg") ``` ### Industry's GDP vs. Energy vs. Co2: This part is to analyze the relationship between industry GDP and Co2; industrial energy consumption and Co2. {data-commentary-width=600} TWO-WAY ANOVA Analysis: ```{r,message=F, warning=F, echo=FALSE} fit <- aov(CO2_manu_cons ~ Industry*Industrial_MJ, data=Totaltable2) layout(matrix(c(1,2,3,4),2,2)) summary(fit) ``` From the two-way ANOVA analysis, I find that the relationships are really strong: - The p-value for Industry is < 2e-16, less than 0.001, which indicates that the levels of industry GDP are associated with Co2 emission at a significance level of 0.001.The correlation is also very high: ```{r,message=F, warning=F, echo=FALSE} x <- Totaltable2[3] y <- Totaltable2[9] cor(x, y) ``` - The p-value for Industry_MJ is 2.02e-08, which indicates that the levels of industrial energy consumption are associated with Co2 emission at a significance level of 0.001. The correlation is very high: ```{r,message=F, warning=F, echo=FALSE} x <- Totaltable2[13] y <- Totaltable2[9] cor(x, y) ``` - The p-value for the interaction between Industry*Industrial_MJ is 0.000146, which indicates that the relationship between industry GDP and Co2 emission depends on the value of industrial energy consumption. ```{r,message=F, warning=F, echo=FALSE} x <- Totaltable2[3] y <- Totaltable2[13] cor(x, y) ``` - Because the interaction effect between industry GDP and industrial energy consumption is statistically significant, I cannot interpret the main effects without considering the interaction effect. I assume it is a higher industry GDP needs more energy to support, more energy production will cause a higher Co2 emission as machines consume lots of energy. *** ```{r, message=F, warning=F, echo=FALSE} pairs(~CO2_manu_cons + Industry + Industrial_MJ, data = Totaltable2, main = "Scatterplot Matrix") ``` ### Extra Study: Development of New Energies{data-commentary-width=500} ```{r,message=F, warning=F, echo=FALSE} p5 <- Totaltable2 %>% gather(Energy, Amount, 19,20,21,22,23,25,26,27)%>% plot_ly(x = ~Time) %>% add_bars(y = ~Amount, color = ~Energy)%>% add_lines(y = ~Renewable,name = "Renewable Energy", yaxis = 'y2',line = list(color = '#45171D')) %>% layout(title = "Other New Energy (TJ)", xaxis = list(title = "Year"), yaxis = list(side = 'left', title = "Energy Amount"), yaxis2 = list(side = 'right',overlaying = "y",title = "Renewable Energy",showgrid = FALSE, zeroline = FALSE)) p5 ``` *** From the study, I find that China started using solid biofuel and hydro energy earlier than 1990. These two energies developed quickly and now become the significant energy sources. To investigate deeper, I'd suggest you **deselect solid biofuel and hydro** in the graph. Now, you can see the relationship between the bar chart and the renewable energy line. As more clean energies were introduced, the renewable energy production is increasing year by year, especially solar energy and biogas. If you have an interest checking each new energy's trend, you can simply deselect every energy and select the one you want. ```{r, out.width= "300px", echo=FALSE, fig.align='center'} knitr::include_graphics("new energy.png") ``` ### Extra Study: Co2 Emission of The Top 20 Countries.{data-commentary-width=700} **Mapping Graph** ```{r,message=F, warning=F, echo=FALSE} # light grey boundaries b <- list(color = toRGB("white"), width = 0.8) # specify map projection/options m <- list( showframe = FALSE, showcoastlines = FALSE, projection = list(type = 'Mercator') ) Countries_CO2 <- plot_geo(countriesCo2) %>% add_trace( z = ~Co2_per_capita, color = ~Co2_per_capita, colors = 'Purples', text = ~Country, locations = ~Code, marker = list(line = b) ) %>% colorbar(title = 'Co2 per capita Emission (ton)') %>% layout( title = '2012 Co2 per capita Emission of Top Countries', geo = m ) Countries_CO2 ``` *** Top 20 countries include: United Arab Emirates, China, Germany, United Kingdom, Israel, Russian Federation, Japan, Saudi Arabia, United States, France, Canada, Korea, Rep., Iran, Islamic Rep., Turkey, India, Switzerland, Australia, Italy, Sweden, Pakistan The above list was obtained from [U.S.NEWS website](https://www.usnews.com/news/best-countries/power-full-list). Obviously, the United States has high Co2 per capita output, the fourth highest among these 20 powerful countries. I wonder whether Trump's withdrawal claim means the USA will produce more Co2 in the future. If so, it will bring a significant change to the global environment. ```{r,message=F, warning=F, echo=FALSE} plot_ly(data = countriesCo2, x=~Code, y=~Co2_per_capita, color = ~Country, type = 'bar')%>% layout(title = '2012 Co2 per capita Emission', xaxis = list(title = " ")) ``` Summary ================================================================ **SUMMARY** *** **My main concern** is the relationship among industrial development, its energy consumption, and Co2 emission. I pulled out relative data from the World Bank database and cleaned it up. - At the beginning, I graphed the overall changes of each topic (GDP by sector, energy consumption by sector, Co2 emission by sector). From these graphs, I saw the trends of each sector. The industry sector obviously has higher GDP, higher energy consumption, and Co2 emission. I was one step closer to my assumption. - However, looking only by eyes can't strongly support my assumption. So, I conducted ANOVA analysis and correlation calculation afterward. The p-values for each factor and intercept factor are extremely small, which indicates GDP and energy consumption of the industry sector significantly affect its Co2 emission. The correlations are very close to 1, which refers to the same conclusion. *** **Besides** the main analysis, I also did two more studies on renewable energies and global Co2 emission. Here are my findings:
```{r, out.width= "100px", echo=FALSE, fig.align='right'} knitr::include_graphics("wind.jpg") ```
- The renewable energies are developing rapidly according to the trend line. From the bar chart, we can see the solid biofuel is the most frequently used one, but hydro and solar energy is growing faster than solid fuel. - There are so many kinds of renewable energies. Some of them just appeared in recent years and I believe more might be discovered in the future. I personally believe the future of renewable energies is bright. - The United States is one of the top Co2 emission (per capita) countries in the world. The withdrawal of Paris Climate Agreement will release the States from limiting its Co2 emission. It'll be a significant change to the global warming. *** **During** my research, some other facts surprised me too. - It seems that the service sector should be the main focus in the future economy as it consumes less energy, produces less Co2, but meanwhile create high-value products. - Different energy sources emit a different amount of Co2. By changing the energy structure to be more sustainable/green, there can be a balance point between economy and environment. - Public transportation or shared bikes might help save lots of energy since transportation is the highest energy consumption sector. Based on my analysis, we can have a clearer understanding of China's environment conflicts with the economy. What's more, this analysis can be used to support ideas/plans, such as the development of service sector, the development of new/renewable energy, the research on why we need more public transportation, and why Trump shouldn't withdraw from Paris Climate Agreement (or he'd better have a better plan to control the Co2 emission). ***
```{r, out.width= "200px", echo=FALSE, fig.align='left'} knitr::include_graphics("cry.gif") ```
**Although** I put so many efforts into this research, it's still limited by resources and thoughts. My data came from 3 different topics that they don't categorize sectors in the same way. The Co2 data was categorized too detailed that I think manufacturing and construction sector can not stand for the whole industry sector. Additionally, transportation should be classified as a service sub-sector but I analyze it separately. This research is not very rigorous because of my limited experience and skills. I couldn't find the total household information for China, so I calculated it out using the population to divide the average household size (3). I didn't include the Co2 emission of the agriculture sector because it produces methane instead of Co2. This report can be improved to be a comprehensive one by digging deeper into the industry sectors. Do certain factories produce more Co2, consumes more energy? Which industry can shift to renewable energies? What's the cost of using renewable energies? I hope one day, an institute/organization can conduct a similar research but with more detailed information and accurate data. With a better report, the public or government will know not only what caused global warming, but also what's the solution to drop greenhouse gas emission.