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:
Climate change is a pressing concern that requires urgent action. Climate migration due to abnormally low or heavy rainfalls, deforestation, loss of agricultural crops, among other issues is a growing concern. In large part, the rising temperatures across the globe is consistent and worrisome because it is leading to reduced seas ice coverage and rising sea levels. Some of the aspects of climate that I have focused on are greenhouse gas emissions across the globe (specifically Nitrous Oxide, Carbon Dioxide and Methane), temperature anomalies across the troposhpere and the stratosphere, national average temperature trend across the U.S., and global land and sea temperature anomalies. I believe this information is essential to furthering urgent actions to address rising temperatures.
What can be determined from the data analyzed and the graphics
Based on the data analyzed and the visualizations, the final observations can be drawn (1)There is a rise in the super pollutant greenhouse gases, specifically nitrous oxide, carbon dioxide and methane. Each of these gases has the capacity to trap heat in the troposphere and the stratosphere which can lead to increase in global temperatures. (2)There appear to be more lower tropospheric anomalies which lead to trapping heat - compared to the tropospheric anomalies,the stratospheric temperatures have seen a greater tendency towards negative anomalies since the mid-90s. The anomalies show constant fluctuations which could further be studies in relation to greenhouse gas emissions to see the impact of such emissions on these anomalies. (3)Temperatures across the U.S have increased between 1900 and 2022 (July) - this is extremely concerning because higher temperatures can lead to natural disasters and climate migration. (4) The global sea ice coverage has decreased since 1979 and up until 2022. It is interesting to note that the there is a difference between the loss of sea ice coverage in the Northen Hemisphere as compared to the Southern hemisphere - this might possibly indicate greater trend of emission of greenhouse gases in the Northern Hemisphere. Further research could be done into carbon-producing activities in the Northern Hemisphere countries compared to the South to determine if a disparity in emission of greenhouse gases is the cause (or one of the causes) of this difference in sea ice coverage loss.
---
title: 'ANLY 512 Lab 2'
author: "Manisha Panda"
date: "2023-04-11"
output:
flexdashboard::flex_dashboard:
source: embed
orientation: columns
vertical_layout: fill
---
Introduction
===========================
### **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.
### **Introduction**
Climate change is a pressing concern that requires urgent action. Climate migration due to abnormally low or heavy rainfalls, deforestation, loss of agricultural crops, among other issues is a growing concern. In large part, the rising temperatures across the globe is consistent and worrisome because it is leading to reduced seas ice coverage and rising sea levels. Some of the aspects of climate that I have focused on are greenhouse gas emissions across the globe (specifically Nitrous Oxide, Carbon Dioxide and Methane), temperature anomalies across the troposhpere and the stratosphere, national average temperature trend across the U.S., and global land and sea temperature anomalies. I believe this information is essential to furthering urgent actions to address rising temperatures.
```{r setup, include=FALSE}
library(flexdashboard)
library(maptools)
library(ggplot2)
library(maps)
library(ggmap)
library(dplyr)
library(viridis)
library(dygraphs)
library(rnoaa)
library(reshape)
library(reshape2)
```
Greenhouse Emissions
=====================================
Text {.sidebar}
-------------------------------------
### Question 1
**What are the trends for global Atmospheric Nitrous Oxide,Carbon Dioxide, and Methane levels?**
Rising temperatures across the earth is one of the most important issues when it comes to climate change. One of the reasons for rising temperatures is the emission of greenhouse gases such as methane, nitrous oxide and carbon dioxide.The source of the data is NOAA and the graph represents the average annual Nitrous Oxide emissions from 2001 to 2022. Based on the graph, the Nitrous Oxide levels have been consistently rising since 2001. Carbon Dioxide emission appear to have been on the rise since 1959 and are especially concerning because of its ability to last for hundreds of years in the atmosphere which leads to heat being trapped for very long periods of time. For methane, the slope has been almost steady. However, there are two interesting points that emerge if we look at the year-on-year plots. There was virtually no increase on average between 2000-2005. On the other hand, the rate of increase in methane gases is almost at its highest from 2020-2022.
Column {.tabset .tabset-fade}
-----------------------------
### Nitrous Oxide Emissions
```{r}
###Nitrous Oxide
DataN=read.csv(url("https://gml.noaa.gov/webdata/ccgg/trends/n2o/n2o_annmean_gl.csv"),skip=60,62)
ggplot(DataN,aes(x=year,y=mean))+
geom_point(color="green")+
stat_smooth(method=lm)+
ggtitle("2001-2022 Average Global Nitrous Oxide Emissions")+
labs(x="Year",y="Mean Global Nitrous Oxide Emissions")
```
### Carbon Dioxide Emissions
```{r}
DataC=read.csv(url("https://gml.noaa.gov/webdata/ccgg/trends/co2/co2_annmean_gl.csv"),skip=54)
ggplot(DataC,aes(x=year,y=mean))+
geom_point(color="orange")+
stat_smooth(method=lm)+
ggtitle("1979-2022 Average Global Carbon Dioxide Emissions")+
labs(x="year",y="Mean Carbon Dioxide Emissions")
```
### Methane Emissions
```{r}
DataM=read.csv(url("https://gml.noaa.gov/webdata/ccgg/trends/ch4/ch4_annmean_gl.csv"),skip=60,62)
ggplot(DataM,aes(x=year,y=mean))+
geom_point(color="pink")+
stat_smooth(method=lm)+
ggtitle("1979-2022 Average Global Methane Emissions")+
labs(x="year",y="Mean Methane Emissions")
```
Surface Layer Anomalies
=====================================
Text {.sidebar}
-------------------------------------
<br>
### Question 2
**What are the trends that can be seen for the tropospheric and the stratospheric layers?**
The tropospheric layer is at its warmest close to the earth's surface - the lowest temperatures of this layer have been increasing due greenhouse gas emissions. Stratospheric and troposheric temperatures are heavily impacted by human activities such as extraction of fossil fuels. The graphs below show the lower tropospheric anomalies from 1979 to 2022. The data has been taken from https://www.ncei.noaa.gov/access/monitoring/msu/ and contains the global temperature anomalies recorded by UAH and RSS. The tropospheric temperature anomalies are concerning since it has been constantly deviating from the base range and has been increasing since 1979. The stratospheric temperature anomalies look to be more stable than tropospheric temperature anomalies although there was a sharp increase around 1992.Contrary to the pattern seen in the tropospheric temperatures, the stratospheric temperatures have seen a greater tendency towards negative anomalies since the mid-90s
Column {data-height=650 .tabset .tabset-fade}
-------------------------------------------------------
### Lower Tropospheric Temperature Anomalies (1979-2022) {data-width=500}
```{r}
### Lower Troposhperic Anomalies
Globallowertrop=read.csv(url("https://www.ncei.noaa.gov/access/monitoring/msu/time-series/global/lt/ann/12/data.csv"),skip=1)
colnames(Globallowertrop)=c("Year","UAH","RSS")
UAH <- ts(Globallowertrop$UAH, frequency = 1, start=c(1979))
RSS <- ts(Globallowertrop$RSS, frequency = 1, start=c(1979))
anomalies <- cbind(UAH, RSS)
dygraph(anomalies, main = "Global Annual Lower Tropospheric Anomalies from 1979 to 2022", xlab = "Year", ylab="Anomaly") %>%
dyRangeSelector() %>%
dyLegend(width = 500, show = "onmouseover") %>%
dyOptions(drawGrid = FALSE) %>%
dyOptions(colors = RColorBrewer::brewer.pal(3, "Set2"))
```
### Lower Stratospheric Temperature Anomalies (1979-2022)
```{r}
###Lower Stratopsheric Anomalies
Globallowerstrat=read.csv(url("https://www.ncei.noaa.gov/access/monitoring/msu/time-series/global/ls/ann/12/data.csv"),skip=1)
UAH <- ts(Globallowerstrat$UAH, frequency = 1, start=c(1979))
RSS <- ts(Globallowerstrat$RSS, frequency = 1, start=c(1979))
NESDIS <- ts(Globallowerstrat$NESDIS, frequency = 1, start=c(1979))
anomalies <- cbind(UAH, RSS, NESDIS)
dygraph(anomalies, main = "Global Annual Lower Stratospheric Temperature Anomalies from 1979 to 2022", xlab = "Year", ylab="Anomaly") %>%
dyRangeSelector() %>%
dyLegend(width = 500, show = "onmouseover") %>%
dyOptions(drawGrid = FALSE) %>%
dyOptions(colors = RColorBrewer::brewer.pal(3, "Set1"))
```
Temperature Trend across U.S.
=================================================
Text {.sidebar}
-------------------------------------
<br>
### Question 3
**What are the average temperature trends across the U.S.? Are they increasing?**
Rising temperatures are a major concern of the climate change discussion. It is a marker of global warming and is heavily influenced by human caused pollution, fossil fuel burning and extraction, and deforestation among other reasons. The graph below shows an increase in the National Average Temperature across the U.S. in the month of June from 1900 to 2022. The trend sows that there has been an increase in the average temperature in the month of June between 1900 and 2022 at the national level. This change impacts agricultural practices and potentially impacts the possibility of more droughts in the future.
Column
-------------------------
### National Temperature Average in the U.S. (1900-2022)
```{r}
UStempavg= read.csv(url("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/national/time-series/110/tavg/1/6/1900-2022.csv?base_prd=true&begbaseyear=1900&endbaseyear=2022"),skip=4)
UStempavg$Date=substr(UStempavg$Date,0,4)
UStempavg$Date=as.numeric(UStempavg$Date)
ggplot(UStempavg,aes(x=Date,y=Value,group=1))+
geom_line(color="#09557f")+
geom_smooth(method='lm',se=FALSE,color='black')+
labs(title="National Average Temperature Across the US from 1900 to 2022 (June)",x="Year",y="Temperature(F)")
```
Global Sea Ice Coverage
==========================
Text {.sidebar}
-------------------------------------
<br>
### Question 4
**Is the Global Sea Ice Coverage decreasing across the Northern and the Southern Hemispheres?**
Melting sea ice is extremely alarming because of the impact it has on marine life as well as surface temperatures. In the Northern Hemisphere, the sea ice coverage measured in July reduced between 1979 and 2022 by around 2 million sq. km. This represented a roughly 20% loss in sea ice cover in the Northern Hemisphere.
In the Southern Hemisphere, the change was far less drastic. The loss in sea ice was around 1.5 million sq. km, meaning a drop of only 9%. Still concerning, but less so than the Northern Hemisphere.
Globally, these numbers correspond to a loss of sea ice of around 3.5 million sq. km, or around 13%.
Column {.tabset .tabset-fade}
-----------------------------
### Global Sea Ice Coverage in the Northern Hemisphere (July 1979-2022)
```{r}
GSINH=read.csv(url("https://www.ncei.noaa.gov/access/monitoring/snow-and-ice-extent/sea-ice/N/7/data.csv"),skip=4)
colnames(GSINH)=c("Year","Value","Anomaly")
ggplot(data=GSINH,aes(x=Year,y=Value))+geom_bar(stat="identity",fill="blue")+
ylab("Extent (million sq km)")+
ggtitle("Extent of Sea Ice Coverage in Northern Hemisphere between July 1979 and 2022")
```
### Global Sea Ice Coverage in the Southern Hemisphere (July 1979-2022)
```{r}
GSISH=read.csv(url("https://www.ncei.noaa.gov/access/monitoring/snow-and-ice-extent/sea-ice/S/7/data.csv"),skip=4)
colnames(GSISH)=c("Year","Value","Anomaly")
ggplot(data=GSISH,aes(x=Year,y=Value))+geom_bar(stat="identity",fill="light blue")+
ylab("Extent (million sq km)")+
ggtitle("Extent of Sea Ice Coverage in Southern Hemisphere between July 1979 and 2022")
```
Global Land and Ocean Temperatures
===================================
Text {.sidebar}
-------------------------------------
<br>
### Question 5
**What is the trend associated with global land and temperature anomalies?**
Changes to global land and ocean temperatures is concerning since it impacts rise in sea-levels,loss of marine life, droughts, heat waves, climate migration and other natural disasters. Both of the graphs shown below refer to the increase in global temperature based on the global land and ocean temperature anomalies data from https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/global/time-series/globe/land_ocean/1/1/1900-2023?trend=true&trend_base=10&begtrendyear=1900&endtrendyear=2023. The data is taken for the month of January. It appears to have been consistently increasing and has remained above zero since aroun 1975-80 up until January 2023. Both graphs show a clear trend towards positive temperature anomalies, with the degree of anomalies far exceeding zero each year. This is highly concerning as the constant, unbalanced rise in positive anomalies is having serious ecological consequences.
It is also interesting to see that the data points in the early 1900s show a greater variation from the average. Some years around 1910 showed negative anomalies up to -0.6 degrees, while adjacent years may have shown positive anomalies. However, the data points in the last ten years show lower variance among the data points, with all the anomalies being separated by only around 0.4 degrees.
Column {.tabset .tabset-fade}
-----------------------------
### Global Temperature (Land and Ocean) Graph 1 (Above and below zero)
```{r}
Globaltempanom=read.csv(url("https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/global/time-series/globe/land_ocean/1/1/1900-2023/data.csv?trend=true&trend_base=10&begtrendyear=1900&endtrendyear=2023"),skip=4)
colnames(Globaltempanom)=c("Year","Anomalies")
Globaltempanom$Year=as.numeric(Globaltempanom$Year)
Globaltempanom$Anomalies=as.numeric(Globaltempanom$Anomalies)
Globaltempanom$Level=with(Globaltempanom,ifelse(Anomalies>0,"Above Zero","Below Zero"))
ggplot(Globaltempanom,aes(x=Year,y=Anomalies,color=Level))+
geom_bar(stat="identity")+
scale_x_continuous(breaks=seq(1900,2023,20))+
labs(title="Global Land and Ocean Temperature Anomalies (January)",x="Year",y="Anomaly(C)",color="Level")+
theme_bw()
```
### Global Temperature Anomalies (Land and Ocean) Graph 2 (Trend)
```{r}
ggplot(Globaltempanom,aes(Year,Anomalies))+
geom_point(aes(color=Anomalies))+
geom_smooth(method="auto",se=FALSE)+
scale_color_viridis(discrete=F,option="C")+
scale_fill_viridis(discrete=F)+
labs(title="Global Land and Ocean Temperature Anomalies (January)",x="Year",y="Anomalies(C)")+
theme_bw()
```
Summary and Conclusion
=====================================
### **Conclusion and Observations**
**What can be determined from the data analyzed and the graphics**
Based on the data analyzed and the visualizations, the final observations can be drawn
(1)There is a rise in the super pollutant greenhouse gases, specifically nitrous oxide, carbon dioxide and methane. Each of these gases has the capacity to trap heat in the troposphere and the stratosphere which can lead to increase in global temperatures.
(2)There appear to be more lower tropospheric anomalies which lead to trapping heat - compared to the tropospheric anomalies,the stratospheric temperatures have seen a greater tendency towards negative anomalies since the mid-90s. The anomalies show constant fluctuations which could further be studies in relation to greenhouse gas emissions to see the impact of such emissions on these anomalies.
(3)Temperatures across the U.S have increased between 1900 and 2022 (July) - this is extremely concerning because higher temperatures can lead to natural disasters and climate migration.
(4) The global sea ice coverage has decreased since 1979 and up until 2022. It is interesting to note that the there is a difference between the loss of sea ice coverage in the Northen Hemisphere as compared to the Southern hemisphere - this might possibly indicate greater trend of emission of greenhouse gases in the Northern Hemisphere. Further research could be done into carbon-producing activities in the Northern Hemisphere countries compared to the South to determine if a disparity in emission of greenhouse gases is the cause (or one of the causes) of this difference in sea ice coverage loss.