• Steven Ponce
  • About
  • Data Visualizations
  • Projects
  • Resume
  • Email

On this page

  • Steps to Create this Graphic
    • 1. Load Packages & Setup
    • 2. Read in the Data
    • 3. Examine the Data
    • 4. Tidy Data
    • 5. Visualization Parameters
    • 6. Plot
    • 7. Save
    • 8. Session Info
    • 9. GitHub Repository
    • 10. References
    • 11. Custom Functions Documentation

From Survival to Stability

  • Show All Code
  • Hide All Code

  • View Source

Share of the global population across daily income thresholds (PPP-adjusted), 2000 vs. 2022

30DayChartChallenge
Data Visualization
R Programming
2026
A proportional stacked bar chart tracking how the global population shifted across four daily income thresholds between 2000 and 2022. Extreme poverty (below $3/day) nearly halved from 36% to 11%, while the $10–$30/day bracket saw the largest expansion — from 13% to 27% — signaling the rise of a global middle. Built with ggplot2 using World Bank PIP data via Our World in Data.
Author

Steven Ponce

Published

April 9, 2026

Figure 1: Horizontal stacked bar chart comparing the global distribution of population across four daily income thresholds in 2000 and 2022, adjusted for purchasing power parity. In 2000, 36% of the world lived on less than $3 per day and 38% on $3–$10; by 2022, extreme poverty fell to 11% while the $10–$30 bracket saw the largest growth, rising from 13% to 27%. Those above $30 per day nearly doubled from 13% to 18%.

Steps to Create this Graphic

1. Load Packages & Setup

Show code
```{r}
#| label: load
#| warning: false
#| message: false      
#| results: "hide"     

## 1. LOAD PACKAGES & SETUP ----
suppressPackageStartupMessages({
pacman::p_load(
  tidyverse, ggtext, showtext, patchwork,     
  janitor, scales, glue
  )
})

### |- figure size ----
camcorder::gg_record(
  dir    = here::here("temp_plots"),
  device = "png",
  width  = 10,
  height = 6,
  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

Show code
```{r}
#| label: read
#| include: true
#| eval: true
#| warning: false

# Source: World Bank Poverty and Inequality Platform (2025) via Our World in Data
# Full dataset filtered to global aggregate (Entity == "World") for 2000 and 2022
# Raw columns are absolute population counts — converted to % shares in tidy step

income_raw <- read_csv(
  here::here("data/30DayChartChallenge/2026/owid_income_distribution.csv"),
  show_col_types = FALSE
  ) |>
  clean_names() |>
  filter(entity == "World", year %in% c(2000, 2022))
```

3. Examine the Data

Show code
```{r}
#| label: examine
#| include: true
#| eval: true
#| results: 'hide'
#| warning: false

glimpse(income_raw)
```

4. Tidy Data

Show code
```{r}
#| label: tidy
#| warning: false

# Bracket factor levels: low → high income 
bracket_levels <- c(
  "< $3",
  "$3 – $10",
  "$10 – $30",
  "> $30"
)

income_df <- income_raw |>
  # Convert absolute counts to % shares
  mutate(
    total        = below_3_a_day + x3_10_a_day + x10_30_a_day + above_30_a_day,
    "< $3"       = below_3_a_day / total * 100,
    "$3 – $10"   = x3_10_a_day / total * 100,
    "$10 – $30"  = x10_30_a_day / total * 100,
    "> $30"      = above_30_a_day / total * 100
  ) |>
  select(year, all_of(bracket_levels)) |>
  pivot_longer(
    cols      = all_of(bracket_levels),
    names_to  = "bracket",
    values_to = "share"
  ) |>
  mutate(
    bracket  = factor(bracket, levels = bracket_levels),
    year_lbl = factor(year, levels = c(2022, 2000), labels = c("2022", "2000"))
  ) |>
  arrange(year, bracket) |>
  group_by(year) |>
  mutate(
    xmax = cumsum(share),
    xmin = xmax - share,
    xmid = (xmin + xmax) / 2
  ) |>
  ungroup()

