• 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

The Energy Transition Looks Different at Every Scale

  • Show All Code
  • Hide All Code

  • View Source

Global distributions mask large differences across income groups—and even wider gaps between countries within the same group (2022)

30DayChartChallenge
Data Visualization
R Programming
2026
Renewable electricity share varies widely across countries—but global averages hide the real story. This multiscale distribution chart zooms from a global histogram to income-group density slabs to a country-level dot plot of upper-middle income nations, revealing that the energy transition is most uneven precisely where it matters most. Built with ggdist and patchwork in R.
Author

Steven Ponce

Published

April 7, 2026

Figure 1: A three-panel chart showing the distribution of renewable electricity share across countries in 2022 at three scales. Panel 1 is a histogram of the global distribution, revealing a bimodal shape with many countries clustered near 0–20% and another group near 100%, with a median of roughly 32%. Panel 2 shows half-eye density plots by World Bank income group — Low, Lower-middle, Upper-middle, and High — all with similar medians around 28–36%, but notably different spreads and shapes. Panel 3 zooms in on Upper-middle income countries as a dot plot, where individual-country variation is stark: South Africa sits near 0%, China and Turkey near 25–30%, and Brazil and Paraguay near 80–100%.

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, ggdist, ggrepel, grid        
  )
})

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

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

### |- RSF 2025 ----
energy_raw<- read_csv(
  here::here("data/30DayChartChallenge/2026/owid-energy-data.csv"),
  show_col_types = FALSE
)

# World Bank FY2024 income classification — hardcoded tribble
# Source: https://databank.worldbank.org/data/download/site-content/CLASS.xlsx
wb_income <- tribble(
  ~country,                          ~income_group,
  "Afghanistan",                     "Low income",
  "Albania",                         "Upper-middle income",
  "Algeria",                         "Lower-middle income",
  "Angola",                          "Lower-middle income",
  "Argentina",                       "Upper-middle income",
  "Armenia",                         "Upper-middle income",
  "Azerbaijan",                      "Upper-middle income",
  "Bangladesh",                      "Lower-middle income",
  "Belarus",                         "Upper-middle income",
  "Belize",                          "Upper-middle income",
  "Benin",                           "Low income",
  "Bhutan",                          "Lower-middle income",
  "Bolivia",                         "Lower-middle income",
  "Bosnia and Herzegovina",          "Upper-middle income",
  "Botswana",                        "Upper-middle income",
  "Brazil",                          "Upper-middle income",
  "Bulgaria",                        "Upper-middle income",
  "Cabo Verde",                      "Lower-middle income",
  "Cambodia",                        "Lower-middle income",
  "Cameroon",                        "Lower-middle income",
  "Central African Republic",        "Low income",
  "Chad",                            "Low income",
  "China",                           "Upper-middle income",
  "Colombia",                        "Upper-middle income",
  "Comoros",                         "Lower-middle income",
  "Congo",                           "Lower-middle income",
  "Costa Rica",                      "Upper-middle income",
  "Cote d'Ivoire",                   "Lower-middle income",
  "Cuba",                            "Upper-middle income",
  "Dem. Rep. Congo",                 "Low income",
  "Dominican Republic",              "Upper-middle income",
  "Ecuador",                         "Upper-middle income",
  "Egypt",                           "Lower-middle income",
  "El Salvador",                     "Lower-middle income",
  "Equatorial Guinea",               "Upper-middle income",
  "Eritrea",                         "Low income",
  "Eswatini",                        "Lower-middle income",
  "Ethiopia",                        "Low income",
  "Fiji",                            "Upper-middle income",
  "Gabon",                           "Upper-middle income",
  "Gambia",                          "Low income",
  "Georgia",                         "Upper-middle income",
  "Ghana",                           "Lower-middle income",
  "Guatemala",                       "Upper-middle income",
  "Guinea",                          "Low income",
  "Guinea-Bissau",                   "Low income",
  "Guyana",                          "Upper-middle income",
  "Haiti",                           "Low income",
  "Honduras",                        "Lower-middle income",
  "India",                           "Lower-middle income",
  "Indonesia",                       "Upper-middle income",
  "Iran",                            "Lower-middle income",
  "Iraq",                            "Upper-middle income",
  "Jamaica",                         "Upper-middle income",
  "Jordan",                          "Upper-middle income",
  "Kazakhstan",                      "Upper-middle income",
  "Kenya",                           "Lower-middle income",
  "Kyrgyzstan",                      "Lower-middle income",
  "Laos",                            "Lower-middle income",
  "Lebanon",                         "Lower-middle income",
  "Lesotho",                         "Lower-middle income",
  "Liberia",                         "Low income",
  "Libya",                           "Upper-middle income",
  "Madagascar",                      "Low income",
  "Malawi",                          "Low income",
  "Malaysia",                        "Upper-middle income",
  "Maldives",                        "Upper-middle income",
  "Mali",                            "Low income",
  "Marshall Islands",                "Upper-middle income",
  "Mauritania",                      "Lower-middle income",
  "Mauritius",                       "Upper-middle income",
  "Mexico",                          "Upper-middle income",
  "Micronesia",                      "Lower-middle income",
  "Mongolia",                        "Lower-middle income",
  "Montenegro",                      "Upper-middle income",
  "Morocco",                         "Lower-middle income",
  "Mozambique",                      "Low income",
  "Myanmar",                         "Lower-middle income",
  "Namibia",                         "Upper-middle income",
  "Nepal",                           "Lower-middle income",
  "Nicaragua",                       "Lower-middle income",
  "Niger",                           "Low income",
  "Nigeria",                         "Lower-middle income",
  "North Macedonia",                 "Upper-middle income",
  "Pakistan",                        "Lower-middle income",
  "Papua New Guinea",                "Lower-middle income",
  "Paraguay",                        "Upper-middle income",
  "Peru",                            "Upper-middle income",
  "Philippines",                     "Lower-middle income",
  "Rwanda",                          "Low income",
  "Samoa",                           "Lower-middle income",
  "Sao Tome and Principe",           "Lower-middle income",
  "Senegal",                         "Lower-middle income",
  "Serbia",                          "Upper-middle income",
  "Sierra Leone",                    "Low income",
  "Solomon Islands",                 "Lower-middle income",
  "Somalia",                         "Low income",
  "South Africa",                    "Upper-middle income",
  "South Sudan",                     "Low income",
  "Sri Lanka",                       "Lower-middle income",
  "Sudan",                           "Low income",
  "Suriname",                        "Upper-middle income",
  "Syrian Arab Republic",            "Low income",
  "Tajikistan",                      "Lower-middle income",
  "Tanzania",                        "Low income",
  "Thailand",                        "Upper-middle income",
  "Timor-Leste",                     "Lower-middle income",
  "Togo",                            "Low income",
  "Tonga",                           "Upper-middle income",
  "Tunisia",                         "Lower-middle income",
  "Turkey",                          "Upper-middle income",
  "Turkmenistan",                    "Upper-middle income",
  "Tuvalu",                          "Upper-middle income",
  "Uganda",                          "Low income",
  "Ukraine",                         "Lower-middle income",
  "Uzbekistan",                      "Lower-middle income",
  "Vanuatu",                         "Lower-middle income",
  "Venezuela",                       "Upper-middle income",
  "Vietnam",                         "Lower-middle income",
  "West Bank and Gaza",              "Lower-middle income",
  "Yemen",                           "Low income",
  "Zambia",                          "Lower-middle income",
  "Zimbabwe",                        "Lower-middle income",
  # High income
  "Australia",                       "High income",
  "Austria",                         "High income",
  "Bahrain",                         "High income",
  "Belgium",                         "High income",
  "Canada",                          "High income",
  "Chile",                           "High income",
  "Croatia",                         "High income",
  "Cyprus",                          "High income",
  "Czech Republic",                  "High income",
  "Denmark",                         "High income",
  "Estonia",                         "High income",
  "Finland",                         "High income",
  "France",                          "High income",
  "Germany",                         "High income",
  "Greece",                          "High income",
  "Hong Kong",                       "High income",
  "Hungary",                         "High income",
  "Iceland",                         "High income",
  "Ireland",                         "High income",
  "Israel",                          "High income",
  "Italy",                           "High income",
  "Japan",                           "High income",
  "Kuwait",                          "High income",
  "Latvia",                          "High income",
  "Lithuania",                       "High income",
  "Luxembourg",                      "High income",
  "Malta",                           "High income",
  "Netherlands",                     "High income",
  "New Zealand",                     "High income",
  "Norway",                          "High income",
  "Oman",                            "High income",
  "Poland",                          "High income",
  "Portugal",                        "High income",
  "Qatar",                           "High income",
  "Romania",                         "High income",
  "Saudi Arabia",                    "High income",
  "Singapore",                       "High income",
  "Slovakia",                        "High income",
  "Slovenia",                        "High income",
  "South Korea",                     "High income",
  "Spain",                           "High income",
  "Sweden",                          "High income",
  "Switzerland",                     "High income",
  "Taiwan",                          "High income",
  "Trinidad and Tobago",             "High income",
  "United Arab Emirates",            "High income",
  "United Kingdom",                  "High income",
  "United States",                   "High income",
  "Uruguay",                         "High income"
)
```

3. Examine the Data

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

glimpse(energy_raw)
```

