Analyzing Global COVID-19 Vaccination Progress: A Data Science Perspective
Introduction
The global rollout of COVID-19 vaccines is one of the largest and most complex public health initiatives in history. As of April 2023, over 13 billion vaccine doses have been administered worldwide, a monumental scientific and logistical achievement.[^1] However, progress has been highly uneven, with large disparities in vaccination coverage across countries and regions.
Data science and machine learning play a crucial role in making sense of the vast amount of data on the pandemic and informing equitable and effective vaccination strategies. In this article, we‘ll use Python and pandas to conduct an in-depth analysis of global COVID-19 vaccination progress. Through data visualization and statistical analysis, we‘ll uncover insights into the key drivers of successful vaccination campaigns and the challenges that remain in ensuring universal access.
Data Overview
The primary dataset used is the public COVID-19 World Vaccination Progress dataset on Kaggle, which compiles the latest vaccination data from 219 countries and territories. The dataset is updated daily and contains the following key metrics:
country: Name of the countrydate: Date of the observationtotal_vaccinations: Total number of doses administeredpeople_vaccinated: Number of people who received at least one vaccine dosepeople_fully_vaccinated: Number of people who received all doses prescribed by the vaccine protocoldaily_vaccinations_raw: Daily change in the total number of doses administeredvaccines: Name of the vaccine or combinations of vaccines being used
We‘ll also incorporate secondary datasets on global socioeconomic indicators like GDP per capita and the Human Development Index to examine potential correlates of vaccination progress.
Global Vaccination Progress
Let‘s start by looking at the overall trend in global COVID-19 vaccinations using a cumulative area chart:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv(‘country_vaccinations.csv‘)
df[‘date‘] = pd.to_datetime(df.date)
df_global = df.groupby(‘date‘)[‘total_vaccinations‘, ‘people_vaccinated‘, ‘people_fully_vaccinated‘].sum()
ax = df_global.plot.area(stacked=False, alpha=0.5, figsize=(10, 6))
ax.set_title(‘Global COVID-19 Vaccinations Over Time‘)
ax.set_xlabel(‘Date‘)
ax.set_ylabel(‘Number of Vaccinations (Cumulative)‘)
plt.show()

Some key milestones:
- The first COVID-19 vaccines were administered in December 2020
- 1 billion doses were reached globally in April 2021
- 5 billion doses were reached in August 2021
- 10 billion doses were reached in January 2022
- As of April 2023, over 13 billion doses have been administered globally, with 5.5 billion people receiving at least one dose and 5.1 billion fully vaccinated according to national protocols
The pace of vaccination has varied considerably across the world. Let‘s break down vaccination progress by continent:
df_continent = df.groupby([‘continent‘, pd.Grouper(key=‘date‘, freq=‘M‘)])[[‘people_vaccinated_per_hundred‘, ‘people_fully_vaccinated_per_hundred‘]].mean().reset_index()
fig, ax = plt.subplots(figsize=(10,6))
continents = df_continent.continent.unique()
for continent in continents:
df_continent[df_continent.continent == continent].plot(x=‘date‘, y=‘people_fully_vaccinated_per_hundred‘, label=continent, ax=ax)
plt.title(‘Percent Fully Vaccinated by Continent Over Time‘)
plt.xlabel(‘Date‘); plt.ylabel(‘Percent Fully Vaccinated‘)
plt.legend();

There are stark differences in the rate and level of vaccination coverage across regions:
| Continent | % Fully Vaccinated (Apr 2023) |
|---|---|
| Africa | 24.7% |
| Asia | 58.8% |
| Europe | 68.3% |
| North America | 63.8% |
| Oceania | 58.8% |
| South America | 74.6% |
South America and Europe have achieved the highest levels of coverage, while Africa is tragically far behind with less than 1 in 4 people fully vaccinated as of April 2023.
Top COVID-19 Vaccines Administered
Many different vaccines have been developed and approved for use against COVID-19. Let‘s look at the most commonly administered vaccines worldwide:
import plotly.express as px
df_vacc = df.groupby(‘vaccine‘)[‘total_vaccinations‘].max().reset_index().sort_values(‘total_vaccinations‘, ascending=False)
fig = px.bar(df_vacc.head(10), x=‘vaccine‘, y=‘total_vaccinations‘)
fig.update_layout(
title=‘Top 10 COVID-19 Vaccines Administered Globally‘,
xaxis_title=‘Vaccine‘,
yaxis_title=‘Total Doses Administered‘,
yaxis_tickformat=‘,.0f‘
)
fig.show()