### |- annotation anchors (data-driven) ----
ann_poverty_x <- income_df |>
  filter(bracket == "< $3") |> summarise(xmid = mean(xmid)) |> pull(xmid)

ann_wealth_x <- income_df |>
  filter(year == 2022, bracket == "> $30") |> pull(xmid)

ann_middle_x <- income_df |>
  filter(year == 2022, bracket == "$10 – $30") |> pull(xmid)

### |- segment labels ----
income_labels <- income_df |>
  filter(share >= 9)
```

5. Visualization Parameters

Show code
```{r}
#| label: params
#| include: true
#| warning: false

### |- plot aesthetics ----
colors <- get_theme_colors(
  palette = c(
    "< $3"      = "#6B0F1A",  
    "$3 – $10"  = "#C94A3A",  
    "$10 – $30" = "#8FAFC3",   
    "> $30"     = "#1B3A52"  
  )
)

### |- titles and caption ----
title_text    <- "From Survival to Stability"

subtitle_text <- "Share of the global population across daily income thresholds (PPP-adjusted), 2000 vs. 2022"

caption_text  <- create_dcc_caption(
  dcc_year    = 2026,
  dcc_day     = 9,
  source_text = "World Bank Poverty and Inequality Platform (2025) via Our World in Data"
)

### |- fonts ----
setup_fonts()
fonts <- get_font_families()

font_body    <- fonts$text    %||% ""
font_title   <- fonts$title   %||% ""
font_caption <- fonts$caption %||% ""

### |- plot theme ----
base_theme   <- create_base_theme(colors)

weekly_theme <- extend_weekly_theme(
  base_theme,
  theme(
    # Axes
    axis.title.x = element_blank(),
    axis.title.y = element_blank(),
    axis.text.x = element_blank(),
    axis.text.y = element_text(
      size   = 14,
      face   = "plain",
      family = fonts$text,
      color  = colors$text,
      margin = margin(r = 8)
    ),
    axis.ticks = element_blank(),

    # Grid
    panel.grid.major = element_blank(),
    panel.grid.minor = element_blank(),

    # Legend
    legend.position = "top",
    legend.direction = "horizontal",
    legend.title = element_blank(),
    legend.text = element_text(
      size   = 9.5,
      family = fonts$text,
      color  = colors$text
    ),
    legend.key.width = unit(1.4, "cm"),
    legend.key.height = unit(0.4, "cm"),
    legend.spacing.x = unit(0.6, "cm"),

    # Margins
    plot.margin = margin(t = 10, r = 20, b = 10, l = 20)
  )
)

theme_set(weekly_theme)
```

6. Plot

Show code
```{r}
#| label: plot
#| warning: false