4. Tidy Data

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

### |- filter to 2022, countries only, join income classification ----
energy_2022 <- energy_raw |>
  filter(
    year == 2022,
    !country %in% c(
      "World", "Asia", "Europe", "Africa", "North America",
      "South America", "Oceania", "European Union (27)",
      "High-income countries", "Low-income countries",
      "Lower-middle-income countries", "Upper-middle-income countries",
      "OECD (Ember)", "Non-OECD (Ember)"
    )
  ) |>
  select(country, year, renewables_share_elec) |>
  filter(!is.na(renewables_share_elec)) |>
  left_join(wb_income, by = "country")

### |- panel 1: global distribution (all countries with income classification) ----
p1_data <- energy_2022 |>
  filter(!is.na(income_group)) |>
  mutate(group = "Global")

### |- panel 2: by income group ----
income_order <- c(
  "Low income",
  "Lower-middle income",
  "Upper-middle income",
  "High income"
)

p2_data <- energy_2022 |>
  filter(!is.na(income_group)) |>
  mutate(income_group = factor(income_group, levels = income_order))

### |- panel 3: upper-middle income countries, labeled highlights ----
label_countries <- c("Brazil", "South Africa", "China", "Turkey")

p3_data <- energy_2022 |>
  filter(income_group == "Upper-middle income") |>
  arrange(renewables_share_elec) |>
  mutate(
    country_label = if_else(country %in% label_countries, country, NA_character_),
    rank          = row_number()
  )

