---
title: "A Century of Stagnation. Four Decades of Change."
subtitle: "Share of the world population living in extreme poverty (cost of basic needs approach), 1820–2018. Most of the decline occurs after 1980. Early estimates (pre-1981) carry uncertainty."
description: "Share of the world population living in extreme poverty (cost-of-basic-needs approach), 1820–2018. Most of the decline occurred after 1980. Early estimates (pre-1981) are subject to uncertainty. Built with ggplot2 in R using data from Moatsos (2021) via Our World in Data."
date: "2026-04-21"
author:
- name: "Steven Ponce"
url: "https://stevenponce.netlify.app"
citation:
url: "https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_21.html"
categories: ["30DayChartChallenge", "2026"]
tags: [
"30DayChartChallenge",
"Timeseries",
"Historical",
"Extreme Poverty",
"Global Development",
"Area Chart",
"Our World in Data",
"Moatsos",
"Economic History",
"ggplot2",
"patchwork",
"ggtext",
"R Programming"
]
image: "thumbnails/30dcc_2026_21.png"
format:
html:
toc: true
toc-depth: 5
code-link: true
code-fold: true
code-tools: true
code-summary: "Show code"
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
)
})
### |- figure size ----
camcorder::gg_record(
dir = here::here("temp_plots"),
device = "png",
width = 10,
height = 8,
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
### |- Poverty data 1820-2018 ----
poverty_raw <- read_csv(
here::here("data/30DayChartChallenge/2026/owid_extreme_poverty_historical.csv"),
show_col_types = FALSE
)
```
#### [3. Examine the Data]{.smallcaps}
```{r}
#| label: examine
#| include: true
#| eval: true
#| results: 'hide'
#| warning: false
glimpse(poverty_raw)
```
#### [4. Tidy Data]{.smallcaps}
```{r}
#| label: tidy
#| warning: false
### |- Wold poverty share 1820-2018 ----
poverty <- poverty_raw |>
filter(entity == "World") |>
rename(poverty_share = 4) |>
select(year, poverty_share) |>
filter(!is.na(poverty_share)) |>
arrange(year) |>
# Flag pre-1981 data as uncertain (decadal estimates)
mutate(uncertain = year < 1981)
### |- split into two segments for dual-alpha rendering ----
poverty_early <- poverty |> filter(uncertain)
poverty_recent <- poverty |> filter(!uncertain)
### |- annotation data ----
# Key anchors: start value, inflection point (~1980), end value
val_start <- poverty |> filter(year == min(year)) |> pull(poverty_share)
val_end <- poverty |> filter(year == max(year)) |> pull(poverty_share)
yr_start <- poverty |> filter(year == min(year)) |> pull(year)
yr_end <- poverty |> filter(year == max(year)) |> pull(year)
# Inflection: where slope steepens most sharply (visually ~1980)
val_1980 <- poverty |> filter(year == 1980 | year == 1981) |> slice(1) |> pull(poverty_share)
yr_inflect <- poverty |> filter(year == 1980 | year == 1981) |> slice(1) |> pull(year)
```
#### [5. Visualization Parameters]{.smallcaps}
```{r}
#| label: params
#| include: true
#| warning: false
### |- plot aesthetics ----
colors <- get_theme_colors(
palette = list(
bg = "#F5F1EC",
line_main = "#6B0F1A",
area_fill = "#6B0F1A",
line_dim = "#6B0F1A",
ref_band = "#C8B8A2",
text_dark = "#2C1A0E",
text_mid = "#6B5744",
gridline = "#DDD5C8"
)
)
### |- color scalars for use inside geom layers ----
col_line_main <- colors$palette$line_main
col_line_dim <- colors$palette$line_dim
col_area <- colors$palette$area_fill
col_ref_band <- colors$palette$ref_band
col_text_dark <- colors$palette$text_dark
col_text_mid <- colors$palette$text_mid
col_bg <- colors$palette$bg
### |- titles and caption ----
title_text <- "A Century of Stagnation. Four Decades of Change."
subtitle_text <- "Share of the world population living in extreme poverty (cost of basic needs approach), 1820–2018.<br>
Most of the decline occurs after 1980. Early estimates (pre-1981) carry uncertainty."
caption_text <- create_dcc_caption(
dcc_year = 2026,
dcc_day = 21,
source_text = "Moatsos (2021) via Our World in Data · Definition: <$1.90/day, 2011 int.-$"
)
### |- fonts ----
setup_fonts()
fonts <- get_font_families()
### |- base theme ----
base_theme <- create_base_theme(colors)
weekly_theme <- extend_weekly_theme(
base_theme,
theme(
# Background
plot.background = element_rect(fill = col_bg, color = NA),
panel.background = element_rect(fill = col_bg, color = NA),
# Grid — horizontal only, very faint
panel.grid.major.y = element_line(color = colors$palette$gridline, linewidth = 0.25),
panel.grid.major.x = element_blank(),
panel.grid.minor = element_blank(),
# Axes
axis.ticks = element_blank(),
axis.text = element_text(family = fonts$text, color = col_text_mid, size = 9),
axis.title.x = element_blank(),
axis.title.y = element_text(
family = fonts$text, color = col_text_mid,
size = 9, margin = margin(r = 8)
),
# Titles
plot.title = element_text(
family = fonts$text, face = "bold", size = 16,
color = col_text_dark, margin = margin(b = 6)
),
plot.subtitle = element_markdown(
family = fonts$text, size = 10, color = col_text_mid,
lineheight = 1.4, margin = margin(b = 20)
),
plot.caption = element_markdown(
family = fonts$text, size = 7, color = col_text_mid,
hjust = 0, margin = margin(t = 16)
),
# Margins
plot.margin = margin(t = 20, r = 30, b = 16, l = 20)
)
)
theme_set(weekly_theme)
```
#### [6. Plot]{.smallcaps}
```{r}
#| label: plot
#| warning: false
### |- main plot ----
p <- ggplot() +
annotate(
"rect",
xmin = 1820, xmax = 1960,
ymin = 75, ymax = 90,
fill = col_ref_band, alpha = 0.18
) +
annotate(
"text",
x = yr_start + 5, y = 87.5,
label = "Historical baseline\n(~75–90% of humanity)",
hjust = 0, vjust = 0.5,
family = fonts$text, size = 2.8, color = col_text_mid
) +
geom_area(
data = poverty_early,
mapping = aes(x = year, y = poverty_share),
fill = col_area, alpha = 0.10, color = NA
) +
geom_area(
data = poverty_recent,
mapping = aes(x = year, y = poverty_share),
fill = col_area, alpha = 0.2, color = NA
) +
geom_line(
data = poverty_early,
mapping = aes(x = year, y = poverty_share),
color = col_line_dim, linewidth = 0.55, alpha = 0.4,
linetype = "solid"
) +
geom_line(
data = poverty_recent,
mapping = aes(x = year, y = poverty_share),
color = col_line_main, linewidth = 0.95
) +
annotate(
"point",
x = yr_inflect, y = val_1980,
color = col_line_main, size = 2.2, shape = 21,
fill = col_bg, stroke = 1.2
) +
annotate(
"text",
x = yr_inflect + 1, y = val_1980 + 2,
label = glue("{round(val_1980)}% in {yr_inflect}"),
hjust = 0, vjust = 0,
family = fonts$text, size = 2.9, color = col_text_dark,
lineheight = 1.3
) +
annotate(
"point",
x = yr_start, y = val_start,
color = col_line_dim, size = 2, shape = 21,
fill = col_bg, stroke = 1
) +
annotate(
"text",
x = yr_start + 2, y = val_start - 4,
label = glue("{round(val_start)}%\n({yr_start})"),
hjust = 0, vjust = 1,
family = fonts$text, size = 2.9, color = col_text_mid,
lineheight = 1.3
) +
annotate(
"point",
x = yr_end, y = val_end,
color = col_line_main, size = 2.2, shape = 21,
fill = col_bg, stroke = 1.2
) +
annotate(
"text",
x = yr_end + 1, y = val_end + 6,
# label = glue("{round(val_end, 1)}%\ntoday"),
label = glue("{round(val_end, 1)}%\n(2018)"),
hjust = 1, vjust = 0,
family = fonts$text, size = 2.9, color = col_text_dark,
lineheight = 1.3
) +
scale_x_continuous(
breaks = pretty_breaks(),
expand = expansion(mult = c(0.02, 0.03))
) +
scale_y_continuous(
limits = c(0, 100),
breaks = c(0, 25, 50, 75, 100),
labels = label_percent(scale = 1),
expand = expansion(mult = c(0.02, 0.04))
) +
labs(
title = title_text,
subtitle = subtitle_text,
caption = caption_text,
y = "Share in extreme poverty (%)"
)
```
#### [7. Save]{.smallcaps}
```{r}
#| label: save
#| warning: false
### |- plot image ----
save_plot(
p,
type = "30daychartchallenge",
year = 2026,
day = 21,
width = 10,
height = 8
)
```
#### [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_21.qmd`](https://github.com/poncest/personal-website/blob/master/data_visualizations/TidyTuesday/2026/30dcc_2026_21.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:**
- Moatsos, M. (2021). Global extreme poverty: Present and past since 1820.
In OECD, *How Was Life? Volume II*.
Accessed via Our World in Data.
Series: 'Cost of basic needs' approach, World entity, 1820–2018.
Definition: Living on less than $1.90/day in 2011 international-$.
https://ourworldindata.org/grapher/share-of-population-living-in-extreme-poverty
2. **Methodology Note:**
- Pre-1981 values are decadal estimates with meaningful uncertainty;
rendered at reduced opacity to signal this without removing historical context.
:::
#### [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)
:::