### |- main plot ----
p <- ggplot(
  data    = income_df,
  mapping = aes(x = share, y = year_lbl, fill = bracket)
) +
  geom_col(
    position  = position_stack(reverse = TRUE),
    width = 0.5,
    color = "white",
    linewidth = 0.3
  ) +
  geom_text(
    data  = income_labels |> filter(bracket != "$10 – $30"),
    mapping  = aes(x = xmid, y = year_lbl, label = glue("{round(share)}%")),
    color = "white",
    size  = 3.8,
    fontface  = "bold",
    family  = fonts$text,
    inherit.aes = FALSE
  ) +
  geom_text(
    data = income_labels |> filter(bracket == "$10 – $30"),
    mapping = aes(x = xmid, y = year_lbl, label = glue("{round(share)}%")),
    color = "#0B1F2A",
    size  = 3.8,
    fontface  = "bold",
    family = fonts$text,
    inherit.aes = FALSE
  ) +
  annotate(
    "text",
    x = ann_poverty_x, y = 2.45,
    label = "Extreme poverty\nnearly halved",
    size = 2.9,
    color = colorspace::lighten(colors$text, 0.3),
    family = fonts$text,
    hjust = 0.5,
    lineheight = 1.25
  ) +
  annotate(
    "text",
    x = ann_wealth_x, y = 0.58,
    label = "Above $30/day\nalmost doubled",
    size = 2.9,
    color = colorspace::lighten(colors$text, 0.3),
    family = fonts$text,
    hjust = 0.5,
    lineheight = 1.25
  ) +
  annotate(
    "text",
    x = ann_middle_x, y = 2.45,
    label = "Largest growth:\n$10 – $30/day",
    size = 3.6,
    fontface = "bold",
    color = colors$text,
    family = fonts$text,
    hjust = 0.5,
    lineheight = 1.25
  ) +
  scale_fill_manual(
    values = unname(colors$palette),
    breaks = bracket_levels,
    guide  = guide_legend(nrow = 1, reverse = FALSE)
  ) +
  scale_x_continuous(
    expand = expansion(mult = c(0, 0.01)),
    limits = c(0, 100)
  ) +
  labs(
    title  = title_text,
    subtitle = subtitle_text,
    caption  = caption_text
  ) +
  theme(
    plot.title = element_text(
      size = 22,
      face   = "bold",
      family = fonts$title,
      color  = colors$title,
      margin = margin(b = 6)
    ),
    plot.subtitle = element_text(
      size = 11,
      family = fonts$text,
      color  = colors$text,
      lineheight = 1.3,
      margin = margin(b = 16)
    ),
    plot.caption = element_markdown(
      size  = 7,
      family = fonts$caption,
      color = colors$caption,
      hjust  = 0,
      lineheight = 1.2,
      margin = margin(t = 14)
    )
  )
```

7. Save

Show code
```{r}
#| label: save
#| warning: false

### |-  plot image ----  
save_plot(
  p, 
  type = "30daychartchallenge", 
  year = 2026, 
  day = 09, 
  width = 10, 
  height = 6
  )