### |- compute medians for annotations ----
group_medians <- p2_data |>
  group_by(income_group) |>
  summarise(
    median_val = median(renewables_share_elec, na.rm = TRUE),
    .groups = "drop"
  )

global_median <- median(p1_data$renewables_share_elec, na.rm = TRUE)
p3_median <- median(p3_data$renewables_share_elec, na.rm = TRUE)
```

5. Visualization Parameters

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

### |- plot aesthetics ----
colors <- get_theme_colors(
  palette = list(
    "Low income"           = "#8B1A2A",  
    "Lower-middle income"  = "#C0434E",  
    "Upper-middle income"  = "#B08090", 
    "High income"          = "#2E1122",  
    "iqr_band"             = "#D4C7BB",  
    "median_dot_fill"      = "#FFFFFF",  
    "median_dot_stroke"    = "#3D0C1E", 
    "median_label"         = "#3D0C1E",  
    "label_text"           = "gray20",   
    "global_ref"           = "#B29A8B"   
  )
)

### |- titles and caption ----
title_text <- "The Energy Transition Looks Different at Every Scale"

subtitle_text <- "Global distributions mask large differences across income groups—and even wider gaps between\ncountries within the same group (2022)"

caption_text <- create_dcc_caption(
  dcc_year    = 2026,
  dcc_day     = 07,
  source_text = "Our World in Data · Energy Dataset (Ember / Energy Institute)"
)

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

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

weekly_theme <- extend_weekly_theme(
  base_theme,
  theme(
    plot.background = element_rect(fill = colors$palette$bg, color = NA),
    panel.background = element_rect(fill = colors$palette$bg, color = NA),
    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
    panel.grid.major.y = element_blank(),
    panel.grid.minor = element_blank(),
    axis.ticks = element_blank(),
    axis.text = element_text(
      family = fonts$body,
      size   = 9,
      color  = colors$palette$label_text
    ),
    axis.title = element_text(
      family = fonts$body,
      size   = 9.5,
      color  = colors$palette$label_text
    ),
    strip.text = element_blank(),
    panel.spacing = unit(12, "pt"),
    plot.margin = margin(10, 16, 10, 16)
  )
)

theme_set(weekly_theme)
```

6. Plot

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

### |- panel 1: global histinterval ----
p1 <- ggplot(p1_data, aes(x = renewables_share_elec, y = 0)) +
  stat_histinterval(
    fill           = colors$palette$global_ref,
    slab_color     = NA,
    alpha          = 0.55,
    point_color    = colors$palette$median_dot_stroke,
    interval_color = colors$palette$iqr_band,
    point_size     = 2.8,
    breaks         = 20
  ) +
  geom_vline(
    xintercept = global_median,
    linetype   = "dashed",
    color      = colors$palette$median_dot_stroke,
    linewidth  = 0.5
  ) +
  annotate(
    "text",
    x      = global_median + 2,
    y      = Inf,
    label  = glue("Median: {round(global_median, 1)}%"),
    hjust  = 0,
    vjust  = 1.4,
    size   = 3,
    family = fonts$body,
    color  = colors$palette$median_label
  ) +
  annotate(
    "text",
    x        = 97,
    y        = Inf,
    label    = "GLOBAL",
    hjust    = 1,
    vjust    = 1.4,
    size     = 3.2,
    fontface = "bold",
    family   = fonts$body,
    color    = colors$palette$label_text
  ) +
  scale_x_continuous(
    limits = c(0, 100),
    breaks = c(0, 25, 50, 75, 100),
    labels = label_percent(scale = 1, suffix = "%"),
    expand = c(0.01, 0)
  ) +
  labs(
    x = "Renewable electricity share (%)",
    y = NULL
  ) +
  theme(
    axis.text.y  = element_blank(),
    axis.title.y = element_blank()
  )

### |- panel 2: by income group — halfeye ----
p2 <- ggplot(p2_data, aes(x = renewables_share_elec, y = fct_rev(income_group))) +
  stat_halfeye(
    aes(
      fill  = income_group,
      alpha = income_group == "Upper-middle income"
    ),
    .width = c(0.5, 0.9),
    point_color = colors$palette$median_dot_stroke,
    point_fill = colors$palette$median_dot_fill,
    interval_color = colors$palette$iqr_band,
    slab_color = NA,
    normalize = "all",
    scale = 0.9
  ) +
  scale_fill_manual(
    values = c(
      "Low income"           = colors$palette$`Low income`,
      "Lower-middle income"  = colors$palette$`Lower-middle income`,
      "Upper-middle income"  = colors$palette$`Upper-middle income`,
      "High income"          = colors$palette$`High income`
    )
  ) +
  scale_alpha_manual(
    values = c("TRUE" = 1, "FALSE" = 0.45),
    guide  = "none"
  ) +
  geom_text(
    data = group_medians,
    aes(
      x = median_val + 3,
      y = fct_rev(income_group),
      label = glue("{round(median_val, 0)}%")
    ),
    hjust = 0,
    size = 2.8,
    family = fonts$body,
    color = colors$palette$median_label,
    inherit.aes = FALSE
  ) +
  annotate(
    "text",
    x        = 95,
    y        = 4.45,
    label    = "BY INCOME GROUP",
    hjust    = 1,
    size     = 3.2,
    fontface = "bold",
    family   = fonts$body,
    color    = colors$palette$label_text
  ) +
  scale_x_continuous(
    limits = c(0, 100),
    breaks = c(0, 25, 50, 75, 100),
    labels = label_percent(scale = 1, suffix = "%"),
    expand = c(0.01, 0)
  ) +
  labs(
    x = "Renewable electricity share (%)",
    y = NULL
  ) +
  guides(fill = "none")

