Awesome Open Source
Awesome Open Source
CovsirPhy: COVID-19 analysis with phase-dependent SIRs

PyPI version Downloads PyPI - Python Version Build Status GitHub license Maintainability Test Coverage Open Source Helpers

CovsirPhy introduction

Documentation | Installation | Quickest usage | API reference | GitHub | Qiita (Japanese)

CovsirPhy is a Python library for COVID-19 (Coronavirus disease 2019) data analysis with phase-dependent SIR-derived ODE models. We can download datasets and analyze them easily. Scenario analysis with CovsirPhy enables us to make data-informed decisions.



  • Monitor the spread of COVID-19
  • Keep track parameter values/reproduction number in each country/province
  • Find the relationship of reproductive number and measures taken by each country

If you have ideas or need new functionalities, please join this project. Any suggestions with Github Issues are always welcomed. Questions are also great. Please read Guideline of contribution in advance.


The latest stable version of CovsirPhy is available at PyPI (The Python Package Index): covsirphy and supports Python 3.7.12 or newer versions. Details are explained in Documentation: Installation.

pip install --upgrade covsirphy


Quickest tour of CovsirPhy is here. The following codes analyze the records in Japan, but we can change the country name when creating Scenario class instance for your own analysis.

import covsirphy as cs
# Download and update datasets
loader = cs.DataLoader("input")
data_dict = loader.collect()
# Select country name and register the data
snl = cs.Scenario(country="Japan")
# Check records
# S-R trend analysis
# Parameter estimation of SIR-F model
# History of reproduction number
# History of parameters
# Baseline
# Forecasting
snl.rename(old="Multivariate_regression_Likely", new="Likely")
# Compare scenarios
# Summary
# Simulation

Further information:

Release notes

Release notes are here. Titles & links of issues are listed with acknowledgement.

We can see the release plan for the next stable version in milestone page of the GitHub repository. If you find a highly urgent matter, please let us know via issue page.


Please support this project as a developer (or a backer). Become a backer


CovsirPhy library is developed by a community of volunteers. Please see the full list here.

This project started in Kaggle platform. Lisphilar published Kaggle Notebook: COVID-19 data with SIR model on 12Feb2020 and developed it, discussing with Kaggle community. On 07May2020, "covid19-sir" repository was created. On 10May2020, covsirphy version 1.0.0 was published in GitHub. First release in PyPI (version 2.3.0) was on 28Jun2020.

License: Apache License 2.0

Please refer to LICENSE file.


We have no original papers the author and contributors wrote, but please cite this library as follows with version number (import covsirphy as cs; cs.__version__).

CovsirPhy Development Team (2020-2022), CovsirPhy version [version number]: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models,

If you want to use SIR-F model, S-R trend analysis, phase-dependent approach to SIR-derived models, and other scientific method performed with CovsirPhy, please cite the next Kaggle notebook.

Hirokazu Takaya (2020-2022), Kaggle Notebook, COVID-19 data with SIR model,

We can check the citation with the following script.

import covsirphy as cs
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (807,639
Machine Learning (37,132
Data Science (10,158
Countries (7,954
Python Library (4,455
Covid 19 (4,452
Big Data (2,674
Coronavirus (1,492
Covid (667
Epidemiology (255
Sir Model (43
Epidemic Simulations (30
Epidemic Model (27