Skip to main content

COVID-19 data analysis with phase-dependent SIR-derived ODE models

Project description

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 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

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.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()
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.16.2.tar.gz (96.7 kB view hashes)

Uploaded Source

Built Distribution

covsirphy-2.16.2-py3-none-any.whl (131.9 kB view hashes)

Uploaded Python 3

Supported by

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