Suppose we support a policy team evaluating climate adaptation priorities. The decision focus is: how to allocate limited public resources across heat-risk outreach, cooling access, and extreme-heat preparedness. The dashboard summarizes evidence needed for policy decision-making by highlighting warming trends and extreme-heat exposure.
How to read this visualization: The line shows the global annual temperature anomaly relative to the NASA 1951-1980 baseline average of approximately 14.0°C (57.2°F). An anomaly of 0 means the temperature matched this historical average. Values above 0 indicate warmer-than-average years. Recent years (especially post-2015) consistently exceed the +1.0°C mark, representing severe global warming compared to historical norms. The smooth line highlights long-run change, so the slope indicates how fast warming is accelerating.
Result and Interpretation: The temperature anomaly rises steadily, with a visibly steeper slope emerging after the 1970s and exceeding the +1.0°C threshold consistently post-2015. This supports prioritizing programs that reduce heat exposure, because warming now severely shifts historical baseline conditions for worldwide communities.
How to read this visualization: Each bar is a decade, and the height is the average number of heat waves per year in that decade. (Note: A heat wave is generally defined as a period of two or more consecutive days when the daily minimum temperature is unusually high compared to historical norms.) Higher bars mean more frequent heat waves for people living through that time period.
Result and Interpretation: Heat wave frequency across the U.S. increased sharply from an average of roughly 2 heat waves per year in the 1960s to about 6 heat waves per year during the 2010s. This significant increase justifies allocating resources to expand heat-risk outreach and cooling programs in vulnerable areas.
How to read this visualization: Each point is a decade; the line tracks the average length of the heat-wave season in days. An upward trend means heat risk lasts longer across the year.
Result and Interpretation: The heat wave season length has grown from fewer than 25 days in the 1960s to about 68 days in the 2010s. This extended period of risk across the year points to a need for sustained seasonal outreach rather than short-term mid-summer campaigns.
How to read this map: Each dot is a major U.S. city. Color indicates how much the frequency of heat waves changed between the 1960s and the 2010s (specifically from 1961 to 2019) in that city. “Frequency change” measures the increase in the average number of heat waves per year. For example, a change of +4 means that the city now experiences 4 more heat waves each year than it did historically. Darker colors signal larger increases.
Result and Interpretation: The map reveals that many cities, especially in the Southeast and South (e.g., Miami, Tampa, New Orleans, Dallas), exhibit the largest increases in heat wave frequency (often +4 to +6 more heat waves per year). This helps policy makers prioritize heat-risk outreach geographically to regions where extreme heat events have intensified the most.
How to read this boxplot: The boxplot groups cities into four quartiles based on their heat-wave frequency change. Each box shows the distribution (median, spread, and outliers) of the changes within that 25% group.
Result and Interpretation: Because the cities are divided into quartiles, each group contains roughly 25% of the locations. However, the exact data ranges shown by the boxes are highly skewed: the top 25% (Q4) of cities experienced extreme increases (ranging up to +13 heat waves per year from 1961 to 2019), while the lowest 25% saw little to no change. This visualizes a highly uneven distribution of impact, supporting target-based interventions directed closely at the highest-change hotspots. As listed below, the top 10 most severely impacted cities all fall into this Q4 bracket.
| City | Frequency Change |
|---|---|
| San Juan, PR | 13.67 |
| New Orleans, LA | 9.34 |
| Tampa, FL | 8.95 |
| Miami, FL | 8.51 |
| Austin, TX | 7.20 |
| San Francisco, CA | 6.96 |
| Atlanta, GA | 6.39 |
| Norfolk, VA | 5.95 |
| Las Vegas, NV | 5.86 |
| Detroit, MI | 5.55 |
Based on the visual evidence, the strongest near-term need is heat-risk adaptation. Warming is accelerating, heat waves are more frequent and longer, and hotspots are clustered in specific cities. Resources should prioritize heat resilience where the increase is largest.
How quickly did warming accelerate after 1980 compared with the early 20th century? Warming accelerated significantly after the late 1970s, with average anomalies actively breaking the +1.0°C threshold post-2015, fundamentally shifting the historical baseline temperature.
Do longer heat wave seasons indicate a shift in how often people experience extreme heat? Yes. Heat waves have evolved from isolated 1960s events (an average of 2 per year over roughly 24 days) into sustained threats in the 2010s (over 6 per year spanning a 68-day season).
Which cities show the largest increases in heat wave frequency, and where are they located? The most extreme changes are highly concentrated geographically. Cities primarily in the Southeast and South (e.g., Miami, Tampa, New Orleans, San Juan) saw massive increases (+5 to +13 heat waves per year from 1961 to 2019), forming a targeted demographic needing urgent resource allocation.
---
title: "ANLY512 Lab 2 - Climate Change Dashboard: Warming and Extreme Heat"
author: "Yunwei Sheng"
date: "`r Sys.Date()`"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
theme: flatly
source_code: embed
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)
library(flexdashboard)
library(tidyverse)
library(scales)
library(plotly)
# Data sources: NASA GISTEMP (temperature), EPA indicators (heat waves).
temp_url <- "https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts+dSST.csv"
heat_url <- "https://www.epa.gov/sites/default/files/2021-04/heat-waves_fig-1.csv"
heat_city_url <- "https://www.epa.gov/sites/default/files/2021-04/heat-waves_fig-2.csv"
# Global temperature anomaly (annual mean, J-D).
temp <- read_csv(temp_url, skip = 1, na = c("***")) %>%
transmute(
year = Year,
temp_anomaly = `J-D`
) %>%
drop_na()
# Heat wave characteristics by decade (U.S.).
heat <- read_csv(heat_url, skip = 6) %>%
rename(
decade = Decade,
frequency = `Frequency (average number of heat waves per year)`,
duration = `Duration (average number of individual heat waves)`,
season = `Season (average length of annual heat wave season)`,
intensity = `Intensity (average temperature above local threshold during heat waves)`
)
# Heat wave changes in major U.S. cities (1961-2019).
heat_city <- read_csv(heat_city_url, skip = 6) %>%
rename(
station = Station,
latitude = Latitude,
longitude = Longitude,
freq_change = `Frequency Change`,
duration_change = `Duration Change`,
season_change = `Season Change`,
intensity_change = `Intensity Change`
) %>%
extract(station, into = c("city", "state"), regex = "^(.*)_([^_]+)$") %>%
mutate(
city = str_replace_all(city, "_", " "),
city = str_to_title(city),
city_state = paste0(city, ", ", state)
)
```
# Overview and Questions
Column {data-width=500}
-----------------------------------------------------------------------
### Decision Context
Suppose we support a policy team evaluating climate adaptation priorities. The decision focus is: **how to allocate limited public resources across heat-risk outreach, cooling access, and extreme-heat preparedness**. The dashboard summarizes evidence needed for policy decision-making by highlighting warming trends and extreme-heat exposure.
### Information Needs and Data
- **Warming trend**: is warming accelerating? (NASA GISTEMP)
- **Extreme heat**: are heat waves more frequent and longer? (EPA, NOAA)
- **Spatial differences**: which cities show the largest heat-wave changes? (EPA, NOAA)
Column {data-width=500}
-----------------------------------------------------------------------
### Questions Guiding the Analysis
1. How quickly did warming accelerate after 1980 compared with the early 20th century?
2. Do longer heat wave seasons indicate a shift in how often people experience extreme heat?
3. Which cities show the largest increases in heat wave frequency, and where are they located?
# Global Temperature Anomaly
Column {data-width=700}
-----------------------------------------------------------------------
### Visualization
```{r}
p_temp <- ggplot(temp, aes(x = year, y = temp_anomaly)) +
geom_hline(yintercept = 0, linetype = "dashed", color = "darkgray", linewidth = 0.8) +
geom_line(color = "#b2182b", linewidth = 0.6) +
geom_smooth(method = "loess", se = FALSE, color = "#2166ac", linewidth = 0.8) +
scale_y_continuous(labels = label_number(suffix = "°C")) +
labs(
title = "Global Temperature Anomaly (Annual Mean)",
x = NULL,
y = "Anomaly (°C)"
) +
theme_minimal()
ggplotly(p_temp, tooltip = c("x", "y"))
```
Column {data-width=300}
-----------------------------------------------------------------------
### Analysis & Interpretation
**How to read this visualization:**
The line shows the global annual temperature anomaly relative to the NASA 1951-1980 baseline average of approximately 14.0°C (57.2°F). An anomaly of 0 means the temperature matched this historical average. Values above 0 indicate warmer-than-average years. Recent years (especially post-2015) consistently exceed the +1.0°C mark, representing severe global warming compared to historical norms. The smooth line highlights long-run change, so the slope indicates how fast warming is accelerating.
**Result and Interpretation:**
The temperature anomaly rises steadily, with a visibly steeper slope emerging after the 1970s and exceeding the +1.0°C threshold consistently post-2015. This supports prioritizing programs that reduce heat exposure, because warming now severely shifts historical baseline conditions for worldwide communities.
# Heat Wave Frequency
Column {data-width=700}
-----------------------------------------------------------------------
### Visualization
```{r}
p_heat_freq <- ggplot(heat, aes(x = decade, y = frequency)) +
geom_col(fill = "#f46d43") +
geom_text(aes(y = frequency + 0.3, label = round(frequency, 1)), size = 3.5, color = "black") +
scale_x_continuous(breaks = seq(1960, 2020, 10)) +
labs(
title = "Heat Wave Frequency (Average per Year)",
x = "Decade",
y = "Heat waves per year"
) +
theme_minimal()
p_freq <- ggplotly(p_heat_freq, tooltip = c("x", "y"))
for (i in seq_along(p_freq$x$data)) {
if (!is.null(p_freq$x$data[[i]]$mode) && p_freq$x$data[[i]]$mode == "text") {
p_freq$x$data[[i]]$hoverinfo <- "none"
}
}
p_freq
```
Column {data-width=300}
-----------------------------------------------------------------------
### Analysis & Interpretation
**How to read this visualization:**
Each bar is a decade, and the height is the average number of heat waves per year in that decade. (Note: A heat wave is generally defined as a period of two or more consecutive days when the daily minimum temperature is unusually high compared to historical norms.) Higher bars mean more frequent heat waves for people living through that time period.
**Result and Interpretation:**
Heat wave frequency across the U.S. increased sharply from an average of roughly 2 heat waves per year in the 1960s to about 6 heat waves per year during the 2010s. This significant increase justifies allocating resources to expand heat-risk outreach and cooling programs in vulnerable areas.
# Heat Wave Season Length
Column {data-width=700}
-----------------------------------------------------------------------
### Visualization
```{r}
p_heat_season <- ggplot(heat, aes(x = decade, y = season, group = 1)) +
geom_line(color = "#762a83", linewidth = 0.8) +
geom_point(color = "#762a83", size = 2) +
geom_text(aes(y = season + 3, label = round(season, 1)), size = 3.5, color = "black") +
scale_x_continuous(breaks = seq(1960, 2020, 10)) +
labs(
title = "Heat Wave Season Length",
x = "Decade",
y = "Days"
) +
theme_minimal()
p_seq <- ggplotly(p_heat_season, tooltip = c("x", "y"))
for (i in seq_along(p_seq$x$data)) {
if (!is.null(p_seq$x$data[[i]]$mode) && p_seq$x$data[[i]]$mode == "text") {
p_seq$x$data[[i]]$hoverinfo <- "none"
}
}
p_seq
```
Column {data-width=300}
-----------------------------------------------------------------------
### Analysis & Interpretation
**How to read this visualization:**
Each point is a decade; the line tracks the average length of the heat-wave season in days. An upward trend means heat risk lasts longer across the year.
**Result and Interpretation:**
The heat wave season length has grown from fewer than 25 days in the 1960s to about 68 days in the 2010s. This extended period of risk across the year points to a need for sustained seasonal outreach rather than short-term mid-summer campaigns.
# Heat Wave Change Map (Cities)
Column {data-width=700}
-----------------------------------------------------------------------
### Visualization
```{r}
p_heat_map <- plot_ly(
data = heat_city,
type = "scattergeo",
lat = ~latitude,
lon = ~longitude,
text = ~paste0(city_state, "<br>Frequency change: ", round(freq_change, 2)),
color = ~freq_change,
colors = "YlOrRd",
marker = list(size = 8, opacity = 0.8, line = list(width = 0.3, color = "white")),
hoverinfo = "text",
name = ""
) %>%
layout(
title = "Heat Wave Frequency Change by City (1961-2019)",
geo = list(
scope = "usa",
projection = list(type = "albers usa"),
showland = TRUE,
landcolor = "#f7f7f7"
)
)
p_heat_map
```
Column {data-width=300}
-----------------------------------------------------------------------
### Analysis & Interpretation
**How to read this map:**
Each dot is a major U.S. city. Color indicates how much the **frequency of heat waves** changed between the 1960s and the 2010s (specifically from 1961 to 2019) in that city. "Frequency change" measures the increase in the average number of heat waves per year. For example, a change of +4 means that the city now experiences 4 more heat waves each year than it did historically. Darker colors signal larger increases.
**Result and Interpretation:**
The map reveals that many cities, especially in the Southeast and South (e.g., Miami, Tampa, New Orleans, Dallas), exhibit the largest increases in heat wave frequency (often +4 to +6 more heat waves per year). This helps policy makers prioritize heat-risk outreach geographically to regions where extreme heat events have intensified the most.
# Distribution of City-Level Heat Changes
Column {data-width=600}
-----------------------------------------------------------------------
### Visualization
```{r}
heat_city_boxes <- heat_city %>%
mutate(
freq_bin = cut(
freq_change,
breaks = quantile(freq_change, probs = seq(0, 1, 0.25), na.rm = TRUE),
include.lowest = TRUE,
labels = c("Q1 (Lowest)", "Q2", "Q3", "Q4 (Highest)")
)
)
p_heat_box <- plot_ly(
heat_city_boxes,
x = ~freq_bin,
y = ~freq_change,
type = "box",
color = ~freq_bin,
colors = "YlOrRd",
text = ~paste("City:", city_state),
hoverinfo = "y+text",
name = "" # Removes the redundant trace name from tooltip
) %>%
layout(
title = "Distribution of Heat-Wave Frequency Change by Quartile",
xaxis = list(title = "Quartile"),
yaxis = list(title = "Frequency Change (per year)"),
showlegend = FALSE,
hoverlabel = list(namelength = 0) # Strictly hides trace label like "Q4 (Highest)"
)
p_heat_box
```
Column {data-width=400}
-----------------------------------------------------------------------
### Analysis & Interpretation
**How to read this boxplot:**
The boxplot groups cities into four **quartiles** based on their heat-wave frequency change. Each box shows the distribution (median, spread, and outliers) of the changes within that 25% group.
**Result and Interpretation:**
Because the cities are divided into quartiles, each group contains roughly 25% of the locations. However, the exact data ranges shown by the boxes are highly skewed: the top 25% (Q4) of cities experienced extreme increases (ranging up to +13 heat waves per year from 1961 to 2019), while the lowest 25% saw little to no change. This visualizes a highly uneven distribution of impact, supporting target-based interventions directed closely at the highest-change hotspots. As listed below, the top 10 most severely impacted cities all fall into this Q4 bracket.
### Top Cities
```{r}
top_cities <- heat_city_boxes %>%
arrange(desc(freq_change)) %>%
select(city_state, freq_change) %>%
slice_head(n = 10)
knitr::kable(
top_cities,
col.names = c("City", "Frequency Change"),
digits = 2,
caption = "Top 10 cities by heat-wave frequency increase"
)
```
# Summary and Insights
Column {data-width=500}
-----------------------------------------------------------------------
### Decision Summary
Based on the visual evidence, the strongest near-term need is **heat-risk adaptation**. Warming is accelerating, heat waves are more frequent and longer, and hotspots are clustered in specific cities. Resources should prioritize heat resilience where the increase is largest.
### Visualization Methodology
- Selected indicators that map directly to the theme: long-run warming and extreme-heat exposure.
- Used interactive time series for trend clarity, plus a geographic map to compare city-level risk patterns.
- Summarized city-level changes into quartile shares to reveal whether risk is concentrated or widespread.
Column {data-width=500}
-----------------------------------------------------------------------
### Answers to Guiding Questions
1. **How quickly did warming accelerate after 1980 compared with the early 20th century?**
Warming accelerated significantly after the late 1970s, with average anomalies actively breaking the +1.0°C threshold post-2015, fundamentally shifting the historical baseline temperature.
2. **Do longer heat wave seasons indicate a shift in how often people experience extreme heat?**
Yes. Heat waves have evolved from isolated 1960s events (an average of 2 per year over roughly 24 days) into sustained threats in the 2010s (over 6 per year spanning a 68-day season).
3. **Which cities show the largest increases in heat wave frequency, and where are they located?**
The most extreme changes are highly concentrated geographically. Cities primarily in the Southeast and South (e.g., Miami, Tampa, New Orleans, San Juan) saw massive increases (+5 to +13 heat waves per year from 1961 to 2019), forming a targeted demographic needing urgent resource allocation.
### Proposed Actions
- **Extend Preparedness Timelines:** Adapt seasonal plans to reflect the modern 68-day heat season window.
- **Target Geographic Interventions:** Funnel resources toward the highly-skewed Q4 highest-change Southern cities, rather than distributing equally nationwide.