### |- panel 3: upper-middle income — quantile dot plot ----
p3 <- ggplot(p3_data, aes(x = renewables_share_elec, y = 0)) +
  stat_dots(
    fill   = colors$palette$`Upper-middle income`,
    color  = NA,
    alpha  = 0.9,
    size   = 2.4,
    layout = "bin"
  ) +
  geom_vline(
    xintercept = p3_median,
    linetype   = "dashed",
    color      = colors$palette$median_dot_stroke,
    linewidth  = 0.5
  ) +
  annotate(
    "text",
    x      = p3_median + 2,
    y      = 1.18,
    label  = glue("Median: {round(p3_median, 1)}%"),
    hjust  = 0,
    size   = 2.8,
    family = fonts$body,
    color  = colors$palette$median_label
  ) +
  geom_label_repel(
    data = p3_data |> filter(!is.na(country_label)),
    aes(x = renewables_share_elec, y = 0, label = country_label),
    nudge_y = 0.42,
    size = 2.8,
    family = fonts$body,
    color = colors$palette$label_text,
    fill = colors$palette$bg,
    label.size = 0.2,
    label.padding = unit(0.15, "lines"),
    min.segment.length = 0.3,
    segment.color = "gray60",
    inherit.aes = FALSE
  ) +
  annotate(
    "text",
    x        = 95,
    y        = 1.1,
    label    = "UPPER-MIDDLE INCOME",
    hjust    = 1,
    size     = 3.2,
    fontface = "bold",
    family   = fonts$body,
    color    = colors$palette$label_text
  ) +
  scale_x_continuous(
    limits = c(0, 100),
    breaks = c(0, 25, 50, 75, 100),
    labels = label_percent(scale = 1, suffix = "%"),
    expand = c(0.01, 0)
  ) +
  scale_y_continuous(
    limits = c(-0.5, 1.4)
  ) +
  labs(
    x = "Renewable electricity share (%)",
    y = NULL
  ) +
  theme(
    axis.text.y  = element_blank(),
    axis.title.y = element_blank()
  )

### |- combined plots ----
combined_plots <- p1 / p2 / p3 +
  plot_layout(heights = c(1.3, 2.2, 1.3)) +
  plot_annotation(
    title = title_text,
    subtitle = subtitle_text,
    caption = caption_text,
    theme = theme(
      plot.title = element_text(
        family = fonts$title,
        face   = "bold",
        size   = 22,
        color  = colors$palette$label_text,
        margin = margin(b = 6)
      ),
      plot.subtitle = element_text(
        family = fonts$body,
        size   = 11,
        color  = colors$palette$label_text,
        margin = margin(b = 16)
      ),
      plot.caption = element_markdown(
        family = fonts$body,
        size   = 7.5,
        color  = "gray50",
        margin = margin(t = 12),
        hjust = 0,
      ),
      plot.background = element_rect(fill = colors$palette$bg, color = NA),
      plot.margin = margin(20, 20, 12, 20)
    )
  )
```

7. Save

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

### |-  plot image ----  
save_plot_patchwork(
  combined_plots, 
  type = "30daychartchallenge", 
  year = 2026, 
  day = 07, 
  width = 8, 
  height = 8
  )
```

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] grid      stats     graphics  grDevices utils     datasets  methods  
[8] base     

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

loaded via a namespace (and not attached):
 [1] gtable_0.3.6         xfun_0.56            htmlwidgets_1.6.4   
 [4] tzdb_0.5.0           quadprog_1.5-8       yulab.utils_0.2.4   
 [7] vctrs_0.7.1          tools_4.3.1          generics_0.1.4      
[10] curl_7.0.0           parallel_4.3.1       gifski_1.32.0-2     
[13] pacman_0.5.1         pkgconfig_2.0.3      ggplotify_0.1.3     
[16] RColorBrewer_1.1-3   S7_0.2.0             distributional_0.7.0
[19] lifecycle_1.0.5      compiler_4.3.1       farver_2.1.2        
[22] codetools_0.2-19     snakecase_0.11.1     litedown_0.9        
[25] htmltools_0.5.9      yaml_2.3.12          crayon_1.5.3        
[28] pillar_1.11.1        camcorder_0.1.0      magick_2.8.6        
[31] commonmark_2.0.0     tidyselect_1.2.1     digest_0.6.39       
[34] stringi_1.8.7        labeling_0.4.3       rsvg_2.6.2          
[37] rprojroot_2.1.1      fastmap_1.2.0        cli_3.6.5           
[40] magrittr_2.0.3       withr_3.0.2          rappdirs_0.3.4      
[43] bit64_4.6.0-1        timechange_0.4.0     rmarkdown_2.30      
[46] bit_4.6.0            otel_0.2.0           hms_1.1.4           
[49] evaluate_1.0.5       knitr_1.51           markdown_2.0        
[52] gridGraphics_0.5-1   rlang_1.1.7          gridtext_0.1.6      
[55] Rcpp_1.1.1           xml2_1.5.2           svglite_2.1.3       
[58] rstudioapi_0.18.0    vroom_1.7.0          jsonlite_2.0.0      
[61] R6_2.6.1             fs_1.6.7             systemfonts_1.3.2   

9. GitHub Repository

TipExpand for GitHub Repo

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

For the full repository, click here.

10. References

