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.
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:
What are the trend of average max and min temperature across US?
Maps depict statewide minimum and maximum temperatures across the United States over a five-year period.Both maps show a gradual rise in temperatures as we move north as evident from the gradient colors.
Is there a relationship between the annual temperature in the U.S.and global temperature rise?
Yes, there is a trend observed in both Global annual temperature and US temperature rise.The graph shows that temperature has increased steadily over time.
What is the effect of Residential Energy Demand temperature Index (REDTI) in the climate change?
A key determinant of residential energy demand fluctuations is the Residential Energy Demand Temperature Index (REDTI) which is based on population weighted heating and cooling degree days.
The graph shows that the energy demand temperature is gradually increasing over time from 1900 to 2019. According to the graph, the REDTI index has increased almost 12 points in the last century. Similarly, the results correlate with the national average temperature findings for the year.
Is there a relation between Northern Hemisphere Sea Ice and global warming?
An overview of the Sea Ice content in the Northern Hemisphere can be found in the graph below. This graph displays January-related data from 1979 to 2023. The graph shows that sea ice is gradually vanishing over time indicating global warming and climate change.
According to the analysis, the overall trend of rising temperatures in the region is consistent with a global climate change pattern. Therefore, more efforts should be made to mitigate the impact of rising temperatures in the region. Climate change impacts differ significantly across regions, so developing effective strategies to mitigate and adapt is crucial. In analyzing the last century’s data, we can conclude that global temperature has increased gradually caused by industrialization, deforestation, and pollution. The temperatures are rising and the ice is melting, which is causing a global warming and climate change.
---
title: "Lab 2 Data Exploration and Visualization Climate Change"
author: "Adil Abdul Habeeb"
date: "`r Sys.Date()`"
output:
flexdashboard::flex_dashboard:
orientation: rows
Horizontal_layout: fill
social: menu
source: embed
html_document: default
df_print: paged
pdf_document: default
---
# Table of Contents {.sidebar}
* Introduction
* US Statewide Temperature Analysis
* Residential Energy Trend
* Northern Hemisphere Sea Ice
* Global Temperature Trend
* Conclusion & Insights
# **Introduction**
Row {data-height=230}
-------------------------------------
### **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.
### **Four Questions to answer through this analysis**
1. What are the trend of average max and min temperature across US?
2. Is there a relationship between the annual temperature in the U.S.and global temperature rise?
3. What is the effect of Residential Energy Demand temperature Index (REDTI) in the climate change.?
4. Is there a relation between Northern Hemisphere Sea Ice and global warming?
***
```{r setup, include=FALSE}
library(readxl)
library(flexdashboard)
library(plyr)
library(dplyr)
library(ggplot2)
library(maps)
library(ggmap)
library(tidyverse)
library(rnoaa)
library(maptools)
library(xts)
library(zoo)
library(ggrepel)
library(maps)
library(ggsn)
library(stats)
library(knitr)
```
# **U.S.statewide temperature analysis**
## Column{data-height=900 .tabset .tabset-fade}
### Max/Min Temp Trend {data-width=900}
```{r}
maxTempData = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/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()
par(mfrow = c(1, 2))
#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 Minimum Temperature [July 2014 - June 2019] ", x="Longitude", y="Latitude")+
coord_map()
```
### Annual National Average Temperature {data-width=900}
```{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 = 0.5)) +
geom_line(color = "#09557f") +
geom_smooth(method='lm', se=FALSE, color='black') +
labs(title="Annual National Average Temperature", x="Year", y="Temperature (F)")
```
# **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")
```
# **Northern Hemisphere Sea Ice**
```{r}
NHSI=read_xlsx("/Users/Abdul/Downloads/NHSI.xlsx")
NHSI <-
NHSI %>%
select(Anomaly,Date) %>%
group_by(Date)
ggplot(NHSI,aes(x=Date,y=Anomaly/100))+
geom_point(colour = "brown")+
geom_smooth(method = 'lm', se=FALSE)+
labs(title="January Northern Hemisphere Sea Ice Extent (1979-2023)",x="Year",y="million square km")
```
# **Global Temperature Trend**
```{r echo=FALSE}
data4<- read.csv("/Users/Abdul/Downloads/temperature-anomaly.csv")
data4$Median.temperature.anomaly <- data4$Median.temperature.anomaly.from.1961.1990.average
data4 <-
data4 %>%
select(Global.average.temperature.anomaly.relative.to.1961.1990, Year) %>%
group_by(Year)
ggplot(data4, aes(Year, Global.average.temperature.anomaly.relative.to.1961.1990)) +
geom_area(colour = 'darkgreen', alpha = 0.2, fill= "yellow") +
theme_minimal()+
labs(
x = "Year",
y = "Median Temperature Anomaly",
title = "Global Temperature Anomaly 1850 -2022")
```
# **Conclusion and Insights**
1. What are the trend of average max and min temperature across US?
Maps depict statewide minimum and maximum temperatures across the United States over a five-year period.Both maps show a gradual rise in temperatures as we move north as evident from the gradient colors.
2. Is there a relationship between the annual temperature in the U.S.and global temperature rise?
Yes, there is a trend observed in both Global annual temperature and US temperature rise.The graph shows that temperature has increased steadily over time.
3. What is the effect of Residential Energy Demand temperature Index (REDTI) in the climate change?
A key determinant of residential energy demand fluctuations is the Residential Energy Demand Temperature Index (REDTI) which is based on population weighted heating and cooling degree days.
The graph shows that the energy demand temperature is gradually increasing over time from 1900 to 2019. According to the graph, the REDTI index has increased almost 12 points in the last century. Similarly, the results correlate with the national average temperature findings for the year.
4. Is there a relation between Northern Hemisphere Sea Ice and global warming?
An overview of the Sea Ice content in the Northern Hemisphere can be found in the graph below. This graph displays January-related data from 1979 to 2023. The graph shows that sea ice is gradually vanishing over time indicating global warming and climate change.
According to the analysis, the overall trend of rising temperatures in the region is consistent with a global climate change pattern. Therefore, more efforts should be made to mitigate the impact of rising temperatures in the region. Climate change impacts differ significantly across regions, so developing effective strategies to mitigate and adapt is crucial. In analyzing the last century's data, we can conclude that global temperature has increased gradually caused by industrialization, deforestation, and pollution. The temperatures are rising and the ice is melting, which is causing a global warming and climate change.