Global COVID-19 Trends and Policy Impact Analysis

— a Data-Driven Look at Seven Countries

Overview

During the COVID-19 pandemic, governments rolled out lockdowns, curfews, and mobility restrictions with vastly different timing and intensity. Some countries clamped down hard and early; others held back. The result was a global natural experiment in non-pharmaceutical interventions.

In this project I built a longitudinal dataset that fuses three independent public sources — JHU CSSE (cases and deaths), OWID (vaccinations), and OxCGRT (the Stringency Index of government response) — across seven countries, and asked three questions:

  1. Does stricter policy actually translate into fewer cases?
  2. How quickly does the effect of a policy show up?
  3. How big is the vaccination effect on mortality, independent of policy?

Code, modular pipeline, and a fully reproducible notebook on GitHub: github.com/mraknar/covid-19-policy-analysis


The Problem

Comparing pandemic responses across countries is harder than it looks:

  1. Different reporting standards. Sweden, Turkey, and Brazil count cases differently; weekly reporting cycles introduce day-of-week noise.
  2. Different timelines. New Zealand's first wave was months later than Italy's; comparing dates 1:1 is meaningless.
  3. Different policies, different timing, different compliance. A "lockdown" in March 2020 is not the same intervention as a "lockdown" in October 2021.
  4. Confounding. Vaccinations rolled out alongside policy changes, so naive correlations between stringency and outcomes mix two effects.

To address these, I standardise everything on a single panel keyed by (Country_ISO3, Date), smooth daily noise with 7-day rolling averages, and explicitly separate three signals: epidemiology (cases / deaths), policy (Stringency Index), and biology (vaccination coverage).


Countries

I picked seven countries that span the policy spectrum:

CountryStrategy archetype
United StatesFederalised, highly variable by state
United KingdomLate but eventually strict national lockdowns
SwedenFamously light-touch — high transparency, low coercion
New ZealandHard, early elimination strategy
GermanyStepped, evidence-based national measures
TurkeyTargeted measures (e.g. weekend curfews)
BrazilInconsistent across federal vs state level

This diversity is the whole point — if all seven looked the same, there would be nothing to compare.


Data Pipeline

The pipeline is split into three modules:

data_loader.py

Downloads the four CSVs (JHU cases, JHU deaths, OWID vaccinations, OxCGRT policy) directly from their canonical GitHub mirrors. No manual steps. No Kaggle downloads. The whole thing runs in a fresh environment.

preprocessor.py

This is where most of the actual work happens:

  • Wide → long transformation for JHU (the JHU files put each date in its own column, which is hostile to time-series analysis)
  • Country-name standardisation to ISO-3 codes — every dataset spells "Turkey" / "Türkiye" / "Turkiye" differently and at least one of them spells "United States" three different ways
  • Three-way merge on (Country_ISO3, Date)
  • Feature engineering:
    • Daily new cases / deaths via cumulative differencing (clipped at zero to absorb retroactive data corrections)
    • 7-day rolling averages (the only honest way to read pandemic time series)
    • Per-million normalisation using a 2022 population estimate
    • Case Fatality Rate (CFR)

visualizer.py

A handful of plot_* functions: dual-axis policy/case plots, vaccination-vs-mortality scatters, lag-correlation heatmaps, an event-study utility, and cross-country comparison plots — all configured with consistent academic styling, country colour palettes, and high-DPI output.


What the Data Shows

1) The correlation matrix

The contemporaneous (no-lag) correlation matrix tells the first part of the story:

  • New cases ↔ new deaths: strongly positive, as expected.
  • Stringency ↔ new cases: weak in the short term — strict policy today does not mean fewer cases today.
  • Vaccination rate ↔ deaths: clearly negative — and this stays robust across countries.

That last result is the key insight: vaccination correlates much more strongly with mortality reduction than with case-count reduction. Vaccination protects against severe outcomes, not necessarily against catching the virus.

2) Policy and cases: the dual-axis plot

For each country, I plot 7-day average new cases (left axis) against the Stringency Index (right axis). Turkey is a particularly clean example:

  • Early 2020: high stringency → suppressed case growth.
  • Mid-2020: relaxation → renewed surge.
  • Early 2021: re-tightening → another suppression.

This visual storytelling does something a regression coefficient can't: it shows which periods the relationship held, and where it broke.

3) Lag-correlation: how delayed is the effect?

I correlated the Stringency Index with future case counts at lags from 0 to 30 days. The pattern is country-dependent:

  • Some countries show a peak negative correlation around day 10–14 (consistent with incubation + reporting lag).
  • Others show essentially no relationship — consistent with low compliance or with policy that was already too late by the time it was passed.
  • A few even show positive lag correlations, which sounds like a paradox but isn't: it reflects governments raising stringency in response to surges, not in advance of them. Reverse causation, not policy failure.

This is a textbook reminder: observational policy data is full of reverse-causation traps. You can't read a stringency-vs-cases correlation as "policy worked / didn't work" without thinking carefully about timing.

4) Event study — Turkey's April 2020 weekend curfew

To get closer to a causal read, I narrowed the lens. On 11 April 2020, Turkey introduced its weekend-only curfew. I plotted the case trajectory in a 45-day window centred on that date. The post-curfew trend bends down within ~2 weeks, consistent with the literature on early targeted restrictions.

It's not a randomised experiment — but it's a clean visualisation of an intervention against its own baseline.

5) Cross-country comparison

Plotting average stringency against deaths-per-million across all seven countries, I get a positive overall trend (more stringent → more deaths) — which sounds backwards until you remember that stringency followed surges, not led them. Countries that had to clamp down hardest were the ones already in trouble.

The actual story is in the residuals: countries with similar stringency levels still ended up with very different outcomes. Vaccination roll-out speed, healthcare capacity, and population compliance explain the spread.


Resources


You can view and download my poster PDF file below.

This project was developed for the Data Science course at Ankara Yıldırım Beyazıt University

More Reading

Post navigation