Introduction

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.

Introduction

The climate, and more specifically the changing climate, is an issue I find both of pressing concern, and also nearly too daunting to even begin to tackle. It is, at this point, undeniable that human action has resulted in the dramatic change of the global climate, with disastrous consequences on the horizon if we are unable to correct our course. It is common knowledge that the global Co2 levels are too high, but just how high are they? And what is the impact of the high levels of Co2 in our atmosphere? This is what interested me, and this is what I aimed to learn through this assignment.

Global CO2 Levels

Column

Global CO2 Levels

Global Temperatures

Column

Global Temperature Change in Degrees Celcius (1880 - 2022)

Global Sea Ice Coverage

Column

Global Land Temperature Anomalies in Degrees Celcius (1880 - 2019)

Sea Ice Coverage by Hemisphere

Column

Northern Hemisphere Global Ice Extent

Southern Hemisphere Global Ice Extent

Final Observations

Observation

What can we tell from all 5 graphics?

From the visualizations, we can clearly tell three things. First, global Co2 levels are at an all time high, and show no signs of slowing down. Second, the global temperature for land and in the oceans is also at an all time high. And third, the global sea ice levels are at an all time low, with both hemispheres showing record low levels of sea ice. Combining all of this information, we can determine that the global Co2 levels are likely the cause of the rising temperatures on land and sea, which in turn is resulting in the retreating of global sea ice. This highlights the importance of focusing on the Co2 levels in our atmosphere, and provides some context by the global push to reduce these levels.

---
title: "ANLY 512: Lab 2 - Data Exploration and Analysis Laboratory"
author: "Silmi Jariwalla"
date: "2023-04-08"
output:
  flexdashboard::flex_dashboard:
    storyboard: true
    social: menu
    source: embed
---
Introduction
===========================
### **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.


### **Introduction**

The climate, and more specifically the changing climate, is an issue I find both of pressing concern, and also nearly too daunting to even begin to tackle. It is, at this point, undeniable that human action has resulted in the dramatic change of the global climate, with disastrous consequences on the horizon if we are unable to correct our course. It is common knowledge that the global Co2 levels are too high, but just how high are they? And what is the impact of the high levels of Co2 in our atmosphere? This is what interested me, and this is what I aimed to learn through this assignment. 

```{r setup, include=FALSE}
library(flexdashboard)
library(maps)
library(ggmap)
library(dplyr)
library(ggplot2)
library(maptools)
library(dygraphs)
library(rnoaa)


```

Global CO2 Levels
===================================== 

Text {.sidebar}
-------------------------------------

### Question 1
**What is the trend for the global Co2 levels?**

This graph is of the Global Average Co2 Emissions from 1959 to 2022. The data is provided by the NOAA, and the Co2 levels are measured in ppm, or parts per million.

We can see from the trend line in the graphic that Co2 levels are sharply on the rise, and have consistently risen since 1959. This is likely due to the explosion of the global economy and the global supply chain, coupled with the consistent increased need for fossil fuels to power the global economy.

Column
------------------------
### Global CO2 Levels

```{r}
data5 = read.csv(url("https://gml.noaa.gov/webdata/ccgg/trends/co2/co2_annmean_mlo.csv"), skip=59)

ggplot(data5, aes(x=year, y=mean))+
  geom_point(color="red") +
  stat_smooth(method=lm) +
  ggtitle("Global Average Carbon Dioxide Emissions from 1959-2022")+
  labs(x="Year",y="Mean CO2 Emission Level (ppm)")

```

Global Temperatures
===================================== 

Text {.sidebar}
-------------------------------------

<br>

### Question 2
**What trends can we see in the global temperature?**

The dataset, obtained from the GISS, provides the global temperature anomalies from 1880 to 2022. This is an estimate of global surface temperature change, both on land and in the oceans. 

As we can see from the visualization, the global temperature has been steadily increasing, with a sharp rise as of 1976. We can also note a slight dip in 2020, likely due to the quarantine and lockdowns associated with the Covid-19 pandemic.

Column 
-------------------------

### Global Temperature Change in Degrees Celcius (1880 - 2022)

```{r}
data1 = read.table("https://data.giss.nasa.gov/gistemp/graphs/graph_data/Global_Mean_Estimates_based_on_Land_and_Ocean_Data/graph.txt", header = FALSE, col.names = c("Year","No_Smoothing","Lowess(5)"),skip = 5)
smoothing = ts(data1$Lowess.5.,frequency=1,start=c(1880))
anMean=ts(data1$No_Smoothing,frequency = 1,start=c(1880))
temp=cbind(smoothing,anMean)

dygraph(temp, main="Global Temperature Anomaly from 1880 - 2022 in Degrees Celcius", xlab="Year",ylab="Temperature Anomaly") %>%
  dyRangeSelector() %>%
  dyLegend(width = 250, show="onmouseover") %>%
  dyOptions(colors = RColorBrewer::brewer.pal(3, "Set1"))

```