TipExpand for References
  1. Data Sources:
    • Our World in Data. (2024). Energy Dataset. Retrieved April 2026 from https://github.com/owid/energy-data
    • Ember & Energy Institute. (2024). Yearly Electricity Data. Retrieved April 2026 from https://ember-climate.org/data/data-tools/data-explorer/
    • World Bank. (2024). World Bank Country and Lending Groups — FY2024 Income Classification. Retrieved April 2026 from https://databank.worldbank.org/data/download/site-content/CLASS.xlsx

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 = {The {Energy} {Transition} {Looks} {Different} at {Every}
    {Scale}},
  date = {2026-04-07},
  url = {https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_07.html},
  langid = {en}
}
For attribution, please cite this work as:
Ponce, Steven. 2026. “The Energy Transition Looks Different at Every Scale.” April 7, 2026. https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_07.html.
Source Code
---
title: "The Energy Transition Looks Different at Every Scale"
subtitle: "Global distributions mask large differences across income groups—and even wider gaps between countries within the same group (2022)"
description: "Renewable electricity share varies widely across countries—but global averages hide the real story. This multiscale distribution chart zooms from a global histogram to income-group density slabs to a country-level dot plot of upper-middle income nations, revealing that the energy transition is most uneven precisely where it matters most. Built with ggdist and patchwork in R."
date: "2026-04-07" 
author:
  - name: "Steven Ponce"
    url: "https://stevenponce.netlify.app"
citation:
  url: "https://stevenponce.netlify.app/data_visualizations/30DayChartChallenge/2026/30dcc_2026_07.html"
categories: ["30DayChartChallenge", "Data Visualization", "R Programming", "2026"]
tags: [
  "30DayChartChallenge",
  "Distributions",
  "Multiscale",
  "ggdist",
  "patchwork",
  "Energy",
  "Renewable Energy",
  "Electricity",
  "Income Inequality",
  "World Bank",
  "Our World in Data",
  "Small Multiples",
  "Dot Plot",
  "Density Plot",
  "Histogram"
]
image: "thumbnails/30dcc_2026_07.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
---

![A three-panel chart showing the distribution of renewable electricity share across countries in 2022 at three scales. Panel 1 is a histogram of the global distribution, revealing a bimodal shape with many countries clustered near 0–20% and another group near 100%, with a median of roughly 32%. Panel 2 shows half-eye density plots by World Bank income group — Low, Lower-middle, Upper-middle, and High — all with similar medians around 28–36%, but notably different spreads and shapes. Panel 3 zooms in on Upper-middle income countries as a dot plot, where individual-country variation is stark: South Africa sits near 0%, China and Turkey near 25–30%, and Brazil and Paraguay near 80–100%.](30dcc_2026_07.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, ggdist, ggrepel, grid        
  )
})

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

### |- RSF 2025 ----
energy_raw<- read_csv(
  here::here("data/30DayChartChallenge/2026/owid-energy-data.csv"),
  show_col_types = FALSE
)

