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 analyse them easily. Scenario analysis with CovsirPhy enables us to make data-informed decisions.
Numerical simulation of ODE models: SIR, SIR-D and SIR-F model
Scenario analysis: Simulate the number of cases with user-defined parameter values
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.
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 data_loader = cs.DataLoader("input") jhu_data = data_loader.jhu() # Select country name and register the data snl = cs.Scenario(country="Japan") snl.register(jhu_data) # Check records snl.records() # S-R trend analysis snl.trend().summary() # Parameter estimation of SIR-F model snl.estimate(cs.SIRF) # History of reproduction number _ = snl.history(target="Rt") # History of parameters _ = snl.history_rate() _ = snl.history(target="rho") # Simulation for 30 days snl.add(days=30) _ = snl.simulate()
Release notes are here. Titles & links of issues are listed with acknowledgement.
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
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.
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-2021), CovsirPhy version [version number]: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models, https://github.com/lisphilar/covid19-sir
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-2021), Kaggle Notebook, COVID-19 data with SIR model, https://www.kaggle.com/lisphilar/covid-19-data-with-sir-model
We can check the citation with the following script.
import covsirphy as cs cs.__citation__