Global Sea Ice Coverage
===================================== 

Text {.sidebar}
-------------------------------------

<br>

### Question 3
**How much has the Extent of Global Sea Ice shrunk in the past 50 years?**

The dataset, obtained through NOAA, shows the extent of Global Sea Ice, in millions of square kilometers, in the month of February for every year from 1979 through 2023.

As we can see from the visualization, the extent of Global Sea Ice remained fairly consistent until the year 2000, hovering around the 18 to 19 million square kilometers range, at which point the extent of Global Sea Ice shows a decline, from 19 to 16 million square kilometers of sea ice. The lowest point for the sea ice appears to be February 2023, at almost exactly 16 million square kilometers of sea ice.

Column
---------------------------------------

### Global Land Temperature Anomalies in Degrees Celcius (1880 - 2019)

```{r}
data2 = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/snow-and-ice-extent/sea-ice/G/2/data.csv"),skip=4)

ggplot(data2, aes(x=Date, y=Value)) +
  geom_area(position="jitter", alpha=0.2, fill="blue")+
  scale_y_continuous(breaks=c(0,2,4,6,8,10,12,14,16,18,20))+
  theme_minimal()+
  ylab("Extent of Global Sea Ice (In Millions of Sq Km") + ggtitle("Global Sea Ice Extent in February (1979-2023)")
```


Sea Ice Coverage by Hemisphere
===================================== 

Text {.sidebar}
-------------------------------------

<br>

### Question 4
**Is there any difference in the extent of sea ice, and the decrease in sea ice, in the two hemispheres?**

NOAA provides datasets on the Sea Ice levels for both the Northern and Southern hemisphere, which supplied the data for the two graphs in this section. Both datasets show the extent of sea ice, in millions of square kilometers, in the month of February for every year from 1979 through 2023.

There are several things we can tell from the two graphs. First, the Northern Hemisphere has a far greater amount of sea ice than the southern hemisphere. The northern hemisphere shows sea ice in the range of 14-16 million square kilometers, while the Southern Hemisphere has only 2-3 million square kilometers of sea ice. I believe this disparity to be caused by the existance of the Antarctic Land Mass, which accounts for the majority of the ice coverage in the South Pole. The second thing we can tell from the graphs is that the Northern Hemisphere shows a fairly predictable ice levels and a fairly consistent decline, while the Southern Hemisphere is far more unpredictable in the yearly ice levels. Both hemispheres show decline, with the lowest ice level in the North coming in 2018, and the lowest ice level in the South coming in 2023. We can see from these visualizations that both Hemispheres have been affected by the changing climate, and the raising temperatures have had different impacts on the ice levels for each hemisphere, although with the same result for both: steadily lowering ice levels in each Hemisphere.

Column {.tabset .tabset-fade}
-----------------------------

### Northern Hemisphere Global Ice Extent 

```{r}
data3 = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/snow-and-ice-extent/sea-ice/N/2/data.csv"),skip=4)

ggplot(data3, aes(x=Date,y=Value))+
  geom_area(position="jitter", alpha=0.2, fill="cyan")+
  scale_y_continuous(breaks = c(0,2,4,6,8,10,12,14,16,18)) +
  theme_minimal()+
  ylab("Extent in millions of Sq Km") +
  ggtitle("Extent of Northern Hemisphere Sea Ice in (Feb 1979-2023)")
```

### Southern Hemisphere Global Ice Extent

```{r}
data4 = read.csv(url("https://www.ncei.noaa.gov/access/monitoring/snow-and-ice-extent/sea-ice/S/2/data.csv"),skip=4)

ggplot(data4, aes(x=Date, y=Value))+
  geom_area(position="jitter", alpha=0.2, fill="purple")+
  scale_y_continuous(breaks = c(0,1,2,3,4)) +
  theme_minimal()+
  ylab("Extent in millions of Sq Km") +
  ggtitle("Extent of Southern Hemisphere Sea Ice in (Feb 1979-2023)")
  
```

Final Observations
===================================== 
### **Observation**
**What can we tell from all 5 graphics?**

From the visualizations, we can clearly tell three things. **First**, global Co2 levels are at an all time high, and show no signs of slowing down. **Second**, the global temperature for land and in the oceans is also at an all time high. And **third**, the global sea ice levels are at an all time low, with both hemispheres showing record low levels of sea ice. Combining all of this information, we can determine that the global Co2 levels are likely the cause of the rising temperatures on land and sea, which in turn is resulting in the retreating of global sea ice. This highlights the importance of focusing on the Co2 levels in our atmosphere, and provides some context by the global push to reduce these levels.