# World Bank FY2024 income classification — hardcoded tribble
# Source: https://databank.worldbank.org/data/download/site-content/CLASS.xlsx
wb_income <- tribble(
  ~country,                          ~income_group,
  "Afghanistan",                     "Low income",
  "Albania",                         "Upper-middle income",
  "Algeria",                         "Lower-middle income",
  "Angola",                          "Lower-middle income",
  "Argentina",                       "Upper-middle income",
  "Armenia",                         "Upper-middle income",
  "Azerbaijan",                      "Upper-middle income",
  "Bangladesh",                      "Lower-middle income",
  "Belarus",                         "Upper-middle income",
  "Belize",                          "Upper-middle income",
  "Benin",                           "Low income",
  "Bhutan",                          "Lower-middle income",
  "Bolivia",                         "Lower-middle income",
  "Bosnia and Herzegovina",          "Upper-middle income",
  "Botswana",                        "Upper-middle income",
  "Brazil",                          "Upper-middle income",
  "Bulgaria",                        "Upper-middle income",
  "Cabo Verde",                      "Lower-middle income",
  "Cambodia",                        "Lower-middle income",
  "Cameroon",                        "Lower-middle income",
  "Central African Republic",        "Low income",
  "Chad",                            "Low income",
  "China",                           "Upper-middle income",
  "Colombia",                        "Upper-middle income",
  "Comoros",                         "Lower-middle income",
  "Congo",                           "Lower-middle income",
  "Costa Rica",                      "Upper-middle income",
  "Cote d'Ivoire",                   "Lower-middle income",
  "Cuba",                            "Upper-middle income",
  "Dem. Rep. Congo",                 "Low income",
  "Dominican Republic",              "Upper-middle income",
  "Ecuador",                         "Upper-middle income",
  "Egypt",                           "Lower-middle income",
  "El Salvador",                     "Lower-middle income",
  "Equatorial Guinea",               "Upper-middle income",
  "Eritrea",                         "Low income",
  "Eswatini",                        "Lower-middle income",
  "Ethiopia",                        "Low income",
  "Fiji",                            "Upper-middle income",
  "Gabon",                           "Upper-middle income",
  "Gambia",                          "Low income",
  "Georgia",                         "Upper-middle income",
  "Ghana",                           "Lower-middle income",
  "Guatemala",                       "Upper-middle income",
  "Guinea",                          "Low income",
  "Guinea-Bissau",                   "Low income",
  "Guyana",                          "Upper-middle income",
  "Haiti",                           "Low income",
  "Honduras",                        "Lower-middle income",
  "India",                           "Lower-middle income",
  "Indonesia",                       "Upper-middle income",
  "Iran",                            "Lower-middle income",
  "Iraq",                            "Upper-middle income",
  "Jamaica",                         "Upper-middle income",
  "Jordan",                          "Upper-middle income",
  "Kazakhstan",                      "Upper-middle income",
  "Kenya",                           "Lower-middle income",
  "Kyrgyzstan",                      "Lower-middle income",
  "Laos",                            "Lower-middle income",
  "Lebanon",                         "Lower-middle income",
  "Lesotho",                         "Lower-middle income",
  "Liberia",                         "Low income",
  "Libya",                           "Upper-middle income",
  "Madagascar",                      "Low income",
  "Malawi",                          "Low income",
  "Malaysia",                        "Upper-middle income",
  "Maldives",                        "Upper-middle income",
  "Mali",                            "Low income",
  "Marshall Islands",                "Upper-middle income",
  "Mauritania",                      "Lower-middle income",
  "Mauritius",                       "Upper-middle income",
  "Mexico",                          "Upper-middle income",
  "Micronesia",                      "Lower-middle income",
  "Mongolia",                        "Lower-middle income",
  "Montenegro",                      "Upper-middle income",
  "Morocco",                         "Lower-middle income",
  "Mozambique",                      "Low income",
  "Myanmar",                         "Lower-middle income",
  "Namibia",                         "Upper-middle income",
  "Nepal",                           "Lower-middle income",
  "Nicaragua",                       "Lower-middle income",
  "Niger",                           "Low income",
  "Nigeria",                         "Lower-middle income",
  "North Macedonia",                 "Upper-middle income",
  "Pakistan",                        "Lower-middle income",
  "Papua New Guinea",                "Lower-middle income",
  "Paraguay",                        "Upper-middle income",
  "Peru",                            "Upper-middle income",
  "Philippines",                     "Lower-middle income",
  "Rwanda",                          "Low income",
  "Samoa",                           "Lower-middle income",
  "Sao Tome and Principe",           "Lower-middle income",
  "Senegal",                         "Lower-middle income",
  "Serbia",                          "Upper-middle income",
  "Sierra Leone",                    "Low income",
  "Solomon Islands",                 "Lower-middle income",
  "Somalia",                         "Low income",
  "South Africa",                    "Upper-middle income",
  "South Sudan",                     "Low income",
  "Sri Lanka",                       "Lower-middle income",
  "Sudan",                           "Low income",
  "Suriname",                        "Upper-middle income",
  "Syrian Arab Republic",            "Low income",
  "Tajikistan",                      "Lower-middle income",
  "Tanzania",                        "Low income",
  "Thailand",                        "Upper-middle income",
  "Timor-Leste",                     "Lower-middle income",
  "Togo",                            "Low income",
  "Tonga",                           "Upper-middle income",
  "Tunisia",                         "Lower-middle income",
  "Turkey",                          "Upper-middle income",
  "Turkmenistan",                    "Upper-middle income",
  "Tuvalu",                          "Upper-middle income",
  "Uganda",                          "Low income",
  "Ukraine",                         "Lower-middle income",
  "Uzbekistan",                      "Lower-middle income",
  "Vanuatu",                         "Lower-middle income",
  "Venezuela",                       "Upper-middle income",
  "Vietnam",                         "Lower-middle income",
  "West Bank and Gaza",              "Lower-middle income",
  "Yemen",                           "Low income",
  "Zambia",                          "Lower-middle income",
  "Zimbabwe",                        "Lower-middle income",
  # High income
  "Australia",                       "High income",
  "Austria",                         "High income",
  "Bahrain",                         "High income",
  "Belgium",                         "High income",
  "Canada",                          "High income",
  "Chile",                           "High income",
  "Croatia",                         "High income",
  "Cyprus",                          "High income",
  "Czech Republic",                  "High income",
  "Denmark",                         "High income",
  "Estonia",                         "High income",
  "Finland",                         "High income",
  "France",                          "High income",
  "Germany",                         "High income",
  "Greece",                          "High income",
  "Hong Kong",                       "High income",
  "Hungary",                         "High income",
  "Iceland",                         "High income",
  "Ireland",                         "High income",
  "Israel",                          "High income",
  "Italy",                           "High income",
  "Japan",                           "High income",
  "Kuwait",                          "High income",
  "Latvia",                          "High income",
  "Lithuania",                       "High income",
  "Luxembourg",                      "High income",
  "Malta",                           "High income",
  "Netherlands",                     "High income",
  "New Zealand",                     "High income",
  "Norway",                          "High income",
  "Oman",                            "High income",
  "Poland",                          "High income",
  "Portugal",                        "High income",
  "Qatar",                           "High income",
  "Romania",                         "High income",
  "Saudi Arabia",                    "High income",
  "Singapore",                       "High income",
  "Slovakia",                        "High income",
  "Slovenia",                        "High income",
  "South Korea",                     "High income",
  "Spain",                           "High income",
  "Sweden",                          "High income",
  "Switzerland",                     "High income",
  "Taiwan",                          "High income",
  "Trinidad and Tobago",             "High income",
  "United Arab Emirates",            "High income",
  "United Kingdom",                  "High income",
  "United States",                   "High income",
  "Uruguay",                         "High income"
)
```

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

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

glimpse(energy_raw)
```

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

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

