Introduction of Research

Climate Change

Quoted from Wikipedia: “Climate change occurs when changes in Earth’s climate system result in new weather patterns that remain in place for an extended period of time. This length of time can be as short as a few decades to as long as millions of years. Scientists have identified many episodes of climate change during Earth’s geological history; more recently since the industrial revolution the climate has increasingly been affected by human activities driving global warming, and the terms are commonly used interchangeably in that context.”

Nowadays, climate change has risen concern for people around the globe. Researchers, institutes, companies even individuals have all paid close attention on the climate change. Topics varies from global warming, sea level change, sea ice meltdown to emission of greenhouse gases.

Therefore, I would like to looking into 4 aspects of climate change data. I’ll be making data visulized and trying to find out the answer to the following four questions:

Row

Four aspects of research

  1. Did the sea ice melted during past 16 years?

Sea ice was directly related to sea level. If sea ice was all melted due to temperature rise, then the sea level will go up and some of the island countries may disappear from the earth.

  1. Is the city warmer than rural areas?

We may all have noticed that if you escape from NYC to somewhere in Long Island in summer months, you’ll feel re-energized by the breeze even there’s no lake or sea beside you. Lower temperature might be the answer of relief.

  1. Who emits more CO2, consumption or production?

Low-carb life-style has been trended in major cities around the global. You may ride bicycles instead of driving automobiles, or just turn off the light that are not in use. But there aren’t just consumption-based CO2 emission. Factories and petro extraction companies also emits CO2. Who is the majority of carbon dioxide emission must be told from data.

  1. Is there any anomaly in global temperature?

Republicans have all been denying the global warming and climate change. But data won’t lie. Let’s see how global average temperature anomaly data will teach us a lesson.

Sea Ice of South Pole

Column

Sea Ice Coverage

Urban Heat Island

NY vs IN: Results

Conslusion: An urban heat island (UHI) is an urban area or metropolitan area that is significantly warmer than its surrounding rural areas due to human activities. I’ve chosen two cities, New York, NY and Knox, IN, and plotted the temperature in summer month and winter month separately. We can tell from the figures that, the temperature in NYC is significantly higer than in Knox city, whatever the season is. Consindering these two cities has similar latitude, while NYC has much more human activities than Knox city, we can tell that urban hear island severely affect the temperature as to the whole environment.

Row

NY vs IN Summer

NY vs IN Winter

Carbon Dioxide Emission

Column

Carbon Dioxide Emissions by Source - US (1990 - 2016)

Carbon Dioxide Emissions by Source - China (1990 - 2016)

Global Temperature Anomaly

Global Average Temperature Anomaly (1850-2018)

Colclusion: The global warming is still in dispute among scientists, but we can tell from the data that global average temperature anomaly exists and worsen each year. We can also see global average temperature rise is in the range of 1 to 1.2℃. Given more and more polar vortex-caused snowstorm in northeaster US, El Niño happens in South America, we must understand that the climate is changing, due to industrial revolution and other human activities.
---
title: "Climate Change Data Visualization"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    source_code: embed
    vertical_layout: fill
---

Introduction of Research
=====================================

### Climate Change
Quoted from Wikipedia: "Climate change occurs when changes in Earth's climate system result in new weather patterns that remain in place for an extended period of time. This length of time can be as short as a few decades to as long as millions of years. Scientists have identified many episodes of climate change during Earth's geological history; more recently since the industrial revolution the climate has increasingly been affected by human activities driving global warming, and the terms are commonly used interchangeably in that context."

Nowadays, climate change has risen concern for people around the globe. Researchers, institutes, companies even individuals have all paid close attention on the climate change. Topics varies from global warming, sea level change, sea ice meltdown to emission of greenhouse gases.

Therefore, I would like to looking into 4 aspects of climate change data. I'll be making data visulized and trying to find out the answer to the following four questions:

Row 
-------------------------------------
### Four aspects of research
1. Did the sea ice melted during past 16 years?

Sea ice was directly related to sea level. If sea ice was all melted due to temperature rise, then the sea level will go up and some of the island countries may disappear from the earth.

2. Is the city warmer than rural areas?

We may all have noticed that if you escape from NYC to somewhere in Long Island in summer months, you'll feel re-energized by the breeze even there's no lake or sea beside you. Lower temperature might be the answer of relief.

3. Who emits more CO2, consumption or production?

Low-carb life-style has been trended in major cities around the global. You may ride bicycles instead of driving automobiles, or just turn off the light that are not in use. But there aren't just consumption-based CO2 emission. Factories and petro extraction companies also emits CO2. Who is the majority of carbon dioxide emission must be told from data.

4. Is there any anomaly in global temperature?

Republicans have all been denying the global warming and climate change. But data won't lie. Let's see how global average temperature anomaly data will teach us a lesson.

```{r setup, include=FALSE}
library(flexdashboard)
library(rnoaa)
library(plyr)
library(lubridate)
library(xts)
library(dygraphs)
library(ggplot2)
```

Sea Ice of South Pole
=====================================
Intro {.sidebar}
-------------------------------------
Conclusion: From the figures we can see, there's a trend of sea ice coverage of south pole decreasing from 2000-2011 obviously. However, it seems that from 2012-2015, the sea ice area went up compares to the orevious decade. 
There is a hypothesis that the global warming doesn't exist and the earth has its own temperature cycle, which means some years it's tend to be colder and be warmer in other years. I'm not sure the ice coverage went up was due to random change or the error of data, so I suspect that more data would be needed to draw final conclusion.

Column
-------------------------------------
### Sea Ice Coverage

