---
title: "When warmth stops looking exceptional"
subtitle: "Each curve shows the distribution of monthly temperature anomalies by decade (°C, vs. 1951–1980 mean). Width = variability (uncertainty). Position = signal. Early decades are wide and centered near zero — later decades are narrower and shifted right. Uncertainty gives way to persistence"
description: "A ridgeline chart showing how monthly global temperature anomalies have shifted over seven decades. Using a single burgundy color scale, each curve reveals both the variability (width) and the signal (position) for a given decade. Early decades fluctuate broadly around the 1951–1980 baseline. By the 2010s and 2020s, the distributions have narrowed and shifted decisively to the right — uncertainty gives way to persistence. Built with R, ggplot2, and ggridges using NASA GISS GISTEMP v4 data."
date: "2026-04-29"
author:
- name: "Steven Ponce"
url: "https://stevenponce.netlify.app"
citation:
url: "https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_29.html"
categories: ["30DayChartChallenge", "2026"]
tags: [
"30DayChartChallenge",
"Uncertainties",
"Monochrome",
"Ridgeline Chart",
"Distribution",
"Climate",
"Temperature Anomaly",
"NASA GISS",
"GISTEMP",
"ggridges",
"ggplot2",
"Time Series"
]
image: "thumbnails/30dcc_2026_29.png"
format:
html:
toc: true
toc-depth: 5
code-link: true
code-fold: true
code-tools: true
code-summary: "Show code"
theme:
light: [flatly, assets/styling/custom_styles.scss]
dark: [darkly, assets/styling/custom_styles_dark.scss]
editor_options:
chunk_output_type: inline
execute:
freeze: true
cache: true
error: false
message: false
warning: false
eval: true
---
{#fig-1}
### [**Steps to Create this Graphic**]{.mark}
#### [1. Load Packages & Setup]{.smallcaps}
```{r}
#| label: load
#| warning: false
#| message: false
#| results: "hide"
## 1. LOAD PACKAGES & SETUP ----
suppressPackageStartupMessages({
pacman::p_load(
tidyverse, ggtext, showtext, janitor,
scales, glue, camcorder, ggridges
)
})
### |- figure size ----
camcorder::gg_record(
dir = here::here("temp_plots"),
device = "png",
width = 10,
height = 7,
units = "in",
dpi = 320
)
# Source utility functions
suppressMessages(source(here::here("R/utils/fonts.R")))
source(here::here("R/utils/social_icons.R"))
source(here::here("R/utils/image_utils.R"))
source(here::here("R/themes/base_theme.R"))
```
#### [2. Read in the Data]{.smallcaps}
```{r}
#| label: read
#| include: true
#| eval: true
#| warning: false
### |- cache path ----
data_path <- here::here("data/30DayChartChallenge/2026/gistemp_global_monthly.csv")
### |- fetch or load ----
# if (!file.exists(data_path)) {
# url <- "https://data.giss.nasa.gov/gistemp/tabledata_v4/GLB.Ts+dSST.csv"
# download.file(url, destfile = data_path, mode = "wb")
# message("Downloaded GISTEMP data to: ", data_path)
# } else {
# message("Using cached GISTEMP data.")
# }
### |- raw read ----
# NASA GISS format: first row is header info, second row is column names
# Anomalies in units of 0.01°C in older files; v4 is in °C directly
# File has a header comment row — skip = 1 handles it
raw <- read_csv(
data_path,
skip = 1,
na = c("***", "****", ""),
show_col_types = FALSE
)
```
#### [3. Examine the Data]{.smallcaps}
```{r}
#| label: examine
#| include: true
#| eval: true
#| results: 'hide'
#| warning: false
glimpse(raw)
```
#### [4. Tidy Data]{.smallcaps}
```{r}
#| label: tidy
#| warning: false
### |- month columns only, pivot long ----
month_cols <- c(
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
)
df <- raw |>
clean_names() |>
select(year, all_of(tolower(month_cols))) |>
filter(year >= 1950, year <= 2024) |>
pivot_longer(
cols = -year,
names_to = "month_abbr",
values_to = "anomaly"
) |>
mutate(anomaly = as.numeric(anomaly)) |>
filter(!is.na(anomaly))
### |- assign decade labels ----
df <- df |>
mutate(
decade = floor(year / 10) * 10,
decade_label = paste0(decade, "s"),
decade_fct = factor(decade_label, levels = rev(paste0(seq(1950, 2020, 10), "s")))
)
### |- decade summary stats (for annotation anchors) ----
decade_stats <- df |>
group_by(decade, decade_label, decade_fct) |>
summarise(
mean_anom = mean(anomaly, na.rm = TRUE),
sd_anom = sd(anomaly, na.rm = TRUE),
.groups = "drop"
)
```
#### [5. Visualization Parameters]{.smallcaps}
```{r}
#| label: params
#| include: true
#| warning: false
### |- plot aesthetics ----
colors <- get_theme_colors(
palette = list(
bg = "#F5F3EE",
low = "#EAD9D5",
mid_lo = "#C17B7B",
mid_hi = "#8B3030",
hi = "#3D0C0C",
text = "#2C2825",
subtle = "#7A7068",
grid = "#E8E4DE"
)
)
# pre-extract scalar color values
col_bg <- colors$palette$bg
col_subtle <- colors$palette$subtle
col_mid_hi <- colors$palette$mid_hi
col_grid <- colors$palette$grid
col_text <- colors$palette$text
# Decade fill ramp: 8 stops, lightest (1950s) → darkest (2020s)
decade_fills <- c(
"1950s" = "#EAD9D5",
"1960s" = "#DDB8B1",
"1970s" = "#CC9590",
"1980s" = "#B86E6E",
"1990s" = "#9E4A4A",
"2000s" = "#8B3030",
"2010s" = "#611818",
"2020s" = "#3D0C0C"
)
### |- titles and caption ----
title_text <- "When warmth stops looking exceptional"
subtitle_text <- glue(
"Each curve shows the distribution of monthly temperature anomalies by decade ",
"(°C, vs. 1951–1980 mean).<br>",
"**Width** = variability (uncertainty). **Position** = signal. ",
"Early decades are wide and centered near zero — later decades are<br>",
"narrower and shifted right. Uncertainty gives way to persistence."
)
caption_text <- create_dcc_caption(
dcc_year = 2026,
dcc_day = 29,
source_text = "NASA GISS Surface Temperature Analysis (GISTEMP v4)"
)
### |- fonts ----
setup_fonts()
fonts <- get_font_families()
### |- plot theme ----
base_theme <- create_base_theme(colors)
weekly_theme <- extend_weekly_theme(
base_theme,
theme(
plot.background = element_rect(fill = col_bg, color = NA),
panel.background = element_rect(fill = col_bg, color = NA),
panel.grid.major.x = element_line(color = col_grid, linewidth = 0.25),
panel.grid.major.y = element_blank(),
panel.grid.minor = element_blank(),
axis.ticks = element_blank(),
axis.text.x = element_text(
family = fonts$text, size = 8,
color = col_subtle, margin = margin(t = 4)
),
axis.text.y = element_text(
family = fonts$text, size = 9,
color = col_subtle, hjust = 1
),
axis.title.x = element_text(
family = fonts$text, size = 8,
color = col_subtle, margin = margin(t = 8)
),
axis.title.y = element_blank(),
plot.title = element_text(
family = fonts$title,
face = "bold",
size = 20,
color = col_text,
margin = margin(b = 6)
),
plot.subtitle = element_markdown(
family = fonts$text,
size = 9.5,
color = col_subtle,
lineheight = 1.5,
margin = margin(b = 16)
),
plot.caption = element_markdown(
family = fonts$text,
size = 7,
color = col_subtle,
hjust = 1,
margin = margin(t = 12)
),
legend.position = "none",
plot.margin = margin(20, 24, 10, 20)
)
)
theme_set(weekly_theme)
```
#### [6. Plot]{.smallcaps}
```{r}
#| label: plot
#| warning: false
### |- main plot ----
p <- df |>
ggplot(aes(x = anomaly, y = decade_fct, fill = decade_fct)) +
# Geoms
geom_vline(
xintercept = 0,
color = col_subtle,
linewidth = 0.35,
linetype = "dashed"
) +
geom_density_ridges(
scale = 1.6,
rel_min_height = 0.005,
bandwidth = 0.08,
color = NA,
alpha = 0.82
) +
geom_point(
data = decade_stats,
aes(x = mean_anom, y = decade_fct),
color = col_bg,
fill = col_bg,
size = 1.6,
shape = 21,
stroke = 0.4
) +
# Scales
scale_fill_manual(values = decade_fills, guide = "none") +
scale_x_continuous(
breaks = seq(-1, 1.5, by = 0.5),
labels = function(x) ifelse(x == 0, "0", sprintf("%+.1f", x)),
expand = expansion(add = c(0.05, 0.15))
) +
# Annotate
annotate(
"text",
x = -0.9, y = 1.4,
label = "Wide = more uncertain",
hjust = 0, vjust = 0,
size = 2.8,
family = fonts$text,
color = col_subtle,
fontface = "italic"
) +
annotate(
"segment",
x = -0.55, xend = -0.15,
y = 1.65, yend = 1.65,
arrow = arrow(length = unit(4, "pt"), type = "open"),
color = col_subtle,
linewidth = 0.35
) +
annotate(
"text",
x = 0.9, y = 7.6,
label = "Shifted right = persistent warmth",
hjust = 0, vjust = 0,
size = 2.8,
family = fonts$text,
color = col_mid_hi,
fontface = "italic"
) +
annotate(
"segment",
x = 0.85, xend = 0.62,
y = 7.85, yend = 7.85,
arrow = arrow(length = unit(4, "pt"), type = "open"),
color = col_mid_hi,
linewidth = 0.35
) +
annotate(
"text",
x = 0.03, y = 8.6,
label = "baseline\n(1951–1980)",
hjust = 0, vjust = 1,
size = 2.4,
family = fonts$text,
color = col_subtle,
fontface = "italic",
lineheight = 1.1
) +
# Labs
labs(
title = title_text,
subtitle = subtitle_text,
caption = caption_text,
x = "Temperature anomaly (°C)",
y = NULL
)
```
#### [7. Save]{.smallcaps}
```{r}
#| label: save
#| warning: false
### |- plot image ----
save_plot(
p,
type = "30daychartchallenge",
year = 2026,
day = 29,
width = 10,
height = 7
)
```
#### [8. Session Info]{.smallcaps}
::: {.callout-tip collapse="true"}
##### Expand for Session Info
```{r, echo = FALSE}
#| eval: true
#| warning: false
sessionInfo()
```
:::
#### [9. GitHub Repository]{.smallcaps}
::: {.callout-tip collapse="true"}
##### Expand for GitHub Repo
The complete code for this analysis is available in [`30dcc_2026_29.qmd`](https://github.com/poncest/personal-website/blob/master/data_visualizations/TidyTuesday/2026/30dcc_2026_29.qmd).
For the full repository, [click here](https://github.com/poncest/personal-website/).
:::
#### [10. References]{.smallcaps}
::: {.callout-tip collapse="true"}
##### Expand for References
1. **Data Sources:**
- GISTEMP Team (2024). *GISS Surface Temperature Analysis (GISTEMP), version 4.*
NASA Goddard Institute for Space Studies. Retrieved from:
https://data.giss.nasa.gov/gistemp/
2. **Key Datasets:**
- `GLB.Ts+dSST.csv` — Monthly global surface temperature anomalies, 1880–2024,
relative to the 1951–1980 baseline mean (°C). Combines land-surface air temperature
and sea-surface water temperature.
:::
#### [11. Custom Functions Documentation]{.smallcaps}
::: {.callout-note collapse="true"}
##### 📦 Custom Helper Functions
This analysis uses custom functions from my personal module library for efficiency and consistency across projects.
**Functions Used:**
- **`fonts.R`**: `setup_fonts()`, `get_font_families()` - Font management with showtext
- **`social_icons.R`**: `create_social_caption()` - Generates formatted social media captions
- **`image_utils.R`**: `save_plot()` - Consistent plot saving with naming conventions
- **`base_theme.R`**: `create_base_theme()`, `extend_weekly_theme()`, `get_theme_colors()` - Custom ggplot2 themes
**Why custom functions?**\
These utilities standardize theming, fonts, and output across all my data visualizations. The core analysis (data tidying and visualization logic) uses only standard tidyverse packages.
**Source Code:**\
View all custom functions → [GitHub: R/utils](https://github.com/poncest/personal-website/tree/master/R)
:::