COVID-19 data analysis with phase-dependent SIR-derived ODE models
Project description
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 analyse them easily. Scenario analysis with CovsirPhy enables us to make data-informed decisions.
Functionalities
Numerical simulation of ODE models: SIR, SIR-D and SIR-F model
Scenario analysis: Simulate the number of cases with user-defined parameter values
Predict the parameter valuse to forecast the number of cases.
Inspiration
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.
Installation
The latest stable version of CovsirPhy is available at PyPI (The Python Package Index): covsirphy and supports Python 3.7 or newer versions. Details are explained in Documentation: Installation.
pip install --upgrade covsirphy
Usage
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()
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.
Support
Developers
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.
Citation
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__
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for covsirphy-2.22.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31fc7f26e2bd8dd726b0446d764e0902a4af689f95d5bcded37ea41867b2c3f2 |
|
MD5 | 935a1e3e86bc149bf892afa309425894 |
|
BLAKE2b-256 | 186877f4eeb0d8f151059782c99138c7e36d8a2c7a0f8f7a1f6b0b640bf1847b |