```{r}
ice_data <- sapply(seq(2000, 2015, 1), function(x) sea_ice(year = x, mo = 'Jan',
    pole = 'S'))
names(ice_data) <- seq(2000, 2015, 1)
ice_plot_data <- ldply(ice_data)
ggplot(ice_plot_data, aes(long, lat, group = group)) + 
  geom_polygon(fill = 'turquoise3') + 
  theme_ice() + facet_wrap(~.id) + 
  ggtitle('Sea Ice Coverage Change from 2000-2015 in January')

```

Urban Heat Island
=====================================
### NY vs IN: Results
Conslusion: An urban heat island (UHI) is an urban area or metropolitan area that is significantly warmer than its surrounding rural areas due to human activities. I've chosen two cities, New York, NY and Knox, IN, and plotted the temperature in summer month and winter month separately. We can tell from the figures that, the temperature in NYC is significantly higer than in Knox city, whatever the season is. Consindering these two cities has similar latitude, while NYC has much more human activities than Knox city, we can tell that urban hear island severely affect the temperature as to the whole environment.

Row
-------------------------------------
### NY vs IN Summer
```{r}
ny_temp <- isd(usaf = '720553', wban = '99999', year = 2017)
in_temp <- isd(usaf = '720593', wban = '00187', year = 2017)
temp_all <- rbind(ny_temp[,1:30], in_temp[,1:30])
temp_all$date_time <- ymd_hm(
  sprintf('%s %s', as.character(temp_all$date), temp_all$time)
)
temp_all_summer <- temp_all[temp_all$date >= '20170701' & temp_all$date <= '20170730',]

ggplot(temp_all_summer, aes(x = date_time, y = temperature, group = usaf_station, color = usaf_station)) +
  geom_line(size = 0.8) + scale_color_manual(values = c('orangered2', 'aquamarine'),
  name = 'City', labels = c('New York, NY', 'Knox, IN')) +
  xlab('Summer 2017') + ylab('Temperature')+
  theme(axis.text.y=element_blank(),
        axis.ticks.y=element_blank())
```


### NY vs IN Winter
```{r}
temp_all_winter <- temp_all[temp_all$date >= '20170101' & temp_all$date <= '20170130',]

ggplot(temp_all_winter, aes(x = date_time, y = temperature, group = usaf_station, color = usaf_station)) +
  geom_line(size = 0.8) + 
  scale_color_manual(values = c('tomato3', 'steelblue1'), 
  name = 'City', labels = c('New York, NY', 'Knox, IN')) +
  xlab('Winter 2017') + ylab('Temperature') +
  theme(axis.text.y=element_blank(),
        axis.ticks.y=element_blank())
```



Carbon Dioxide Emission
=====================================
Intro {.sidebar}
-------------------------------------
Conclusion: consumption based emission has always been greater than production based emission of carbon dioxide is US, and contradicted in China. It might because of the difference between developing countries and developed countries. However, since the industrial revolution, the transition from hand-made production to machine, our life has been changed dramatically. The extraction of petroleum, coal mining, air transportation even meat consuming (animal husbandry) will cause more CO2 emission. Like it or not, we're not able to find any sustainable, replaceable and inexpensive alternative energy other than petro. Thus, we're not able to cut CO2 emission siginificantly.

Column {.tabset}
-----------------------------------------------------------------------
### Carbon Dioxide Emissions by Source - US (1990 - 2016)

```{r}
us_1 <- read.csv('us_co2_emission.csv')
us_emission <- us_1[, 3:5]
colnames(us_emission) <- c('Year', 'Consumption-based Emission', 'Production-based Emission')

dygraph(us_emission, main = 'Carbon Dioxide Emission By Source in US') %>%
  dyAxis('y', label = 'CO2 Emission (Unit: bn tons)') %>%
  dyAxis('x', label = 'Year') %>%
  dyOptions(fillGraph = F, drawXAxis = T,
  drawYAxis = T, includeZero = T, drawAxesAtZero = F, disableZoom = T, colors = c('darkred', 'yellow')) %>%
  dyRangeSelector() %>%
  dyLegend(show = 'follow', width = 600)
```


### Carbon Dioxide Emissions by Source - China (1990 - 2016)
```{r}
cn_1 <- read.csv('cn_co2_emission.csv')
cn_emission <- cn_1[, 3:5]
colnames(cn_emission) <- c('Year', 'Consumption-based Emission', 'Production-based Emission')

dygraph(cn_emission, main = 'Carbon Dioxide Emission By Source in China') %>%
  dyAxis('y', label = 'CO2 Emission (Unit: bn tons)') %>%
  dyAxis('x', label = 'Year') %>%
  dyOptions(fillGraph = F, drawXAxis = T,
  drawYAxis = T, includeZero = T, drawAxesAtZero = F, disableZoom = T, colors = c('darkred', 'yellow')) %>%
  dyRangeSelector() %>%
  dyLegend(show = 'follow', width = 600)
```

Global Temperature Anomaly
=====================================
### Global Average Temperature Anomaly (1850-2018)
Colclusion: The global warming is still in dispute among scientists, but we can tell from the data that global average temperature anomaly exists and worsen each year. We can also see global average temperature rise is in the range of 1 to 1.2℃. Given more and more polar vortex-caused snowstorm in northeaster US, El Niño happens in South America, we must understand that the climate is changing, due to industrial revolution and other human activities.
```{r}
temp_anom <- read.csv('temperature_anomaly.csv')
dygraph(temp_anom, main = 'Global Average Temperature Anomaly') %>%
  dySeries(c('Lower', 'Median', 'Upper'), label = 'Median') %>%
  dyAxis('y', label = 'Average Temperature Anomaly (Celsius)') %>%
  dyAxis('x', label = 'Year') %>%
  dyOptions(fillGraph = F, drawXAxis = T,
  drawYAxis = T, includeZero = T, drawAxesAtZero = F, disableZoom = T) %>%
  dyLegend(show = 'follow')
```