Skip to main content

Package for COVID-19 analysis with phase-dependent SIR-derived ODE models

Project description

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

CovsirPhy introduction

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

CovsirPhy is a Python package 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. Please refer to “Method” part of Kaggle Notebook: COVID-19 data with SIR model to understand the methods.

Functionalities

  • Data preparation and data visualization

  • Phase setting with S-R Trend analysis

  • Numerical simulation of ODE models

    • Stable: SIR, SIR-D and SIR-F model

    • Development: SIR-FV and SEWIR-F model

  • Phase-dependent parameter estimation of ODE models

  • Scenario analysis: Simulate the number of cases with user-defined parameter values

  • (In development): Find the relationship of government response and parameter values

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. 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.6 or newer versions.

pip install --upgrade covsirphy

Development versions are in GitHub repository: CovsirPhy.

pip install --upgrade "git+https://github.com/lisphilar/covid19-sir.git#egg=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()
population_data = data_loader.population()
# Check records
snl = cs.Scenario(jhu_data, population_data, country="Japan")
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:

Support

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

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 package as follows.

CovsirPhy Development Team (2020), CovsirPhy, Python package for COVID-19 analysis with SIR-derived ODE models, https://github.com/lisphilar/covid19-sir

If you want to use SIR-F/SIR-FV/SEWIR-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.

Lisphilar (2020), Kaggle notebook, COVID-19 data with SIR model, https://www.kaggle.com/lisphilar/covid-19-data-with-sir-model

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covsirphy-2.13.1.tar.gz (91.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

covsirphy-2.13.1-py3-none-any.whl (154.7 kB view details)

Uploaded Python 3

File details

Details for the file covsirphy-2.13.1.tar.gz.

File metadata

  • Download URL: covsirphy-2.13.1.tar.gz
  • Upload date:
  • Size: 91.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for covsirphy-2.13.1.tar.gz
Algorithm Hash digest
SHA256 888fa62712cd1ac73af38a308b6ea4c3f6e5d0314c527d97dcb352bb71a56406
MD5 4be7ec7c0fcb85cda7e8034861e51d25
BLAKE2b-256 a50a26c3eddead3160d57e5e9a13e806f67f85beb7f19ac12cc191a92bdb31f1

See more details on using hashes here.

File details

Details for the file covsirphy-2.13.1-py3-none-any.whl.

File metadata

  • Download URL: covsirphy-2.13.1-py3-none-any.whl
  • Upload date:
  • Size: 154.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.5

File hashes

Hashes for covsirphy-2.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af24777a7582286d55da5baa1080b74e9cc5c29ec7b8345041b9a1dc3ba1896c
MD5 20fb2468ffe9ede48c8caadfa144f7b8
BLAKE2b-256 eda14efcd1218380af9aa3ce9fe68d01e7efedcd437b92f8148d9de8cb408fae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page