Overview

Column

Project Summary

Climate change is a complex global phenomenon with far-reaching implications. This analysis brings together multiple datasets to paint a comprehensive picture of environmental transformations from 1880 to 2024.

Key Observations: - Global temperatures are rising - Sea ice extent is changing, especially in the Northern Hemisphere - CO2 emissions continue to increase - Energy demand shows significant variations

Global Temperature

Column

Global Temperature Change 1880 - 2024

Sea Ice Coverage

Column

Northern Hemisphere Sea Ice

Southern Hemisphere Sea Ice

Global CO2 Emissions

Column

Global Annual CO2 Emission

Residential Energy Demand

Column

Annual Residential Energy Demand Temperature Index

Conclusions

Column

Research Implications

Climate Change Indicators

Our analysis reveals interconnected changes in global climate systems:

  1. Temperature Trends
    • Consistent warming since 1880
    • Potential short-term variations due to global events
  2. Sea Ice Dynamics
    • Significant reduction in Northern Hemisphere
    • Implications for global climate regulation
  3. Emissions and Energy
    • Increasing CO2 levels
    • Changing energy consumption patterns

Recommendations

  • Continue long-term environmental monitoring
  • Support research into climate mitigation strategies
  • Develop comprehensive predictive models
  • Encourage interdisciplinary climate research
---
title: "Lab-2"
author: "Harish Reddy"
date: "03/26/2025"
output: 
  flexdashboard::flex_dashboard:
    orientation: row
    vertical_layout: fill
    source_code: embed
---

```{r setup, include=FALSE}

# Load required libraries
library(flexdashboard)
library(ggplot2)
library(dplyr)
library(dygraphs)
library(rnoaa)
library(RColorBrewer)
```

Overview
===================================== 

Inputs {.sidebar}
-------------------------------------
### Project Introduction

**Climate Change Data Analysis**

This dashboard explores critical indicators of global climate change, examining:
- Global Temperature Trends
- Sea Ice Coverage
- Carbon Dioxide Emissions
- Residential Energy Demand

The analysis aims to provide insights into long-term environmental changes and their interconnections.

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

### Project Summary

Climate change is a complex global phenomenon with far-reaching implications. This analysis brings together multiple datasets to paint a comprehensive picture of environmental transformations from 1880 to 2024.

**Key Observations:**
- Global temperatures are rising
- Sea ice extent is changing, especially in the Northern Hemisphere
- CO2 emissions continue to increase
- Energy demand shows significant variations

Global Temperature
===================================== 

Inputs {.sidebar}
-------------------------------------
### Global Temperature Analysis

The GISS Surface Temperature Analysis provides global temperature anomaly data, estimating surface (land and ocean) temperature changes from 1880 to 2024.

**Key Insights:**
- Highest temperature point around 2021
- Noticeable dip in 2020 (possibly due to COVID-19 pandemic)
- Early 20th century shows significantly lower temperatures

Column
-------------------------------------
    
### Global Temperature Change 1880 - 2024
```{r}
# Fetch global temperature data
globalTemp <- 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)

# Create time series
smoothing <- ts(globalTemp$Lowess.5., frequency = 1, start=c(1880))
annualMean <- ts(globalTemp$No_Smoothing, frequency = 1, start=c(1880))
temp <- cbind(smoothing, annualMean)

# Generate interactive dygraph
dygraph(temp, main = "Global Temperature Anomaly From 1880 To 2024", 
        xlab = "Year", 
        ylab="Temperature Anomaly") %>%
  dyRangeSelector() %>%
  dyLegend(width = 500, show = "onmouseover") %>%
  dyOptions(drawGrid = FALSE) %>%
  dyOptions(colors = RColorBrewer::brewer.pal(3, "Set1"))
```

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

Inputs {.sidebar}
-------------------------------------
### Sea Ice Extent Analysis

Data from the National Snow & Ice Data Center shows sea ice extent from 1979-2024.

**Key Findings:**
- Northern Hemisphere: Significant decrease
- Southern Hemisphere: Relatively stable
- Approximately 2-3 million square km reduction in the North