### |- filter to 2022, countries only, join income classification ----
energy_2022 <- energy_raw |>
  filter(
    year == 2022,
    !country %in% c(
      "World", "Asia", "Europe", "Africa", "North America",
      "South America", "Oceania", "European Union (27)",
      "High-income countries", "Low-income countries",
      "Lower-middle-income countries", "Upper-middle-income countries",
      "OECD (Ember)", "Non-OECD (Ember)"
    )
  ) |>
  select(country, year, renewables_share_elec) |>
  filter(!is.na(renewables_share_elec)) |>
  left_join(wb_income, by = "country")

### |- panel 1: global distribution (all countries with income classification) ----
p1_data <- energy_2022 |>
  filter(!is.na(income_group)) |>
  mutate(group = "Global")

### |- panel 2: by income group ----
income_order <- c(
  "Low income",
  "Lower-middle income",
  "Upper-middle income",
  "High income"
)

p2_data <- energy_2022 |>
  filter(!is.na(income_group)) |>
  mutate(income_group = factor(income_group, levels = income_order))

### |- panel 3: upper-middle income countries, labeled highlights ----
label_countries <- c("Brazil", "South Africa", "China", "Turkey")

p3_data <- energy_2022 |>
  filter(income_group == "Upper-middle income") |>
  arrange(renewables_share_elec) |>
  mutate(
    country_label = if_else(country %in% label_countries, country, NA_character_),
    rank          = row_number()
  )

### |- compute medians for annotations ----
group_medians <- p2_data |>
  group_by(income_group) |>
  summarise(
    median_val = median(renewables_share_elec, na.rm = TRUE),
    .groups = "drop"
  )

global_median <- median(p1_data$renewables_share_elec, na.rm = TRUE)
p3_median <- median(p3_data$renewables_share_elec, na.rm = TRUE)
```


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

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

### |- plot aesthetics ----
colors <- get_theme_colors(
  palette = list(
    "Low income"           = "#8B1A2A",  
    "Lower-middle income"  = "#C0434E",  
    "Upper-middle income"  = "#B08090", 
    "High income"          = "#2E1122",  
    "iqr_band"             = "#D4C7BB",  
    "median_dot_fill"      = "#FFFFFF",  
    "median_dot_stroke"    = "#3D0C1E", 
    "median_label"         = "#3D0C1E",  
    "label_text"           = "gray20",   
    "global_ref"           = "#B29A8B"   
  )
)

### |- titles and caption ----
title_text <- "The Energy Transition Looks Different at Every Scale"

subtitle_text <- "Global distributions mask large differences across income groups—and even wider gaps between\ncountries within the same group (2022)"

caption_text <- create_dcc_caption(
  dcc_year    = 2026,
  dcc_day     = 07,
  source_text = "Our World in Data · Energy Dataset (Ember / Energy Institute)"
)

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

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

weekly_theme <- extend_weekly_theme(
  base_theme,
  theme(
    plot.background = element_rect(fill = colors$palette$bg, color = NA),
    panel.background = element_rect(fill = colors$palette$bg, color = NA),
    panel.grid.major.x = element_line(color = "gray90", linewidth = 0.3),
    panel.grid.major.y = element_blank(),
    panel.grid.minor = element_blank(),
    axis.ticks = element_blank(),
    axis.text = element_text(
      family = fonts$body,
      size   = 9,
      color  = colors$palette$label_text
    ),
    axis.title = element_text(
      family = fonts$body,
      size   = 9.5,
      color  = colors$palette$label_text
    ),
    strip.text = element_blank(),
    panel.spacing = unit(12, "pt"),
    plot.margin = margin(10, 16, 10, 16)
  )
)

theme_set(weekly_theme)
```

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

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

### |- panel 1: global histinterval ----
p1 <- ggplot(p1_data, aes(x = renewables_share_elec, y = 0)) +
  stat_histinterval(
    fill           = colors$palette$global_ref,
    slab_color     = NA,
    alpha          = 0.55,
    point_color    = colors$palette$median_dot_stroke,
    interval_color = colors$palette$iqr_band,
    point_size     = 2.8,
    breaks         = 20
  ) +
  geom_vline(
    xintercept = global_median,
    linetype   = "dashed",
    color      = colors$palette$median_dot_stroke,
    linewidth  = 0.5
  ) +
  annotate(
    "text",
    x      = global_median + 2,
    y      = Inf,
    label  = glue("Median: {round(global_median, 1)}%"),
    hjust  = 0,
    vjust  = 1.4,
    size   = 3,
    family = fonts$body,
    color  = colors$palette$median_label
  ) +
  annotate(
    "text",
    x        = 97,
    y        = Inf,
    label    = "GLOBAL",
    hjust    = 1,
    vjust    = 1.4,
    size     = 3.2,
    fontface = "bold",
    family   = fonts$body,
    color    = colors$palette$label_text
  ) +
  scale_x_continuous(
    limits = c(0, 100),
    breaks = c(0, 25, 50, 75, 100),
    labels = label_percent(scale = 1, suffix = "%"),
    expand = c(0.01, 0)
  ) +
  labs(
    x = "Renewable electricity share (%)",
    y = NULL
  ) +
  theme(
    axis.text.y  = element_blank(),
    axis.title.y = element_blank()
  )

