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:
The map shows the statewide maximum temperature across the USA between 5 years period. From the map we can observe that the temperature seem to rise steadily as we move towards north.
The map shows the statewide minimum temperature across the USA between 5 years period. From the map we can observe that the temperatures seem to rise steadily as we move towards north.
The graph shows trend of annual national average temperature between the years 1895 to 2023. Based on the graph we can observe that temperature has been increasing steadily over the time.
The graph shows sea ice extent of the Northern Hemisphere between the years 1979 to 2022, for the month of August. We can observe from the graph that sea ice extent is slowly decreasing over the time.
Conclusion Based on the analysis, we can conclude that global temperature has been gradually increasing due to reasons like pollution, deforestation, and industrialization. These factors are positively contributing to global warming effect, due to which sea ice extent is gradually melting and in turn increasing the see level which might cause flooding in countries/cities below sea level. These natural calamities would become worse if no action is taken and could cause serious problems to the mankind.
---
title: "Lab 2 Data Exploration & Visualization - Climate Change"
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.
```{r}
#Load the required libraries
library(dplyr)
library(flexdashboard)
library(ggmap)
library(ggplot2)
library(maps)
library(maptools)
```
### U.S. Statewide Maximum Temprature
```{r}
#Read data from the NCDC website
maxTemp_data = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/statewide/mapping/110-tmax-202302-60.csv"),
skip = 3)
maxTemp_data$region = tolower(maxTemp_data$Location)
us_states = map_data("state")
maxTemp_data = merge(us_states, maxTemp_data, by = "region", all = TRUE)
ggplot(maxTemp_data, 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 = "Mar 2018 - Feb 2023 Contiguous U.S. Statewide Max Temperature",
x = "Longitude",
y = "Latitude") +
coord_map()
```
***
The map shows the statewide maximum temperature across the USA between 5 years period. From the map we can observe that the temperature seem to rise steadily as we move towards north.
### U.S. Statewide Minimum Temprature
```{r}
#Read data from the NCDC website
minTemp_data = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/statewide/mapping/110-tmin-202302-60.csv"),
skip = 3)
minTemp_data$region = tolower(minTemp_data$Location)
minTemp_data = merge(us_states, minTemp_data, by = "region", all = TRUE)
ggplot(minTemp_data, aes(x = long, y = lat, group = group, fill = Value)) +
geom_polygon(color = "white") +
scale_fill_gradient(name = "Degrees Fahrenheit",
na.value = "black") +
labs(title = "Mar 2018 - Feb 2023 Contiguous U.S. Statewide Min Temperature",
x = "Longitude",
y = "Latitude") +
coord_map()
```
***
The map shows the statewide minimum temperature across the USA between 5 years period. From the map we can observe that the temperatures seem to rise steadily as we move towards north.
### Annual National Average Temperture
```{r}
#Read data from the NCDC website
avgTemp_data = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/national/time-series/110/tmax/1/3/1895-2023.csv?base_prd=true&begbaseyear=1901&endbaseyear=2000"),
skip = 4)
avgTemp_data$Date = substr(avgTemp_data$Date, 0, 4)
avgTemp_data$Date = as.numeric(avgTemp_data$Date)
ggplot(avgTemp_data, aes(x = Date, y = Value, group = 1)) +
geom_line(color = "red") +
geom_smooth(method = "lm", se = FALSE, color = "blue") +
labs(title = "Annual National Average Temperature",
x = "Year",
y = "Temperature (F)")
```
***
The graph shows trend of annual national average temperature between the years 1895 to 2023. Based on the graph we can observe that temperature has been increasing steadily over the time.
### Northern Hemisphere Sea Ice Extent
```{r}
#Read data from the NCDC website
NHSIE_data = read.csv(url("https://www.ncdc.noaa.gov/snow-and-ice/extent/sea-ice/N/8.csv"),
skip = 4)
ggplot(NHSIE_data, aes(x = Date, y = Value)) +
geom_point(color = "red") +
geom_smooth(method = "lm", color = "blue")+
labs(title = "August Northern Hemisphere Sea Ice Extent (1979-2022)",
x = "Year",
y = "Million Square Kilometer")
```
***
The graph shows sea ice extent of the Northern Hemisphere between the years 1979 to 2022, for the month of August. We can observe from the graph that sea ice extent is slowly decreasing over the time.
### Observation and Questions
1. Is there a trend to the temperatures in the USA?
- Yes, based on the statewide graphs we can conclude that the temperature is rising steadily as we move towards north.
2. 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 temperature has increased from 68F to almost 69.5F over the last century.
3. Is there any correlation between increasing temperature and northern hemisphere sea ice extent?
- Yes, there is a negative correlation. We can conclude that as the temperature increases, the sea ice extent is decreasing in the northern hemisphere due to global worming effect.
**Conclusion**
Based on the analysis, we can conclude that global temperature has been gradually increasing due to reasons like pollution, deforestation, and industrialization. These factors are positively contributing to global warming effect, due to which sea ice extent is gradually melting and in turn increasing the see level which might cause flooding in countries/cities below sea level. These natural calamities would become worse if no action is taken and could cause serious problems to the mankind.