There are numerous indicators published by the World Bank which deal with topics varying from agriculture to urban development. This is a quick lesson on how to use their open datasets to download and compare metrics of choice between two countries. In this document, I will be comparing the hospital bed density between the United States and India.
The quality of healthcare varies immensely from one country to another.
Subjective experiences are difficult to incorporate into standardized metrics. Someone from a lower socioeconomic status in a developing country may find it more difficult to access healthcare than someone occupying a higher socioecomic rung.
To avoid these problems, the World Bank uses hospital beds as a useful proxy of access to care. They act as a quantifiable measure, an indicator of health resources that the population can fall back on during times of illness.
The World Bank inpatient beds available in public, private, general and specialized hospitals and rehabilitation centers. Beds for both acute and chronic care are included.
This data is provided as a ratio, as number of beds per 1000 persons.
Let’s get started.
library(tidyverse)
library(wbstats)
library(knitr)
We will be using the wb() function from the wbstats package to download data from the World Bank API. I have covered this function in my previous post comparing life expectancies around the world.
dat <- (wb(country = "all", indicator = "SH.MED.BEDS.ZS", mrv = 50))
#"SH.MED.BEDS.ZS" is the World Bank indicator code that holds the beds per 1000 values.
#mrv = 50 indicates that we want the 50 most recent values.
We will use dplyr pipes to filter for India and the US, and build a base plot.
dat_plot <- dat %>% filter( iso3c %in% c("IND", "USA")) %>%
select(Country = iso3c, Year = date, Beds_Per_1000 = value ) %>%
ggplot()
Let us add a scatterplot with jitter to this map to represent the number of hospital beds available for 1000 persons for both countries. I’ve chosen to label the X axis at 5-year intervals.
dat_plot + geom_jitter(aes( x = Year, y = Beds_Per_1000, color = Country)) +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
ylab("Beds Per 1000") +
ggtitle("Hospital Bed Density — \n India and the US") +
scale_x_discrete(breaks=seq(1970, 2013, by = 5)) + scale_color_brewer(palette="Dark2")
The decline in the hospital bed density in the US: Is this fall in the number of beds concerning? The US population is predicted to reach 404 million by 2060. The decline in the ratio could indicate a lack of access to health resources for this burgeoning population. On the other hand, this drop could be cause to celebrate. It could reflect improved hospital care, with people staying for shorter durations. Check out page 346 of this CDC publication that provides average duration of stay in hospitals
The disparity in the bed density between India and the US: While the World Bank does not provide global norms for this indicator, one would expect that in a country as populous as India, the large denominator reduces the value of this ratio greatly.
The frequency of reporting: The data from India is not reported as regularly as the American data. To achieve a more granular understanding of healthcare resources in place, countries should make efforts to share data in a timely fashion.
We do not really have a good idea of what an ideal hospital density is. A density of 2 might be great for one country, but very inadequate for another. Another interesting thing I learned about today was Roemer’s Law, which states that hospital beds that are built tend to be used— the study found statistically significant relationships betwee hospitalization rates and availabilty of hospital beds.