Project Topic: Out-of-pocket expenditure (OOP) per capita in US$

This project visualizes the expenditure of household out-of-pocket payments (relative to government, external or other private domestic sources) from 2000 to 2023 in differnet countries.

Data Sources

Indicator Details. Who.int. Published 2026. Accessed August 22, 2026. https://www.who.int/data/gho/data/indicators/indicator-details/GHO/out-of-pocket-expenditure-(oop)-per-capita-in-us

These data are collected by WHO using International Classification of Health Accounts International Classification of Health Accounts.

Description of the Data

Time: 2000 - 2023 Geographical location: Countries in different continents Appears in: Health expenditure/ health financing Characteristics captured by the data: Out-of-pocket spending (USD), Year, Location(Country name), Parent Location, Value, Modified date Rows and Columns: 4585 rows, 34 columns

Figure 1

For my first figure, I will create a line chart that plots out-of-pocket spending in US, Canada, Mexico by year (2000-2023): X-variable (year), Y-variable (Out-of pocket spending). I will create a 3-column tibble with these data.

In the code chunk below, show your work filtering the data and create the subset of data you will display graphically.

fig_dat1<-dat_oop %>% select(Location, Period, Value) %>% filter(Location %in% c("Mexico", "Canada", "United States of America"))
ggplot(data = fig_dat1, aes(x=Period,y= Value, color =Location)) +
    geom_line() +
    labs(y="OOP per capita in US$",  
         title="Out-of-pocket spending in US, Canada, Mexico in 2000-2023")

Figure 2

For my second figure, I will create an interactive bar chart of spending in US, Canada, Mexico facet by year (2000, 2005, 2010, 2015): X-variable (country), Y-variable (Out-of pocket spending). I will create a 3-column tibble with these data.

fig_dat2 <-dat_oop %>% select(Location, Period, Value) %>% 
    filter(Location %in% c("Mexico", "Canada", "United States of America")) %>% 
    filter(Period %in% c("2000", "2005","2010","2015")) %>% 
    mutate(Location = recode(Location, 
                           "Mexico" = "Mexico", 
                           "Canada" = "Canada", 
                           "United States of America" = "US"))
plot2 <- ggplot(data = fig_dat2, aes(x=Location,y= Value, fill= Location)) +
    geom_col() +
    facet_wrap(~ Period) + 
    labs(y="OOP per capita in US$",  
         title="Out-of-pocket spending in US, Canada, Mexico by year (2000, 2005, 2010, 2015)")+
    theme(plot.title = element_text(size = 11))

ggplotly(plot2)

Figure 3

For my third figure, I will create an interactiv line chart of spending in all locations in South-East Asia by year (2000-2023): X-variable (year), Y-variable (Out-of pocket spending). I will create a 3-column tibble with these data.

fig_dat3<-dat_oop %>% filter(ParentLocation =="South-East Asia") %>%
    select(Location, Period, Value) 
plot3 <- ggplot(data = fig_dat3, aes(x=Period,y= Value, color =Location)) +
    geom_line() +
    labs(y="OOP per capita in US$",  
         title="Out-of-pocket spending in South-East Asian Locations in 2000-2023")

ggplotly(plot3)

Figure 4

For my 4th figure, I will create a boxplot of spending by parent locations in 2020: X-variable (parent location), Y-variable (Out-of pocket spending). I will create a 3-column tibble with these data.

fig_dat4<-dat_oop %>% filter(Period =="2020") %>% 
    select(ParentLocation,Location, Value) 
ggplot(data = fig_dat4, aes(x=ParentLocation,y= Value, fill=ParentLocation)) +
    geom_boxplot() +
    labs(y="OOP per capita in US$",
         x="",
         title="Out-of-pocket spending across 6 parent locations in 2020")+
    theme_minimal()+ 
    theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "none")

Figure 5

For my 5th figure, I will create a violin chart of spending in all countries by year (2000, 2005, 2010, 2015): X-variable (year), Y-variable (Out-of pocket spending). I will create a 3-column tibble with these data.

fig_dat5<-dat_oop %>% filter(Period %in% c("2000", "2005","2010","2015")) %>%
    select(Location, Period, Value) 
ggplot(data = fig_dat5, aes(x=factor(Period),y= Value, fill=factor(Period))) +
    geom_violin() +
    labs(y="OOP per capita in US$",  
         x="",
         title="Out-of-pocket spending in all countries by year (2000, 2005, 2010, 2015)")+
    theme(legend.position = "none")

Figure 6

For my 6th figure, I will create a bar chart of Countries with the highest Out-of-pocket spending in 2020: X-variable (location), Y-variable (Out-of pocket spending). I will create a 2-column tibble with these data.

fig_dat6<-dat_oop %>% filter(Period == "2020")%>%
    select(Location, Value) %>% slice_max(Value, n = 5) %>%
    mutate(Location = fct_reorder(Location, Value))
ggplot(data = fig_dat6, aes(x=Location,y= Value, fill=Location)) +
    geom_bar(stat="identity", alpha=.6, width=.4) +
    coord_flip()+
    labs(y="OOP per capita in US$",  x="",
         title="Countries with the highest Out-of-pocket spending in 2020") +
    theme(legend.position = "none")

Figure 7

For my 7th figure, I will create a bar chart of Countries with the lowest Out-of-pocket spending in 2020: X-variable (location), Y-variable (Out-of pocket spending). I will create a 2-column tibble with these data.

fig_dat7<-dat_oop %>% filter(Period == "2020")%>%
    select(Location, Value) %>% slice_min(Value, n = 5) %>%
    mutate(Location = fct_reorder(Location, desc(Value)))
ggplot(data = fig_dat7, aes(x=Location,y= Value, fill=Location)) +
    geom_bar(stat="identity", width=.4) +
    coord_flip()+
    labs(y="OOP per capita in US$",  x="",
         title="Countries with the lowest Out-of-pocket spending in 2020") +
    theme(legend.position = "none")

Figure 8

For my 8th figure, I will create an a bar chart indicating portion of OOP spending >=200 USD per capita among parent locations in 2020: X-variable (parent location), Y-variable (Portion). I will create a 5-column tibble with these data.

fig_dat8<-dat_oop %>% filter(Period == "2020")%>%
    select(ParentLocation, Location, Period, Value) %>%
    mutate(OOPSpending = ifelse(Value >= 200, ">= 200", "< 200")) 
ggplot(data = fig_dat8, aes(x=ParentLocation, fill = OOPSpending)) +
    geom_bar(position = "fill") +
    labs(y= "Portion of Countries with OOP >=200 USD", x="",
         title="Out-of-pocket spending across parent locations in 2020")+
    theme(axis.text.x = element_text(angle = 45, hjust = 1))