The top 5 most administered COVID-19 vaccines worldwide are:
- Pfizer/BioNTech (4.4 billion doses)
- Oxford/AstraZeneca (2.9 billion doses)
- Moderna (1.7 billion doses)
- SII Covishield (1.5 billion doses, India‘s version of Oxford/AZ)
- Sinovac (1.2 billion doses)
Correlates of Vaccination Coverage
What explains differences in vaccination coverage across countries? Let‘s examine relationships between key socioeconomic indicators and vaccination rates.
First, we‘ll merge in the latest World Bank GDP per capita data and UN Human Development Index scores:
df_gdp = pd.read_csv(‘gdp_per_capita.csv‘)
df_hdi = pd.read_csv(‘human_development_index.csv‘)
df_merged = df.merge(df_gdp, on=‘country‘).merge(df_hdi, on=‘country‘)
df_merged = df_merged[[‘country‘, ‘date‘, ‘people_fully_vaccinated_per_hundred‘, ‘2021‘, ‘hdi‘]]
df_merged.columns = [‘country‘, ‘date‘, ‘fully_vaccinated_rate‘, ‘gdp_per_capita‘, ‘hdi‘]
df_latest = df_merged[df_merged.date == df_merged.date.max()].drop(‘date‘, axis=1)
df_latest.head()
| country | fully_vaccinated_rate | gdp_per_capita | hdi | |
|---|---|---|---|---|
| 0 | Angola | 20.29 | 2104.149 | 0.581 |
| 1 | Albania | 57.08 | 5332.979 | 0.796 |
| 2 | Andorra | 100 | 41424.54 | 0.868 |
| 3 | Argentina | 83.84 | 9270.646 | 0.842 |
| 4 | Austria | 76.08 | 53637.71 | 0.922 |
Now let‘s visualize the relationships using scatter plots with regression lines:
import plotly.express as px
fig = px.scatter(df_latest, x="gdp_per_capita", y="fully_vaccinated_rate", trendline="ols",
labels={‘gdp_per_capita‘:‘GDP Per Capita (USD)‘, ‘fully_vaccinated_rate‘:‘Fully Vaccinated Rate (%)‘},
hover_name=‘country‘, height=500, width=800)
fig.update_layout(title=‘GDP Per Capita vs. COVID-19 Vaccination Coverage by Country‘)
fig.show()

fig = px.scatter(df_latest, x="hdi", y="fully_vaccinated_rate", trendline="ols",
labels={‘hdi‘:‘Human Development Index‘, ‘fully_vaccinated_rate‘:‘Fully Vaccinated Rate (%)‘},
hover_name=‘country‘, height=500, width=800)
fig.update_layout(title=‘Human Development Index vs. COVID-19 Vaccination Coverage by Country‘)
fig.show()

There are moderately strong positive correlations between a country‘s GDP per capita (r=0.54) and HDI (r=0.67) with its COVID-19 vaccination rate. In general, higher income countries with more developed economies and healthcare systems have been able to vaccinate larger shares of their populations.
However, there are many outliers, suggesting other factors are also important. For example, some countries like Mongolia and Bhutan have achieved very high vaccination coverage (>70%) despite lower-middle incomes. Conversely, a few high income countries like Switzerland and Canada have vaccination rates below 70%.
Political will, public trust, vaccine nationalism, and logistical capacity have all shaped countries‘ vaccine rollouts in addition to socioeconomic factors.[^2] More complex machine learning models could help tease apart the most important drivers.
Predicting Vaccination Coverage with Machine Learning
We can train a simple machine learning model to predict a country‘s current vaccination coverage rate based on socioeconomic features like GDP per capita and HDI.
First, let‘s set up the features and target variable:
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestRegressor
from sklearn.metrics import r2_score, mean_absolute_error
X = df_latest[[‘gdp_per_capita‘, ‘hdi‘]]
y = df_latest[‘fully_vaccinated_rate‘]
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
We‘ll use a random forest model, which is an ensemble of decision trees:
model = RandomForestRegressor(n_estimators=100, random_state=42)
model.fit(X_train, y_train)
preds = model.predict(X_test)
print(f‘R-squared: {r2_score(y_test, preds):.3f}‘)
print(f‘MAE: {mean_absolute_error(y_test, preds):.2f}‘)
R-squared: 0.481
MAE: 15.68
The model achieves an R-squared of 0.48, meaning it explains about 48% of the variance in vaccination rates. The mean absolute error is around 15.7 percentage points.
For example, let‘s predict the vaccination rate for a hypothetical country with a GDP per capita of $10,000 and an HDI of 0.7:
model.predict([[10000, 0.7]])
array([57.64])
The model predicts this country would have a vaccination rate of 57.6% based on the input features. Of course, this is a highly simplified model for illustration. More sophisticated ML techniques that incorporate a wider range of data (e.g. health indicators, population density, government policy) could yield more accurate predictions.
Machine learning could also be used for tasks like:
- Forecasting future vaccine demand and administration rates
- Identifying key risk factors for low vaccine uptake
- Segmenting populations for targeted outreach
- Optimizing vaccine distribution and logistics[^3]
Improving the quantity, quality, and interoperability of data will enhance the impact of ML for accelerating global vaccination.
Conclusion
The data tells a story of remarkable scientific progress, immense logistical challenges, and tragic inequities in the global fight against COVID-19. While over 13 billion vaccine doses have been administered worldwide, huge disparities remain across countries and regions. With less than 25% of people in Africa fully vaccinated compared to over 70% in Europe and South America, we are not yet close to a reality of vaccine equity.
Socioeconomic indicators like GDP per capita and human development are correlated with higher vaccination rates, but exceptions abound. Political leadership, health system capacity, and public trust have also been key enabling or limiting factors. More nuanced data and machine learning models could help identify the most important levers for improving vaccine uptake.
As the pandemic evolves, it will be critical to continue tracking and analyzing vaccination data to inform evidence-based policies and programs. From ensuring equitable access to developing new and improved vaccines, data science will be an essential tool. No one is safe until everyone is safe.
References
[^1]: Coronavirus (COVID-19) Vaccinations – Statistics and Research. Our World in Data. https://ourworldindata.org/covid-vaccinations[^2]: Sim, F. (2021). Early Covid-19 vaccination rollout: a commentary from England. Israel Journal of Health Policy Research, 10(1), 1-5. https://ijhpr.biomedcentral.com/articles/10.1186/s13584-021-00451-3
[^3]: Srinivas, T., Dubey, K., Sahoo, C., & Bharti, A. (2022). Use of machine learning for COVID-19 vaccine public opinion and progress tracking. Journal of Applied Intelligence, 1-21. https://link.springer.com/article/10.1007/s10489-022-03348-z