```

8. Session Info

TipExpand for Session Info
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 26100)

Matrix products: default


locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] here_1.0.2      glue_1.8.0      scales_1.4.0    janitor_2.2.1  
 [5] patchwork_1.3.2 showtext_0.9-7  showtextdb_3.0  sysfonts_0.8.9 
 [9] ggtext_0.1.2    lubridate_1.9.5 forcats_1.0.1   stringr_1.6.0  
[13] dplyr_1.2.0     purrr_1.2.1     readr_2.2.0     tidyr_1.3.2    
[17] tibble_3.2.1    ggplot2_4.0.2   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] gtable_0.3.6       xfun_0.56          htmlwidgets_1.6.4  tzdb_0.5.0        
 [5] vctrs_0.7.1        tools_4.3.1        generics_0.1.4     curl_7.0.0        
 [9] parallel_4.3.1     gifski_1.32.0-2    pacman_0.5.1       pkgconfig_2.0.3   
[13] RColorBrewer_1.1-3 S7_0.2.0           lifecycle_1.0.5    compiler_4.3.1    
[17] farver_2.1.2       textshaping_1.0.4  codetools_0.2-19   snakecase_0.11.1  
[21] litedown_0.9       htmltools_0.5.9    yaml_2.3.12        pillar_1.11.1     
[25] crayon_1.5.3       camcorder_0.1.0    magick_2.8.6       commonmark_2.0.0  
[29] tidyselect_1.2.1   digest_0.6.39      stringi_1.8.7      labeling_0.4.3    
[33] rsvg_2.6.2         rprojroot_2.1.1    fastmap_1.2.0      grid_4.3.1        
[37] colorspace_2.1-1   cli_3.6.5          magrittr_2.0.3     withr_3.0.2       
[41] bit64_4.6.0-1      timechange_0.4.0   rmarkdown_2.30     bit_4.6.0         
[45] otel_0.2.0         ragg_1.5.0         hms_1.1.4          evaluate_1.0.5    
[49] knitr_1.51         markdown_2.0       rlang_1.1.7        gridtext_0.1.6    
[53] Rcpp_1.1.1         xml2_1.5.2         svglite_2.1.3      rstudioapi_0.18.0 
[57] vroom_1.7.0        jsonlite_2.0.0     R6_2.6.1           systemfonts_1.3.2 

9. GitHub Repository

TipExpand for GitHub Repo

The complete code for this analysis is available in 30dcc_2026_09.qmd.

For the full repository, click here.

10. References

TipExpand for References
  1. Data Sources:
    • World Bank Poverty and Inequality Platform. (2025). Distribution of population between different poverty lines [Dataset]. Our World in Data. Retrieved March 22, 2026 from https://ourworldindata.org/grapher/distribution-of-population-between-different-poverty-thresholds-stacke-bar

11. Custom Functions Documentation

Note📦 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

Back to top

Citation

BibTeX citation:
@online{ponce2026,
  author = {Ponce, Steven},
  title = {From {Survival} to {Stability}},
  date = {2026-04-09},
  url = {https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_09.html},
  langid = {en}
}
For attribution, please cite this work as:
Ponce, Steven. 2026. “From Survival to Stability.” April 9, 2026. https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_09.html.
Source Code
---
title: "From Survival to Stability"
subtitle: "Share of the global population across daily income thresholds (PPP-adjusted), 2000 vs. 2022"
description: "A proportional stacked bar chart tracking how the global population shifted across four daily income thresholds between 2000 and 2022. Extreme poverty (below $3/day) nearly halved from 36% to 11%, while the $10–$30/day bracket saw the largest expansion — from 13% to 27% — signaling the rise of a global middle. Built with ggplot2 using World Bank PIP data via Our World in Data."
date: "2026-04-09" 
author:
  - name: "Steven Ponce"
    url: "https://stevenponce.netlify.app"
citation:
  url: "https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_09.html"
categories: ["30DayChartChallenge", "Data Visualization", "R Programming", "2026"]
tags: [
  "30DayChartChallenge",
  "Distributions",
  "Wealth",
  "Income Inequality",
  "Global Poverty",
  "Stacked Bar Chart",
  "World Bank",
  "Our World in Data",
  "ggplot2",
  "PPP",
  "Economic Development",
  "Middle Class"
]
image: "thumbnails/30dcc_2026_09.png"
format:
  html:
    toc: true
    toc-depth: 5
    code-link: true
    code-fold: true
    code-tools: true
    code-summary: "Show code"
    self-contained: true
    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
---

![Horizontal stacked bar chart comparing the global distribution of population across four daily income thresholds in 2000 and 2022, adjusted for purchasing power parity. In 2000, 36% of the world lived on less than $3 per day and 38% on $3–$10; by 2022, extreme poverty fell to 11% while the $10–$30 bracket saw the largest growth, rising from 13% to 27%. Those above $30 per day nearly doubled from 13% to 18%.](30dcc_2026_09.png){#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, patchwork,     
  janitor, scales, glue
  )
})

### |- figure size ----
camcorder::gg_record(
  dir    = here::here("temp_plots"),
  device = "png",
  width  = 10,
  height = 6,
  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

# Source: World Bank Poverty and Inequality Platform (2025) via Our World in Data
# Full dataset filtered to global aggregate (Entity == "World") for 2000 and 2022
# Raw columns are absolute population counts — converted to % shares in tidy step

income_raw <- read_csv(
  here::here("data/30DayChartChallenge/2026/owid_income_distribution.csv"),
  show_col_types = FALSE
  ) |>
  clean_names() |>
  filter(entity == "World", year %in% c(2000, 2022))
```

#### [3. Examine the Data]{.smallcaps}

