March 7, 2021

Interactive Covid-19 population immunity estimates

Interactive Covid-19 population immunity estimates

I made a web app that estimates population immunity for SARS-CoV-19. Try it out at covid.mremington.co.

covid.mremington.co

What follows is an overview of how the estimate works. Feel free to skip this post and just explore the site if you're not interested in the behind-the-scenes.

First, a crash course in population immunity:

Why is population immunity important?

  • Normal life may safely return when enough of the population has immunity to Covid-19, limiting further spread. This is known as "herd immunity". [1]
  • Herd immunity may be achieved either through infection and recovery or by vaccination. [2]
  • Besides protecting the individual, the goal of vaccination is for a population to reach herd immunity safely. [2]
  • Herd immunity also protects those who are unable to be vaccinated, such as newborns and immunocompromised people, because the disease spread within the population is very limited. [2]

How much of the population needs immunity?

  • The herd immunity threshold (HIT) is debated among scientists. The commonly accepted herd immunity threshold for SARS-CoV-2 is 60-80%. [3] [1]
  • A research group at the University of Oxford estimates the threshold at 10% to 60% when accounting for T cell immunity studies. [3]
  • Another research group calculates the threshold at 10% to 20% when accounting for diversity in population mixing. Some consider this controversial. [3]
  • Infections, hospitalizations, and related metrics may decline as population immunity rises, even if the HIT is not reached. [1]

References

  1. COVID-19 Vaccines and Herd Immunity ; Harvard Center for Communicable Disease Dynamics
  2. What Is Herd Immunity? | Infectious Diseases | JAMA | JAMA Network
  3. Covid-19: Do many people have pre-existing immunity? | The BMJ

To estimate population immunity we need to know:
1. The number of vaccinated people
2. The number of people who were infected and recovered
3. The overlap between these groups

For vaccinations my code simply pulls the data daily. You can choose that either the first or second dose be counted as immunity.

Determining recovered infections is more tricky. Cases only represent a fraction of known infections, since not all infected people get tested. Luckily Youyang Gu, one of the top Covid-19 modelers, has presented a simple equation for estimating true infections. To use this equation we need the daily percentage of positive tests and the daily number of new cases.

Many who get vaccinated have already been infected. It's impossible to know the exact overlap, but if we don't estimate it then our immunity estimate will be too high. One of the top modelers assumes 50% of vaccinations go to recovered infections. In my web app that is customizable, with a default of 20%. 28% of the US is estimated to have been infected as of March 7, 2021.

I also used SciPy to find the last peak in hospitalizations and report the estimated population immunity at that time. Note that this is not necessarily the HIT, as seasonality and other factors also affect transmission. My model found that US hospitalizations began to decline from their all-time peak after January 12, 2021 when the estimated population immunity was 22.7%.

Putting it all together, here is the complete web app, covid.mremington.co, as of March 7th, 2021:

covid.mremington.co

The source code is available here.

Lastly, I was greatly inspired by Youyang Gu of covid19-projections.com, who built a similar model to estimate immunity.

References

COVID-19 Vaccines and Herd Immunity
By Marc Lipsitch How many people in a population will need to get a COVID-19 vaccine before herd immunity is achieved? This question has been all over the news lately, with speculations of 70%, 80%…
Patient Information: What Is Herd Immunity?
This JAMA Patient Page describes what herd immunity is, how it limits disease spread, and how it is achieved in a population either by vaccination or by infection and recovery from a disease.
Covid-19: Do many people have pre-existing immunity?
It seemed a truth universally acknowledged that the human population had no pre-existing immunity to SARS-CoV-2, but is that actually the case? Peter Doshi explores the emerging research on immunological responses Even in local areas that have experienced some of the greatest rises in excess deaths…
Estimating True Infections - Revisited
We use artificial intelligence to accurately forecast infections, deaths, and recovery timelines of the COVID-19 / coronavirus pandemic in the US and globally
Path to Herd Immunity - COVID-19 Vaccine Projections
We use artificial intelligence to accurately forecast infections, deaths, and recovery timelines of the COVID-19 / coronavirus pandemic in the US and globally