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 your 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 should take you 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 you will have to complete a number of steps:
Dates & Deliverables
You are responsible for submitting a link to your dashboard hosted on the Rpubs site. The dashboard must include the source_code = embed parameter.
The due date for this project is XX at the start of class. This assignment is worth 75 points, 3x a normal homework, the additional time should allow you to spend the neccessary effort on this assignment.
You are welcome to work in groups of ≤2 people. However, each person in a group must submit their own link to the assignment on moodle for grading! Each team member can submit the same link to a single rpubs account, however it may be a good idea for each of you to post your own copy to rpubs in case you want to share it to prospective employers ect.
Getting data
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.
The Maps shows the statewide minimum / maximum temprature accross the United states of America between 5 years peiord. From the map we can see that the temperatures seem to rise steadily as we go north as seen with the gradient color in both maps.
The graph shows trend of annual national average temperture between 1900 to 2019. From the graph we can see that temprature has been increasing stedly over the time.
The Residential Energy Demand Temperature Index (REDTI) is based on population weighted heating and cooling degree days, and as such, is a valuable tool for explaining year-to-year fluctuations in energy demand for residential heating and cooling.
Above chart show the REDTI between 1900 to 2019. From the graph we can see that the energy demand temperature is gradually increassing over the periods. Based on the graph REDTI index has been increased almost 12 points in last 100 years. This finding also corelate with the annual national average temperture findings.
Lower Tropospheric Global Temperature is the most common index to measure see the earth’s global warming. Above graph shows the Annual Lower Tropospheric Global Temperature between 1979 to 2019. In general, The Annual lower tropospheric temperature anomalies has been increased over the last 100 years. Despite of few spikes in 2000 and 2019, the overall trend is increasing.
Graph show the Sea Ice content of Northern Hemisphere. This graph shows the data between 1979 to 2019 of August month. We can see from the graph that Sea Ice is slowly decreasing over the time.
Conclusion After analyzing the last century data, we can conclude that global temperature has been gradually increasing may be because of the industrialization, deforestation, pollution. Which causing a global warming effect; as a result of increasing temperature and global warming See Ice is gradually melting which may increases the see level.
---
title: "ANLY 512-Lab 2 Data Exploration and Analysis"
auther: "Rajan Patel"
output:
flexdashboard::flex_dashboard:
storyboard: true
social: menu
source: embed
---
### Instruction
**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 your 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 should take you 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 you will have to complete a number of steps:
1. Identify what information interests you about climate change.
2. Find, collect, organize, and summarize the data necessary to create your data exploration plan.
3. Design and create the most appropriate visualizations (no less than 5 visualizations) to explore the data and present that information.
4. Finally organize the layout of those visualizations into a dashboard (use the flexdashboard package) in a way that shows your path of data exploration.
5. Develop four questions or ideas about climate change from your visualizations.
**Dates & Deliverables**
You are responsible for submitting a link to your dashboard hosted on the Rpubs site. The dashboard must include the source_code = embed parameter.
The due date for this project is XX at the start of class. This assignment is worth 75 points, 3x a normal homework, the additional time should allow you to spend the neccessary effort on this assignment.
You are welcome to work in groups of ≤2 people. However, each person in a group must submit their own link to the assignment on moodle for grading! Each team member can submit the same link to a single rpubs account, however it may be a good idea for each of you to post your own copy to rpubs in case you want to share it to prospective employers ect.
***
**Getting data**
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.
```{r setup, include=FALSE}
library(flexdashboard)
library(maps)
library(ggmap)
library(dplyr)
library(ggplot2)
library(maptools)
```
### U.S.statewide Min/Max temprature
```{r}
#Getting dataset from ncdc using the URL.
maxTempData = read.csv(url("https://www.ncdc.noaa.gov/cag/statewide/mapping/110-tmax-201906-60.csv"), skip=3)
maxTempData$region = tolower(maxTempData$Location)
us_states = map_data("state")
maxTempData = merge(us_states, maxTempData, by="region", all=T)
ggplot(maxTempData, aes(x = long, y = lat, group = group, fill = Value)) +
geom_polygon(color = "white") +
scale_fill_gradient(name = "Degrees Fahrenheit", low = "#feceda", high = "#c81f49", guide = "colorbar", na.value="black") +
labs(title="Statewide Maximum Temperature [July 2014 - June 2019]", x="Longitude", y="Latitude")+
coord_map()
#Getting Data from NCDC
minTempData = read.csv(url("https://www.ncdc.noaa.gov/cag/statewide/mapping/110-tmin-201906-60.csv"),skip=3)
minTempData$region = tolower(minTempData$Location)
minTempData = merge(us_states, minTempData, by="region", all=T)
ggplot(minTempData, aes(x = long, y = lat, group = group, fill = Value)) +
geom_polygon(color = "white") +
scale_fill_gradient(name = "Degrees Fahrenheit", na.value="black") +
labs(title="Statewide Minumum Temperature [July 2014 - June 2019] ", x="Longitude", y="Latitude")+
coord_map()
```
***
The Maps shows the statewide minimum / maximum temprature accross the United states of America between 5 years peiord. From the map we can see that the temperatures seem to rise steadily as we go north as seen with the gradient color in both maps.
### Annual National Average Temperture
```{r}
avgTemp = read.csv(url("https://www.ncdc.noaa.gov/cag/national/time-series/110-tavg-1-6-1900-2019.csv?base_prd=true&begbaseyear=1900&endbaseyear=2019"), skip=4)
avgTemp$Date = substr(avgTemp$Date, 0, 4)
avgTemp$Date = as.numeric(avgTemp$Date)
ggplot( avgTemp, aes( x = Date, y = Value, group = 1)) +
geom_line(color = "#09557f") +
geom_smooth(method='lm', se=FALSE, color='black') +
labs(title="Annual National Average Temperature", x="Year", y="Temperature (F)")
```
***
The graph shows trend of annual national average temperture between 1900 to 2019. From the graph we can see that temprature has been increasing stedly over the time.
### Residential Energy Trend
```{r}
REDTI_data = read.csv(url("https://www.ncdc.noaa.gov/societal-impacts/redti/USA/jun/1-month/data.csv"),skip=1)
ggplot(REDTI_data,aes(x=Date,y=REDTI)) +
geom_area(color = "black" ,fill = "gray")+
scale_y_continuous(limits = c(0, 100))+
geom_smooth(method='lm',se=FALSE)+
labs(title="Annual Residential Energy Demand Temperature Index [REDTI]",x="Year",y="REDTI")
```
***
The Residential Energy Demand Temperature Index (REDTI) is based on population weighted heating and cooling degree days, and as such, is a valuable tool for explaining year-to-year fluctuations in energy demand for residential heating and cooling.
Above chart show the REDTI between 1900 to 2019. From the graph we can see that the energy demand temperature is gradually increassing over the periods. Based on the graph REDTI index has been increased almost 12 points in last 100 years. This finding also corelate with the annual national average temperture findings.
### Lower Tropospheric Global Temperature
```{r}
LTGP_data <- read.csv(url("https://www.ncdc.noaa.gov/temp-and-precip/msu/global/lt/dec/ytd/data.csv"),skip=1)
LTGP_data_melted <- reshape2::melt(LTGP_data, id.var='Year')
ggplot(LTGP_data_melted, aes(x=Year, y=value, col=variable)) +
geom_line() +
labs(title="Annual Lower Tropospheric Global Temperature Anomalies",
x = "Year",
y = "Anomalies",
color=NULL)
```
***
Lower Tropospheric Global Temperature is the most common index to measure see the earth's global warming. Above graph shows the Annual Lower Tropospheric Global Temperature between 1979 to 2019. In general, The Annual lower tropospheric temperature anomalies has been increased over the last 100 years. Despite of few spikes in 2000 and 2019, the overall trend is increasing.
### Northern Hemisphere Sea Ice Extent
```{r}
NHSI_data <- read.csv(url("https://www.ncdc.noaa.gov/snow-and-ice/extent/sea-ice/N/8.csv"),skip=3)
ggplot(NHSI_data,aes(x=Date,y=Value))+
geom_point(color = "brown")+
geom_smooth(method = 'lm', color = "tomato")+
labs(title="August Northern Hemisphere Sea Ice Extent (1979-2019)",x="Year",y="million square km")
```
***
Graph show the Sea Ice content of Northern Hemisphere. This graph shows the data between 1979 to 2019 of August month. We can see from the graph that Sea Ice is slowly decreasing over the time.
### Observation and Questions
1. Is there a pattern in Annual National Average Temperature?
- Yes, Annual National Average Temperature has gradually increased over the time. The trend shows that average temp has increased from 68 F to almost 69. 5 F over the last century.
2. Is there any correlation between Residential Energy Demand Temperature Index and the Annual National Average Temperature?
- Yes. There is a positive correlation. REDTI has also increased over the last century. May be because of the increasing temperature demand for Residential energy has increased.
3. What’s the trend looks like for Lower Tropospheric Global Temperature?
- As we can see from the graph, the Lower Tropospheric Global Temperature has increased a lot in last century. Which also indicate that this increasing temperature also increasing the global worming effect.
4. Is there any correlation between increasing temperature and Northen Hemisphere sea ice extent?
- Yes, there is a negative correlation. It seems like increasing temperature causing a global worming effect which decreasing Sea Ice content in Northern Hemisphere.
**Conclusion**
After analyzing the last century data, we can conclude that global temperature has been gradually increasing may be because of the industrialization, deforestation, pollution. Which causing a global warming effect; as a result of increasing temperature and global warming See Ice is gradually melting which may increases the see level.