```{r}
#| label: examine
#| include: true
#| eval: true
#| results: 'hide'
#| warning: false

glimpse(income_raw)
```

#### [4. Tidy Data]{.smallcaps}

```{r}
#| label: tidy
#| warning: false

# Bracket factor levels: low → high income 
bracket_levels <- c(
  "< $3",
  "$3 – $10",
  "$10 – $30",
  "> $30"
)

income_df <- income_raw |>
  # Convert absolute counts to % shares
  mutate(
    total        = below_3_a_day + x3_10_a_day + x10_30_a_day + above_30_a_day,
    "< $3"       = below_3_a_day / total * 100,
    "$3 – $10"   = x3_10_a_day / total * 100,
    "$10 – $30"  = x10_30_a_day / total * 100,
    "> $30"      = above_30_a_day / total * 100
  ) |>
  select(year, all_of(bracket_levels)) |>
  pivot_longer(
    cols      = all_of(bracket_levels),
    names_to  = "bracket",
    values_to = "share"
  ) |>
  mutate(
    bracket  = factor(bracket, levels = bracket_levels),
    year_lbl = factor(year, levels = c(2022, 2000), labels = c("2022", "2000"))
  ) |>
  arrange(year, bracket) |>
  group_by(year) |>
  mutate(
    xmax = cumsum(share),
    xmin = xmax - share,
    xmid = (xmin + xmax) / 2
  ) |>
  ungroup()

### |- annotation anchors (data-driven) ----
ann_poverty_x <- income_df |>
  filter(bracket == "< $3") |> summarise(xmid = mean(xmid)) |> pull(xmid)

ann_wealth_x <- income_df |>
  filter(year == 2022, bracket == "> $30") |> pull(xmid)

ann_middle_x <- income_df |>
  filter(year == 2022, bracket == "$10 – $30") |> pull(xmid)

### |- segment labels ----
income_labels <- income_df |>
  filter(share >= 9)
```


#### [5. Visualization Parameters]{.smallcaps}

```{r}
#| label: params
#| include: true
#| warning: false

### |- plot aesthetics ----
colors <- get_theme_colors(
  palette = c(
    "< $3"      = "#6B0F1A",  
    "$3 – $10"  = "#C94A3A",  
    "$10 – $30" = "#8FAFC3",   
    "> $30"     = "#1B3A52"  
  )
)

### |- titles and caption ----
title_text    <- "From Survival to Stability"

subtitle_text <- "Share of the global population across daily income thresholds (PPP-adjusted), 2000 vs. 2022"

caption_text  <- create_dcc_caption(
  dcc_year    = 2026,
  dcc_day     = 9,
  source_text = "World Bank Poverty and Inequality Platform (2025) via Our World in Data"
)

### |- fonts ----
setup_fonts()
fonts <- get_font_families()

font_body    <- fonts$text    %||% ""
font_title   <- fonts$title   %||% ""
font_caption <- fonts$caption %||% ""

### |- plot theme ----
base_theme   <- create_base_theme(colors)

weekly_theme <- extend_weekly_theme(
  base_theme,
  theme(
    # Axes
    axis.title.x = element_blank(),
    axis.title.y = element_blank(),
    axis.text.x = element_blank(),
    axis.text.y = element_text(
      size   = 14,
      face   = "plain",
      family = fonts$text,
      color  = colors$text,
      margin = margin(r = 8)
    ),
    axis.ticks = element_blank(),

    # Grid
    panel.grid.major = element_blank(),
    panel.grid.minor = element_blank(),

    # Legend
    legend.position = "top",
    legend.direction = "horizontal",
    legend.title = element_blank(),
    legend.text = element_text(
      size   = 9.5,
      family = fonts$text,
      color  = colors$text
    ),
    legend.key.width = unit(1.4, "cm"),
    legend.key.height = unit(0.4, "cm"),
    legend.spacing.x = unit(0.6, "cm"),

    # Margins
    plot.margin = margin(t = 10, r = 20, b = 10, l = 20)
  )
)

theme_set(weekly_theme)
```