Column {data-height=650 .tabset .tabset-fade}
-------------------------------------
    
### Northern Hemisphere Sea Ice {data-width=700}
```{r}
# Fetch Northern Hemisphere sea ice data
northIce <- read.csv(url("https://www.ncdc.noaa.gov/snow-and-ice/extent/sea-ice/N/8.csv"), skip=4)

# Create visualization
ggplot(northIce, aes(x = Date, y = Value)) + 
  geom_line(color = "red", linewidth = 1) +
  geom_point(color = "darkred") +
  scale_y_continuous(breaks = seq(7, 9, by = 0.5)) +
  theme_minimal() + 
  ylab("Sea Ice Extent (million sq km)") +
  xlab("Year") +
  ggtitle("Northern Hemisphere Sea Ice Extent in August (1979-2024)")
```
    
### Southern Hemisphere Sea Ice {data-width=700}
```{r}
# Fetch Southern Hemisphere sea ice data
southIce <- read.csv(url("https://www.ncdc.noaa.gov/snow-and-ice/extent/sea-ice/S/8.csv"), skip=4)

# Create visualization
ggplot(southIce, 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)) +
  theme_minimal() + 
  ylab("Extent (in millions of square kilometers)") +
  ggtitle("Southern Hemisphere Sea Ice Extent in Every August (1979-2024)")
```

Global CO2 Emissions
===================================== 

Inputs {.sidebar}
-------------------------------------
### CO2 Emissions Analysis

Data from NOAA/Earth System Research Laboratory tracking global carbon dioxide levels.

**Key Observations:**
- Continuous increase since 1960
- Strong correlation with global temperature trends
- Indicates ongoing human impact on atmospheric composition

Column
-------------------------------------
    
### Global Annual CO2 Emission
```{r}
# Read CO2 data (assuming the CSV is in the same directory)
co2 <- read.csv("~/Assignments/Data Visualization ANLY_512_90/lab-2/co2-annmean-gl.csv")

# Create CO2 emissions visualization
ggplot(co2, aes(Year, Mean)) +
  geom_point(color = "blue") +
  geom_smooth(method = "lm", se = TRUE, color = "red") +
  ggtitle("Global Average Carbon Dioxide Emission from 1960 - 2023") + 
  labs(x = "Year", y = "Mean CO2 Concentration")
```

Residential Energy Demand
===================================== 

Inputs {.sidebar}
-------------------------------------
### REDTI Analysis

Residential Energy Demand Temperature Index (REDTI) provides insights into energy consumption patterns.

**Key Findings:**
- Energy demand fluctuates with heating and cooling degree days
- Provides indication of national energy consumption trends

Column
-------------------------------------
    
### Annual Residential Energy Demand Temperature Index
```{r}
# Fetch REDTI data
REDTI_data <- read.csv(url("https://www.ncei.noaa.gov/access/monitoring/redti/USA/jan/year-to-date/data.csv"), skip=3)

# Create REDTI visualization
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, color = "red") +
  labs(title = "REDTI, Contiguous U.S. (1895 - 2025)", 
       x = "Year", 
       y = "Residential Energy Demand Temperature Index")
```

Conclusions
===================================== 

Inputs {.sidebar}
-------------------------------------
### Research Insights

**Summary of Findings:**
- Global temperatures are rising
- Sea ice, especially in the Northern Hemisphere, is decreasing
- CO2 emissions continue to increase
- Energy demand shows complex patterns

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

### Research Implications

#### Climate Change Indicators

Our analysis reveals interconnected changes in global climate systems:

1. **Temperature Trends**
   - Consistent warming since 1880
   - Potential short-term variations due to global events

2. **Sea Ice Dynamics**
   - Significant reduction in Northern Hemisphere
   - Implications for global climate regulation

3. **Emissions and Energy**
   - Increasing CO2 levels
   - Changing energy consumption patterns

#### Recommendations

- Continue long-term environmental monitoring
- Support research into climate mitigation strategies
- Develop comprehensive predictive models
- Encourage interdisciplinary climate research