Climate changes having major effect on society which can be seen by analysing how air quality, water, agriculture, human health, food energy sources, and ecosystem are getting negatively impact.Weather department experts and scientist keeping an close eye on climate related changes and global warming which affecting each factor of human’s daily life.
Climate related data has been extracted from below mentioned different sources to understand the climate changes. This data helps to plot global land temperature, global sea level, and global atmospheric carbon dioxide (CO2) level over the period of time. There are visualization to show maximum and minimum temperature of United States of America’s States. This dashboard helps to uncover various factors which getting impacted directly or indirectly due to climate changes.
Data has been extracted from below sources.
1. Global Land Temperature
2. Global Sea Level
3. Atmospheric Carbon Dioxide
4. Temperature Data
Global Climate Changes tab has three subtabs to show global land temperature, global sea level, and global atmospheric carbon dioxide (CO2) level over the period of time.
Question raised by seeing this analysis are :
1. Is increase in land temperature and sea level directly relates to level of carbon dioxide increases in environment ?
2. What human actions causing increase in carbon dioxide in environment and how it can be avoid ?
3. What will be climate forescast for next 50 years and what will be its implications ?
A temperature analysis for United States of America’s States shows how temperature vary between states where it can be seen California has highest temperature 134 F, Arizona with 128 F comes under on second state for high temperature. In minimum temperature, Alaska got first position with temperature -80 F. Virgin Islands doesnt have much difference between maximum (80 F) and minimum (51 F) temperature.
This analysis arise below questions :
1. How latituate and longitude relate with state ’s temperature ?
2. How maximum and minimum temperature has been changed between US states over period of time ?
---
title: "ANLY 512-LAB 2"
author: "Anurag Gupta"
date: "`r Sys.Date()`"
output:
flexdashboard::flex_dashboard:
orientation: rows
social: menu
source_code: embed
vertical_layout: fill
css: styles.css
---
Overview
=====================================
Column {data-width=600}
-------------------------------------
### **Overview**
Climate changes having major effect on society which can be seen by analysing how air quality, water, agriculture, human health, food energy sources, and ecosystem are getting negatively impact.Weather department experts and scientist keeping an close eye on climate related changes
and global warming which affecting each factor of human's daily life.\
Climate related data has been extracted from below mentioned different sources to understand the climate changes.
This data helps to plot global land temperature, global sea level, and global atmospheric carbon dioxide (CO2) level over the period of time.
There are visualization to show maximum and minimum temperature of United States of America's States. This dashboard helps to uncover
various factors which getting impacted directly or indirectly due to climate changes.\
Data has been extracted from below sources.\
1. [Global Land Temperature](http://climate.nasa.gov/system/internal_resources/details/original/647_Global_Temperature_Data_File.txt)\
2. [Global Sea Level](http://sealevel.colorado.edu/files/2018_rel1/sl_ns_global.txt)\
3. [Atmospheric Carbon Dioxide](ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_mm_mlo.txt)\
4. [Temperature Data](https://www.ncdc.noaa.gov/extremes/scec/records/all)
Global Climate Changes
=====================================
```{r setup, include=FALSE}
chooseCRANmirror(graphics=FALSE, ind=1)
library(flexdashboard)
library(rnoaa)
library(dygraphs)
library(ggplot2)
library(lubridate)
library(readr)
library(plotly)
library(readxl)
theme = theme(text = element_text(size = 12),
legend.background = element_rect(fill="white",
size=0.5, linetype="solid", colour ="black"), legend.position = "right",
axis.text.x=element_blank(),
axis.ticks.x=element_blank(),
plot.title = element_text(hjust = ".5"),
plot.caption = element_text(hjust = 0.2,color = "black", face = "italic"))
```
Column {.tabset data-height=550}
-----------------------------------------------------------------------
### Global Land Temperature
Analysis of Global Land Temperature
```{r, echo = FALSE, message = FALSE}
# Fetch the latest Data for Global Land Temperature
landTempData = read.table("http://climate.nasa.gov/system/internal_resources/details/original/647_Global_Temperature_Data_File.txt", header = FALSE, col.names = c("Year","Yearly_Mean","Five_Year_Mean"),skip = 5, nrows=144)
# Transforming Data for Visulation
landTempData[,3] = as.numeric(as.character(landTempData[,3]))
scale_landTempData= landTempData
scale_landTempData[,2] = scale(landTempData$Yearly_Mean)
scale_landTempData[,3] = scale(landTempData$Five_Year_Mean)
landTempData_time_series = ts(scale_landTempData$Five_Year_Mean, frequency = 1, start=c(1880))
# Graph creation of Temperature Anomaly of Annual 5-Year Mean
dygraph(landTempData_time_series, main = "Temperature Anomalies of Five Year Mean Time Series Data") %>% dyAxis("y", label="Temperature Anomaly of Annual 5-Year Mean") %>% dyAxis("x", label="Year")
```
### Global Sea Level
Analysis of Global Sea Level
```{r, echo = FALSE, message = FALSE}
# Fetch the latest Data for Global Sea Level
seaLevelData <- read.table("http://sealevel.colorado.edu/files/2018_rel1/sl_ns_global.txt", header = FALSE, col.names = c("year","msl"),skip = 1, nrows=895)
# Transforming Data for Visulation
seaLevelData$datetime <- date_decimal(seaLevelData$year)
seaLevelData$date <- as.Date(format(seaLevelData$datetime, "%Y-%m-%d"), format = "%Y-%m-%d")
# Graph creation of Global Mean Sea Level
ggplot(seaLevelData, aes(date, msl)) +
geom_point(color = "brown", size = 1)+
stat_smooth(method = "lm") +
xlab("Year") +
ylab(expression(paste(Delta, " MSL (mm)"))) +
ggtitle("Global Mean Sea Level") +theme+
theme_bw()
```
### Atmospheric Carbon Dioxide
Analysis of Atmospheric Carbon Dioxide
```{r, echo = FALSE, message = FALSE}
# get data
coData = read.table("ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_mm_mlo.txt", header = FALSE, col.names = c("Year","Month","Decimal_Date","Average","Interpolated","Trend","Days"), skip = 70)
# Transforming Data for Visulation
coData$Average = replace(coData$Average, coData$Average == -99.99, NA)
coData$Days = replace(coData$Days, coData$Days == -1, NA)
scale_coData = coData
scale_coData$Interpolated = scale(coData$Interpolated)
coData_time_series = ts(scale_coData$Interpolated, frequency = 12, start = c(1958,3))
# plot
dygraph(coData_time_series, main = "Time Series Chart of Monthly Mean Atmospheric CO2 Levels")%>% dyAxis("y", label="Monthly Mean Atmospheric CO2 Level") %>% dyAxis("x", label="Year")
```
Temperature Analysis
=====================================
Column { data-height=600}
-----------------------------------------------------------------------
### Maximum Temperature
```{r,echo = FALSE, message = FALSE}
usTempData <- read_excel("D:/Study/Anly512/LAB 2/My/record.xls")
maxTempData <- usTempData %>% filter(usTempData$Element == "All-Time Maximum Temperature")
maxTempGraph = ggplot(maxTempData, aes(x = State, y = Value)) +
geom_bar(aes(fill=State),stat="identity",width = 0.5,
position = position_dodge()) +
xlab("State") + ylab("Temperature (F)") +
ggtitle("Maximum Temperature-USA States")+ theme_bw() + theme
ggplotly(maxTempGraph)
```
### Minimum Temperature
```{r,echo = FALSE, message = FALSE}
minTempData <- usTempData %>% filter(usTempData$Element == "All-Time Minimum Temperature")
minTempGraph = ggplot(minTempData, aes(x = State, y = Value)) +
geom_bar(aes(fill=State),stat="identity",width = 0.5,
position = position_dodge()) +
xlab("State") + ylab("Temperature (F)") +
ggtitle("Minimum Temperature-USA States")+ theme_bw() + theme
ggplotly(minTempGraph)
```
Observation
=====================================
Column {data-width=600}
-------------------------------------
### **Observations**
Global Climate Changes tab has three subtabs to show global land temperature, global sea level, and global atmospheric carbon dioxide (CO2) level
over the period of time.\
Question raised by seeing this analysis are :\
1. Is increase in land temperature and sea level directly relates to level of carbon dioxide increases in environment ? \
2. What human actions causing increase in carbon dioxide in environment and how it can be avoid ?\
3. What will be climate forescast for next 50 years and what will be its implications ? \
A temperature analysis for United States of America's States shows how temperature vary between states where it can be seen California has highest temperature 134 F, Arizona with
128 F comes under on second state for high temperature. In minimum temperature, Alaska got first position with temperature -80 F. Virgin Islands doesnt have much difference between maximum (80 F) and
minimum (51 F) temperature.\
\
This analysis arise below questions :\
1. How latituate and longitude relate with state 's temperature ?\
2. How maximum and minimum temperature has been changed between US states over period of time ?\