### |- panel 2: by income group — halfeye ----
p2 <- ggplot(p2_data, aes(x = renewables_share_elec, y = fct_rev(income_group))) +
  stat_halfeye(
    aes(
      fill  = income_group,
      alpha = income_group == "Upper-middle income"
    ),
    .width = c(0.5, 0.9),
    point_color = colors$palette$median_dot_stroke,
    point_fill = colors$palette$median_dot_fill,
    interval_color = colors$palette$iqr_band,
    slab_color = NA,
    normalize = "all",
    scale = 0.9
  ) +
  scale_fill_manual(
    values = c(
      "Low income"           = colors$palette$`Low income`,
      "Lower-middle income"  = colors$palette$`Lower-middle income`,
      "Upper-middle income"  = colors$palette$`Upper-middle income`,
      "High income"          = colors$palette$`High income`
    )
  ) +
  scale_alpha_manual(
    values = c("TRUE" = 1, "FALSE" = 0.45),
    guide  = "none"
  ) +
  geom_text(
    data = group_medians,
    aes(
      x = median_val + 3,
      y = fct_rev(income_group),
      label = glue("{round(median_val, 0)}%")
    ),
    hjust = 0,
    size = 2.8,
    family = fonts$body,
    color = colors$palette$median_label,
    inherit.aes = FALSE
  ) +
  annotate(
    "text",
    x        = 95,
    y        = 4.45,
    label    = "BY INCOME GROUP",
    hjust    = 1,
    size     = 3.2,
    fontface = "bold",
    family   = fonts$body,
    color    = colors$palette$label_text
  ) +
  scale_x_continuous(
    limits = c(0, 100),
    breaks = c(0, 25, 50, 75, 100),
    labels = label_percent(scale = 1, suffix = "%"),
    expand = c(0.01, 0)
  ) +
  labs(
    x = "Renewable electricity share (%)",
    y = NULL
  ) +
  guides(fill = "none")

### |- panel 3: upper-middle income — quantile dot plot ----
p3 <- ggplot(p3_data, aes(x = renewables_share_elec, y = 0)) +
  stat_dots(
    fill   = colors$palette$`Upper-middle income`,
    color  = NA,
    alpha  = 0.9,
    size   = 2.4,
    layout = "bin"
  ) +
  geom_vline(
    xintercept = p3_median,
    linetype   = "dashed",
    color      = colors$palette$median_dot_stroke,
    linewidth  = 0.5
  ) +
  annotate(
    "text",
    x      = p3_median + 2,
    y      = 1.18,
    label  = glue("Median: {round(p3_median, 1)}%"),
    hjust  = 0,
    size   = 2.8,
    family = fonts$body,
    color  = colors$palette$median_label
  ) +
  geom_label_repel(
    data = p3_data |> filter(!is.na(country_label)),
    aes(x = renewables_share_elec, y = 0, label = country_label),
    nudge_y = 0.42,
    size = 2.8,
    family = fonts$body,
    color = colors$palette$label_text,
    fill = colors$palette$bg,
    label.size = 0.2,
    label.padding = unit(0.15, "lines"),
    min.segment.length = 0.3,
    segment.color = "gray60",
    inherit.aes = FALSE
  ) +
  annotate(
    "text",
    x        = 95,
    y        = 1.1,
    label    = "UPPER-MIDDLE INCOME",
    hjust    = 1,
    size     = 3.2,
    fontface = "bold",
    family   = fonts$body,
    color    = colors$palette$label_text
  ) +
  scale_x_continuous(
    limits = c(0, 100),
    breaks = c(0, 25, 50, 75, 100),
    labels = label_percent(scale = 1, suffix = "%"),
    expand = c(0.01, 0)
  ) +
  scale_y_continuous(
    limits = c(-0.5, 1.4)
  ) +
  labs(
    x = "Renewable electricity share (%)",
    y = NULL
  ) +
  theme(
    axis.text.y  = element_blank(),
    axis.title.y = element_blank()
  )

### |- combined plots ----
combined_plots <- p1 / p2 / p3 +
  plot_layout(heights = c(1.3, 2.2, 1.3)) +
  plot_annotation(
    title = title_text,
    subtitle = subtitle_text,
    caption = caption_text,
    theme = theme(
      plot.title = element_text(
        family = fonts$title,
        face   = "bold",
        size   = 22,
        color  = colors$palette$label_text,
        margin = margin(b = 6)
      ),
      plot.subtitle = element_text(
        family = fonts$body,
        size   = 11,
        color  = colors$palette$label_text,
        margin = margin(b = 16)
      ),
      plot.caption = element_markdown(
        family = fonts$body,
        size   = 7.5,
        color  = "gray50",
        margin = margin(t = 12),
        hjust = 0,
      ),
      plot.background = element_rect(fill = colors$palette$bg, color = NA),
      plot.margin = margin(20, 20, 12, 20)
    )
  )

```

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

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

### |-  plot image ----  
save_plot_patchwork(
  combined_plots, 
  type = "30daychartchallenge", 
  year = 2026, 
  day = 07, 
  width = 8, 
  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_07.qmd`](https://github.com/poncest/personal-website/blob/master/data_visualizations/TidyTuesday/2026/30dcc_2026_07.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:
   - Our World in Data. (2024). *Energy Dataset*.
     Retrieved April 2026 from https://github.com/owid/energy-data
   - Ember & Energy Institute. (2024). *Yearly Electricity Data*.
     Retrieved April 2026 from https://ember-climate.org/data/data-tools/data-explorer/
   - World Bank. (2024). *World Bank Country and Lending Groups — FY2024 Income Classification*.
     Retrieved April 2026 from https://databank.worldbank.org/data/download/site-content/CLASS.xlsx
:::

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