Simple modeling of “flattening the curve” and “lifting lockdown”

A simple Python script of a fundamental epidemiological model for demonstrating the impact of social distancing and what happens if the lockdown is lifted too quickly.

Tirthajyoti Sarkar
Towards Data Science
10 min readApr 17, 2020

--

Image: (Author-produced with Pixabay free image and programming)

Note from the editors: Towards Data Science is a Medium publication primarily based on the study of data science and machine learning. We are not health professionals or epidemiologists, and the opinions of this article should not be interpreted as professional advice. To learn more about the coronavirus pandemic, you can click here.

Introduction

COVID-19 — the greatest global crisis since World War II and the largest global pandemic since the 1918–19 Spanish Flu is upon us today. Everybody is looking at the daily rise of the death toll and the rapid, exponential spread of this novel strain of the virus.

Data scientists, like so many people from all other walks of life, may also be feeling anxious. They may also be eager to see if they can contribute somehow to the fight against this highly infectious pathogen.

Source: Pixabay (Free for commercial use)

There can be many avenues for data scientists and statistical modeling professionals to contribute to the cause. In almost all cases, they should be working closely with domain experts — virologists, healthcare professionals, epidemiologists. Without such active collaboration and teamwork, it is dangerous and meaningless to embark on a project of predictive modeling or forecasting the spread of the disease and mitigation efforts.

As the widely popular data modeling website Five-Thirty-Eight argues, it is freaking hard to make an accurate COVID-19 model.

However, even without venturing into actual predictive modeling, it is possible to demonstrate…

--

--

Sr. Director of AI/ML platform | Stories on Artificial Intelligence, Data Science, and ML | Speaker, Open-source contributor, Author of multiple DS books