Quote

“Most of us need to listen to the music to understand how beautiful it is. But often that’s how we present statistics: we just show the notes, we don’t play the music.”

— Hans Rosling

What is wrong with these graphs?

Outline of the presentation

  • Personal introduction

  • Data pipeline

  • Data visualization

    • Research question
    • Building the chart step by step
    • Key insights & further examples
  • Q&A

Jonas Weber

Yann Rochaix

Context of the project

The path to clear visualization

  • Research question: Does higher healthcare spending lead to better health outcomes?
    • Healthcare spending (PPP-adjusted, USD, per capita)
    • Life expectancy at birth as a proxy for health outcomes
  • Hypothesis: more spending → longer lives, but likely with diminishing returns

We want to avoid this

Data visualization - layers

  • Data: Start with your raw data (World Bank, OECD).
  • Aesthetics: Map variables to type of chart.
  • Geometries: Choose shapes (points, bars, lines).
  • Facets: Split data into subplots (e.g. by income group).
  • Statistics: Add statistical models.
  • Coordinates: Adjust the coordinate system or zoom.
  • Theme: Final styling (fonts, colors, title).

Step 1.1 — Data

head(df_final)
# A tibble: 6 × 9
  country  year income     country_name ind_WorldBank_health_gdp
  <chr>   <int> <fct>      <chr>                           <dbl>
1 AFG      2008 Low income Afghanistan                     10.3 
2 AFG      2009 Low income Afghanistan                      9.82
3 AFG      2010 Low income Afghanistan                      8.57
4 AFG      2007 Low income Afghanistan                      9.90
5 AFG      2005 Low income Afghanistan                      9.95
6 AFG      2006 Low income Afghanistan                     10.6 
# ℹ 4 more variables: ind_WorldBank_health_usd <dbl>,
#   ind_WorldBank_health_pp <dbl>, ind_WorldBank_lifeexpectancy <dbl>,
#   health_status_oecd <dbl>
tail(df_final)
# A tibble: 6 × 9
  country  year income              country_name ind_WorldBank_health_gdp
  <chr>   <int> <fct>               <chr>                           <dbl>
1 ZWE      2019 Lower middle income Zimbabwe                         3.23
2 ZWE      2020 Lower middle income Zimbabwe                         2.95
3 ZWE      2021 Lower middle income Zimbabwe                         2.67
4 ZWE      2022 Lower middle income Zimbabwe                         3.40
5 ZWE      2023 Lower middle income Zimbabwe                         2.93
6 ZWE      2024 Lower middle income Zimbabwe                        NA   
# ℹ 4 more variables: ind_WorldBank_health_usd <dbl>,
#   ind_WorldBank_health_pp <dbl>, ind_WorldBank_lifeexpectancy <dbl>,
#   health_status_oecd <dbl>

Step 1.2 - Filtering data for 2022

Show R Code
set.seed(42)
df_final %>%
  filter(year == 2022) %>%
  select(Country = country_name, Income = income, `Health PPP` = ind_WorldBank_health_pp, `Life Exp.` = ind_WorldBank_lifeexpectancy) %>%
  mutate(`Health PPP` = round(`Health PPP`, 0), `Life Exp.` = round(`Life Exp.`, 1)) %>%
  slice_sample(n = 10) %>% 
  kable()
Country Income Health PPP Life Exp.
Cuba Upper middle income 3174 77.6
Faroe Islands High income NA 82.8
Paraguay Upper middle income 1265 72.3
Ghana Lower middle income 265 65.2
Northern Mariana Islands High income NA 78.5
Mali Low income 96 60.0
Zimbabwe Lower middle income 119 62.4
Micronesia, Fed. Sts. Lower middle income 456 67.0
Cote d’Ivoire Lower middle income 247 61.6
Bolivia Lower middle income 743 67.4

Step 2.1 - Aesthetics

Step 2.2 — Aesthetics

Step 3.1 - Geometries

Step 3.2 - Variation

Step 4 - Facets

Step 5 — Statistics

Step 6.1 — Coordinates

Step 6.2 — Coordinates

Step 7.1 — Theme

Step 7.2 — So-what headline

See the bigger picture

Standardize at year 2000

Has health quality improved?

Q&A