Skip to content

An attempt to better understand the statistical modeling of pandemics using a basic SIR model.

Notifications You must be signed in to change notification settings

Pythonista7/SIR-Modeling-Covid-in-Bangalore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SIR-Modeling-Covid-in-Bangalore

Flattening the curve ? Infection is peaking ? Have you wondered what that actually means ?

This notebook is an attempt to simplify and help understand how to model a pandemic using S.I.R Model(Suseptible,Infected,Recovered).The predicted statistics from the notebook maybe inaccurate with real life observations but the intention of this notebook is to convey how avaiable data can be used for the purpose.

What is happening here ?

  1. Data clean-up and extrapolation
    Firstly covid data from late April/early May was collect from a BBMP source which had labeled each ward in Bengaluru with color-coding to indicate sevirity of the the outbreak(this can be found in BBMP.csv). This data coupled with census data of Bengaluru is used to factor in attributes such as population and area size of each ward which maybe a potential factor in the spread of the disease.

  2. SIR Modeling
    Both these data are combined and used to model the pandemic using the SIR technique.The data presented in all the graphs is for a set time frame of 90 or 120 days(can be changed for any time-period in the code) and day 0 can be thought of as first day an infection was recorded in the ward, for simplicity can be assumed as May 1st 2020.

  3. Plotting using KeplerGL
    Once we have the data for a time period we plot and visualize it with line plots for each ward , its infection rate and recovery rate.We also plot this data onto the map of Bengaluru with the help of the shapefine (BBMP.GeoJSON) coupled with kepler-gl a powerful geo-visualization tool from uber you can check it out here.

If you do not wish to download and run this notebook but want to view the results you can find the SIR curve plots here and the geo-plot of Bengaluru map here (be sure to view the last few cells of this notebook to use the kepler map for visualization.)

Requriments

  • pandas
  • numpy
  • geopandas
  • keplergl
  • plotly

About

An attempt to better understand the statistical modeling of pandemics using a basic SIR model.

Topics

Resources

Stars

Watchers

Forks