In this dashbaord, we are studying effects of climate change. We are primarily focusing on changes in sea ice level for Northern and Southern Hemisphere. furthermore, we are trying to identify major causes for the same.
The Arctic encompasses a vast frozen ocean around the North Pole, surrounded by the landmasses of North America, Greenland, Svalbard, Northern Europe and Russia, while Antarctica is a frozen continent anchored by the South Pole and surrounded by vast open oceans.
Many research have shown that sea ice level is impacted by rise in temperature and global warming effect. In this dashboard, we will support this inference with the help of graphs created using climate data obtained from multiple sources like National Centers For Environmental Information, National Climatic Data Center, kaggle climate change datasets, etc.
Reference:
Through this study we have developed a series of questions like:
Is there any change in sea ice level? Yes, looking at the graphs produced using sea_ice function provided by rnoaa package we can see that there is significant change in sea ice level on both the poles.
Is one of the hemisphere showing more loss in sea ice level than the other? Yes, data collected from ncdc shows that northern hemisphere shows more significant loss in sea ice.
is there any temperature change effecting sea ice level? Yes, we can see significant temperature rise on northern and southern hemisphere over teh decade contributing to decrease in sea ice level.
does global warming have any effect on sea ice level? Yes, data collected on climate change shows significant increase in emission of greenhouse gases like CO2, CH4, N2O, etc. increasing the temperature which in turn increases melting of sea ice.
Temperature change speeds up melting of ice. Global warming is causing Arctic and Antarctica ice to melt – ice reflects sunlight, while water absorbs it. When the Arctic ice melts, the oceans around it absorb more sunlight and heat up, making the world warmer as a result.
Climate change and science has been an issue for discussion and debate for at least the last decade. Climate data collection is currently being collected for areas all over the world. Policy decisions are based on the most recent analysis conducted on data extracted from huge online repositories of this data. Due to the inherent growth in the electronic production and storage of information, there is often a feeling of “information overload” or inundation when facing the process of quantitative decision making. As an analyst our job will often be to explore large data sets and develop questions or ideas from visualizations of those data sets.
The ability to synthesize large data sets using visualizations is a skill that all data scientists should have. In addition to this data scientists are called upon to present data syntheses and develop questions or ideas based on their data exploration. This lab will take us through the major steps in data exploration and presentation.
The objective of this laboratory is to survey the available data, plan, design, and create an information dashboard/presentation that not only explores the data but helps you develop questions based on that data exploration. To accomplish this task we will have to complete a number of steps:
There are lots of places we can get climate data to answer your questions. The simplest would be to go to NOAA National Centers for Environmental Information (https://www.ncdc.noaa.gov/). There are all kinds of data here (regional, global, marine). Also, on the front page of the NOAA website there are also other websites that have climate data, such as: (https://www.climate.gov/), (https://www.weather.gov/), (https://www.drought.gov/drought/), and (https://www.globalchange.gov/). Obviously, you don’t have to use all of them but it might be helpful to browse them to get ideas for the development of your questions.
Alternatively, and more professionally, there are tons of packages that allow you to access data from R. See here for a great primer on accessing NOAA data with ‘R’. It is also a good introduction to API keys and their use.
c
---
title: "Climate Change"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
source: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
```
# Synopsis
Row
-------------------------------------
### Case Scanario
In this dashbaord, we are studying effects of climate change. We are primarily focusing on changes in sea ice level for Northern and Southern Hemisphere. furthermore, we are trying to identify major causes for the same.
The Arctic encompasses a vast frozen ocean around the North Pole, surrounded by the landmasses of North America, Greenland, Svalbard, Northern Europe and Russia, while Antarctica is a frozen continent anchored by the South Pole and surrounded by vast open oceans.
Many research have shown that sea ice level is impacted by rise in temperature and global warming effect. In this dashboard, we will support this inference with the help of graphs created using climate data obtained from multiple sources like National Centers For Environmental Information, National Climatic Data Center, kaggle climate change datasets, etc.
Reference:
- https://cran.r-project.org/web/packages/rnoaa/rnoaa.pdf
- https://ropensci.org/blog/2013/08/18/sciordata/
- https://www.ncdc.noaa.gov/cag/
- https://www.kaggle.com/vageeshabudanur/riseintemp-dataset/data
### Conclusion
Through this study we have developed a series of questions like:
1. Is there any change in sea ice level?
Yes, looking at the graphs produced using sea_ice function provided by rnoaa package we can see that there is significant change in sea ice level on both the poles.
2. Is one of the hemisphere showing more loss in sea ice level than the other?
Yes, data collected from ncdc shows that northern hemisphere shows more significant loss in sea ice.
3. is there any temperature change effecting sea ice level?
Yes, we can see significant temperature rise on northern and southern hemisphere over teh decade contributing to decrease in sea ice level.
4. does global warming have any effect on sea ice level?
Yes, data collected on climate change shows significant increase in emission of greenhouse gases like CO2, CH4, N2O, etc. increasing the temperature which in turn increases melting of sea ice.
Temperature change speeds up melting of ice. Global warming is causing Arctic and Antarctica ice to melt – ice reflects sunlight, while water absorbs it. When the Arctic ice melts, the oceans around it absorb more sunlight and heat up, making the world warmer as a result.
Row {.tabset .tabset-fade}
-------------------------------------
### Overview
Climate change and science has been an issue for discussion and debate for at least the last decade. Climate data collection is currently being collected for areas all over the world. Policy decisions are based on the most recent analysis conducted on data extracted from huge online repositories of this data. Due to the inherent growth in the electronic production and storage of information, there is often a feeling of “information overload” or inundation when facing the process of quantitative decision making. As an analyst our job will often be to explore large data sets and develop questions or ideas from visualizations of those data sets.
The ability to synthesize large data sets using visualizations is a skill that all data scientists should have. In addition to this data scientists are called upon to present data syntheses and develop questions or ideas based on their data exploration. This lab will take us through the major steps in data exploration and presentation.
### Objective
The objective of this laboratory is to survey the available data, plan, design, and create an information dashboard/presentation that not only explores the data but helps you develop questions based on that data exploration. To accomplish this task we will have to complete a number of steps:
- Identify what information interests us about climate change.
- Find, collect, organize, and summarize the data necessary to create our data exploration plan.
- Design and create the most appropriate visualizations to explore the data and present that information.
- Finally organize the layout of those visualizations into a dashboard (use the flexdashboard package) in a way that shows our path of data exploration.
- Develop four questions or ideas about climate change from our visualizations.
### Methods Help
There are lots of places we can get climate data to answer your questions. The simplest would be to go to NOAA National Centers for Environmental Information (https://www.ncdc.noaa.gov/). There are all kinds of data here (regional, global, marine). Also, on the front page of the NOAA website there are also other websites that have climate data, such as: (https://www.climate.gov/), (https://www.weather.gov/), (https://www.drought.gov/drought/), and (https://www.globalchange.gov/). Obviously, you don’t have to use all of them but it might be helpful to browse them to get ideas for the development of your questions.
Alternatively, and more professionally, there are tons of packages that allow you to access data from R. See here for a great primer on accessing NOAA data with ‘R’. It is also a good introduction to API keys and their use.
# Change in Sea Ice Level
Inputs {.sidebar}
-------------------------------------
### Data Exploration & Visualization
We are retrieving data on sea ice level using sea_ice() provided by rnoaa package. We are collecting data for the period of 2014 to 2019 and observing change in sea ice level for northern and southern hemisphere. Furthermore, to observe which of the hemisphere shows more decrease in sea ice level we have retrieved data from ncdc and produced graphs for the same.
Row {.tabset .tabset-fade}
-------------------------------------
### North Pole Sea Ice Level
```{r}
# Get URLs for data
#urls <- seaiceeurls(mo = "Apr", pole = "N")[1:12]
# Download sea ice data
#registerDoMC(cores = 4)
#out <- llply(urls, noaa_seaice, storepath = "~/seaicedata", .parallel = TRUE)
# Name elements of list
#names(out) <- seq(1979, 1990, 1)
# Make a data.frame
#df <- ldply(out)
library(sp)
library(rnoaa)
library(ggplot2)
library(scales)
#install.packages('doMC')
#library(doMC)
library(foreach)
library(iterators)
library(parallel)
#install.packages("doMC", repos="http://R-Forge.R-project.org")
library(doMC)
library(plyr)
library(sf)
#df <- sea_ice_tabular()
#df
north_sea <- sea_ice(year = 2014:2019, month = 'May', pole = "N")
names(north_sea) <- seq(2014, 2019, 1)
df_north <- ldply(north_sea)
# Plot data
ggplot(df_north, aes(long, lat, group = group)) + geom_polygon(fill = "steelblue") + ggtitle("Changes in Sea Ice Level for North pole") + theme_ice() + facet_wrap(~.id)
```
### South Pole Sea Ice Level
```{r}
south_sea <- sea_ice(year = 2014:2019, month = 'May', pole = "S")
names(south_sea) <- seq(2014, 2019, 1)
df_south <- ldply(south_sea)
# Plot data
ggplot(df_south, aes(long, lat, group = group)) + geom_polygon(fill = "steelblue") + ggtitle("Changes in Sea Ice Level for South pole") + theme_ice() + facet_wrap(~.id)
```
### Comparison of Northern & Southern Sea Ice Level Changes
```{r}
library(ggthemes)
#library(ggplot2)
#remove.packages("ggthemes")
north_data <- read.csv(url("https://www.ncdc.noaa.gov/snow-and-ice/extent/sea-ice/N/8.csv"),skip=3)
south_data = read.csv(url("https://www.ncdc.noaa.gov/snow-and-ice/extent/sea-ice/S/8.csv"),skip=3)
north_data$'North Sea Ice Level' = north_data$Anomaly
south_data$'South Sea Ice Level' = south_data$Anomaly
poles_data = merge(north_data[,-c(2,3)], south_data[,-c(2,3)], by="Date")
#head(poles_data)
poles_Melted <- reshape2::melt(poles_data, id.var='Date')
#head(poles_Melted)
ggplot(poles_Melted, aes(x=Date, y=value, col=variable)) +
geom_line(linetype="solid", size=2) +
#scale_fill_discrete(name = “Poles”, labels = c(“North Sea Ice Level”, “South Sea Ice Level”)) +
xlab("Date") +
ylab("Change is Sea Ice Level") +
ggtitle("Comparing Changes in Sea Ice Level") +
theme_economist()
```
# Change in Temperature
Inputs {.sidebar}
-------------------------------------
### Data Exploration & Visualization
One of the major cause for decrease in sea ice level is rise in temperature. To supplement this inference we are using datasets available on National Centers For Environmental Information. Global and hemispheric anomalies are with respect to the 20th century average. Coordinate anomalies are with respect to the 1981 to 2010 average. All other regional anomalies are with respect to the 1910 to 2000 average.
Global temperature anomaly data come from the Global Historical Climatology Network-Monthly (GHCN-M) data set and International Comprehensive Ocean-Atmosphere Data Set (ICOADS), which have data from 1880 to the present. These two datasets are blended into a single product to produce the combined global land and ocean temperature anomalies. The available timeseries of global-scale temperature anomalies are calculated with respect to the 20th century average, while the mapping tool displays global-scale temperature anomalies with respect to the 1981-2010 base period.
Row {.tabset .tabset-fade}
-------------------------------------
### Global Temperature Rise
```{r}
library(lubridate)
library(tidyverse)
global_temp = read.csv("C:\\Users\\Administrator\\Desktop\\Kaminee\\Harrisburg\\Summer, 2020\\ANLY 512 - Anwar, Hussain\\Dashboard2\\global.csv", skip = 4)
north_temp = read.csv("C:\\Users\\Administrator\\Desktop\\Kaminee\\Harrisburg\\Summer, 2020\\ANLY 512 - Anwar, Hussain\\Dashboard2\\north.csv", skip = 4)
south_temp = read.csv("C:\\Users\\Administrator\\Desktop\\Kaminee\\Harrisburg\\Summer, 2020\\ANLY 512 - Anwar, Hussain\\Dashboard2\\south.csv", skip = 4)
global_temp %>%
mutate(Year = dmy(paste("01-01-", Year)),
Sign = if_else(Value >= 0, "Positive", "Negative")) %>%
ggplot(aes(x = Year, y = Value)) +
#geom_area(aes(fill = Sign), show.legend = FALSE) +
geom_bar(aes(fill = Sign),stat="identity", show.legend = FALSE) +
#geom_line(method = "lm", se = FALSE)
geom_smooth(method = "lm", se = FALSE) +
#theme_bw() +
scale_x_date(date_labels = "%Y",
date_breaks = "10 year",
minor_breaks = "10 year") +
theme_economist() +
theme(axis.text.x = element_text(angle=45, hjust=1, vjust = 1)) +
xlab("Year") +
ylab("Temperature") +
ggtitle("Global Temperature Rise")
```
### Northern & Southern Temperature Rise
```{r}
library(Rmisc)
plot1 = north_temp %>%
mutate(Year = dmy(paste("01-01-", Year)),
Sign = if_else(Value >= 0, "Positive", "Negative")) %>%
ggplot(aes(x = Year, y = Value)) +
#geom_area(aes(fill = Sign), show.legend = FALSE) +
geom_bar(aes(fill = Sign),stat="identity", show.legend = FALSE) +
#geom_line(method = "lm", se = FALSE)
geom_smooth(method = "lm", se = FALSE) +
#theme_bw() +
scale_x_date(date_labels = "%Y",
date_breaks = "10 year",
minor_breaks = "10 year") +
theme_economist() +
theme(axis.text.x = element_text(angle=45, hjust=1, vjust = 1)) +
xlab("Year") +
ylab("Temperature") +
ggtitle("Northern Hemisphere Temperature Rise")
plot2 = south_temp %>%
mutate(Year = dmy(paste("01-01-", Year)),
Sign = if_else(Value >= 0, "Positive", "Negative")) %>%
ggplot(aes(x = Year, y = Value)) +
#geom_area(aes(fill = Sign), show.legend = FALSE) +
geom_bar(aes(fill = Sign),stat="identity", show.legend = FALSE) +
#geom_line(method = "lm", se = FALSE)
geom_smooth(method = "lm", se = FALSE) +
#theme_bw() +
scale_x_date(date_labels = "%Y",
date_breaks = "10 year",
minor_breaks = "10 year") +
theme_economist() +
theme(axis.text.x = element_text(angle=45, hjust=1, vjust = 1)) +
xlab("Year") +
ylab("Temperature") +
ggtitle("Southern Hemisphere Temperature Rise")
multiplot(plot1, plot2, cols = 2)
```
# Global Warming Effect
Inputs {.sidebar}
-------------------------------------
### Data Exploration & Visualization
Aggrevated global warming contributes to rise in temperature which in turn results into decrease in sea ice level. Aggrevated global warming an be traced by exponential increase in greenhouse gases like CO2, CH4, N2O, etc. For this we have extracted data from kaggle dataset.
Row
-------------------------------------
### CO2
```{r}
greenhouse_gas = read.csv("C:\\Users\\Administrator\\Desktop\\Kaminee\\Harrisburg\\Summer, 2020\\ANLY 512 - Anwar, Hussain\\Dashboard2\\climate_change.csv")
#str(greenhouse_gas)
greenhouse_gas_ymd <- greenhouse_gas %>%
mutate(year_month = ymd(paste(greenhouse_gas$Year, greenhouse_gas$Month, truncated = 1)))
ggplot(greenhouse_gas_ymd, aes(x = year_month, y = CO2)) +
#geom_bar( position = "dodge", stat = "identity",color= "black") +
geom_line(stat = "identity", color = "black") +
geom_smooth(method = "lm", se = FALSE) +
xlab("Year") +
ylab("Emission Rate") +
ggtitle("CO2: Carbon Dioxide Emission Rate") +
theme_economist()
```
### CH4
```{r}
ggplot(greenhouse_gas_ymd, aes(x = year_month, y = CH4)) +
#geom_bar( position = "dodge", stat = "identity",color= "white") +
geom_line(stat = "identity", color = "Black") +
geom_smooth(method = "lm", se = FALSE) +
xlab("Year") +
ylab("Emission Rate") +
ggtitle("CH4: Methane Emission Rate") +
theme_economist()
```
Row
-------------------------------------
### N2O
```{r}
ggplot(greenhouse_gas_ymd, aes(x = year_month, y = N2O)) +
#geom_bar( position = "dodge", stat = "identity",color= "white") +
geom_line(stat = "identity", color = "black") +
geom_smooth(method = "lm", se = FALSE) +
xlab("Year") +
ylab("Emission Rate") +
ggtitle("N20: Nitrous Oxide Emission Rate") +
theme_economist()
```
### CFC.11
```{r}
ggplot(greenhouse_gas_ymd, aes(x = year_month, y = CFC.12)) +
#geom_bar( position = "dodge", stat = "identity",color= "white") +
geom_line(stat = "identity", color = "black") +
geom_smooth(method = "lm", se = FALSE) +
xlab("Year") +
ylab("Emission Rate") +
ggtitle("CFC.12: Dichlorodifluoromethane Emission Rate") +
theme_economist()
```
c