#### [6. Plot]{.smallcaps}

```{r}
#| label: plot
#| warning: false

### |- main plot ----
p <- ggplot(
  data    = income_df,
  mapping = aes(x = share, y = year_lbl, fill = bracket)
) +
  geom_col(
    position  = position_stack(reverse = TRUE),
    width = 0.5,
    color = "white",
    linewidth = 0.3
  ) +
  geom_text(
    data  = income_labels |> filter(bracket != "$10 – $30"),
    mapping  = aes(x = xmid, y = year_lbl, label = glue("{round(share)}%")),
    color = "white",
    size  = 3.8,
    fontface  = "bold",
    family  = fonts$text,
    inherit.aes = FALSE
  ) +
  geom_text(
    data = income_labels |> filter(bracket == "$10 – $30"),
    mapping = aes(x = xmid, y = year_lbl, label = glue("{round(share)}%")),
    color = "#0B1F2A",
    size  = 3.8,
    fontface  = "bold",
    family = fonts$text,
    inherit.aes = FALSE
  ) +
  annotate(
    "text",
    x = ann_poverty_x, y = 2.45,
    label = "Extreme poverty\nnearly halved",
    size = 2.9,
    color = colorspace::lighten(colors$text, 0.3),
    family = fonts$text,
    hjust = 0.5,
    lineheight = 1.25
  ) +
  annotate(
    "text",
    x = ann_wealth_x, y = 0.58,
    label = "Above $30/day\nalmost doubled",
    size = 2.9,
    color = colorspace::lighten(colors$text, 0.3),
    family = fonts$text,
    hjust = 0.5,
    lineheight = 1.25
  ) +
  annotate(
    "text",
    x = ann_middle_x, y = 2.45,
    label = "Largest growth:\n$10 – $30/day",
    size = 3.6,
    fontface = "bold",
    color = colors$text,
    family = fonts$text,
    hjust = 0.5,
    lineheight = 1.25
  ) +
  scale_fill_manual(
    values = unname(colors$palette),
    breaks = bracket_levels,
    guide  = guide_legend(nrow = 1, reverse = FALSE)
  ) +
  scale_x_continuous(
    expand = expansion(mult = c(0, 0.01)),
    limits = c(0, 100)
  ) +
  labs(
    title  = title_text,
    subtitle = subtitle_text,
    caption  = caption_text
  ) +
  theme(
    plot.title = element_text(
      size = 22,
      face   = "bold",
      family = fonts$title,
      color  = colors$title,
      margin = margin(b = 6)
    ),
    plot.subtitle = element_text(
      size = 11,
      family = fonts$text,
      color  = colors$text,
      lineheight = 1.3,
      margin = margin(b = 16)
    ),
    plot.caption = element_markdown(
      size  = 7,
      family = fonts$caption,
      color = colors$caption,
      hjust  = 0,
      lineheight = 1.2,
      margin = margin(t = 14)
    )
  )
```

#### [7. Save]{.smallcaps}

```{r}
#| label: save
#| warning: false

### |-  plot image ----  
save_plot(
  p, 
  type = "30daychartchallenge", 
  year = 2026, 
  day = 09, 
  width = 10, 
  height = 6
  )
```

#### [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_09.qmd`](https://github.com/poncest/personal-website/blob/master/data_visualizations/TidyTuesday/2026/30dcc_2026_09.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:
   - World Bank Poverty and Inequality Platform. (2025). *Distribution of population 
     between different poverty lines* [Dataset]. Our World in Data.
     Retrieved March 22, 2026 from 
     https://ourworldindata.org/grapher/distribution-of-population-between-different-poverty-thresholds-stacke-bar
:::

#### [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)
:::

© 2024 Steven Ponce

Source Issues