covsirphy


Namecovsirphy JSON
Version 3.1.1 PyPI version JSON
download
home_pagehttps://github.com/lisphilar/covid19-sir/
SummaryCOVID-19 data analysis with phase-dependent SIR-derived ODE models
upload_time2024-02-04 13:48:14
maintainer
docs_urlNone
authorHirokazu Takaya
requires_python>=3.9,<3.13
licenseApache-2.0
keywords covid19 covid data engineering data science
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<img src="https://raw.githubusercontent.com/lisphilar/covid19-sir/main/docs/logo/covsirphy_headline.png" width="390" alt="CovsirPhy: COVID-19 analysis with phase-dependent SIRs">

[![PyPI version](https://badge.fury.io/py/covsirphy.svg)](https://badge.fury.io/py/covsirphy)
[![Downloads](https://static.pepy.tech/badge/covsirphy)](https://pepy.tech/project/covsirphy)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/covsirphy)](https://badge.fury.io/py/covsirphy)
[![GitHub license](https://img.shields.io/github/license/lisphilar/covid19-sir)](https://github.com/lisphilar/covid19-sir/blob/master/LICENSE)
[![Quality Check](https://github.com/lisphilar/covid19-sir/actions/workflows/test.yml/badge.svg)](https://github.com/lisphilar/covid19-sir/actions/workflows/test.yml)
[![Test Coverage](https://codecov.io/gh/lisphilar/covid19-sir/branch/master/graph/badge.svg?token=9Z8Z1UHY3I)](https://codecov.io/gh/lisphilar/covid19-sir)

# CovsirPhy introduction

[<strong>Documentation</strong>](https://lisphilar.github.io/covid19-sir/index.html)
| [<strong>Installation</strong>](https://lisphilar.github.io/covid19-sir/markdown/INSTALLATION.html)
| [<strong>Tutorial</strong>](<https://lisphilar.github.io/covid19-sir/01_data_preparation.html>)
| [<strong>API reference</strong>](https://lisphilar.github.io/covid19-sir/covsirphy.html)
| [<strong>GitHub</strong>](https://github.com/lisphilar/covid19-sir)
| [<strong>Qiita (Japanese)</strong>](https://qiita.com/tags/covsirphy)

<strong>CovsirPhy is a Python library for infectious disease (COVID-19: Coronavirus disease 2019, Monkeypox 2022) 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. </strong>

<img src="https://raw.githubusercontent.com/lisphilar/covid19-sir/main/docs/dfd/covsirphy_dfd.png" width="800" alt="Data flow diagram: data science for infectious diseases with CovsirPhy Python library">

## Inspiration

* Monitor the spread of COVID-19/Monkeypox with SIR-derived ODE models
* Predict the number of cases in each country/province
* Find the relationship of reproductive number and measures taken by each country

<strong>If you have ideas or need new functionalities, please join this project.
Any suggestions with [Github Issues](https://github.com/lisphilar/covid19-sir/issues/new/choose) and [Twitter: @lisphilar](https://twitter.com/lisphilar) are always welcomed. Questions are also great. Please refer to [Guideline of contribution](https://lisphilar.github.io/covid19-sir/CONTRIBUTING.html).</strong>

## Installation

The latest stable version of CovsirPhy is available at [PyPI (The Python Package Index): covsirphy](https://pypi.org/project/covsirphy/) and supports Python 3.8 or newer versions. Details are explained in [Documentation: Installation](https://lisphilar.github.io/covid19-sir/INSTALLATION.html).

```Bash
pip install --upgrade covsirphy
```

## Demo

Quickest tour of CovsirPhy is here. The following codes analyze the records in Japan.

```Python
import covsirphy as cs
# Data preparation,time-series segmentation, parameter estimation with SIR-F model
snr = cs.ODEScenario.auto_build(geo="Japan", model=cs.SIRFModel)
# Check actual records
snr.simulate(name=None);
# Show the result of time-series segmentation
snr.to_dynamics(name="Baseline").detect();
# Perform simulation with estimated ODE parameter values
snr.simulate(name="Baseline");
# Predict ODE parameter values (30 days from the last date of actual records)
snr.build_with_template(name="Predicted", template="Baseline");
snr.predict(days=30, name="Predicted");
# Perform simulation with estimated and predicted ODE parameter values
snr.simulate(name="Predicted");
# Add a future phase to the baseline (ODE parameters will not be changed)
snr.append();
# Show created phases and ODE parameter values
snr.summary()
# Compare reproduction number of scenarios (predicted/baseline)
snr.compare_param("Rt");
# Compare simulated number of cases
snr.compare_cases("Confirmed");
# Describe representative values
snr.describe()
```

Output of `snr.simulate(name="Predicted");`

<img src="https://raw.githubusercontent.com/lisphilar/covid19-sir/main/example/output/demo_jpn/04_predicted.png" width="600">

## Tutorial

Tutorials of functionalities are included in the [CovsirPhy documentation](https://lisphilar.github.io/covid19-sir/index.html).

* [Data preparation](https://lisphilar.github.io/covid19-sir/01_data_preparation.html)
* [Data Engineering](https://lisphilar.github.io/covid19-sir/02_data_engineering.html)
* [SIR-derived ODE models](https://lisphilar.github.io/covid19-sir/03_ode.html)
* [Phase-dependent SIR models](https://lisphilar.github.io/covid19-sir/04_phase_dependent.html)
* [Scenario analysis](https://lisphilar.github.io/covid19-sir/05_scenario_analysis.html)
* [ODE parameter prediction](https://lisphilar.github.io/covid19-sir/06_prediction.html)

## Release notes

Release notes are [here](https://github.com/lisphilar/covid19-sir/releases). 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](https://github.com/lisphilar/covid19-sir/milestones). If you find a highly urgent matter, please let us know via [issue page](https://github.com/lisphilar/covid19-sir/issues).

## Developers

CovsirPhy library is developed by a community of volunteers. Please see the full list [here](https://github.com/lisphilar/covid19-sir/graphs/contributors).

This project started in Kaggle platform. Hirokazu Takaya ([@lisphilar](<https://www.kaggle.com/lisphilar>)) published [Kaggle Notebook: COVID-19 data with SIR model](https://www.kaggle.com/lisphilar/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. The first release in PyPI (version 2.3.0) was on 28Jun2020. Many APIs were reviewed via 2.x series and version 3.0.0 was released on 12May2023.

## Support

Please support this project as a developer (or a backer).
[![Become a backer](https://opencollective.com/covsirphy/tiers/backer.svg?avatarHeight=36&width=600)](https://opencollective.com/covsirphy)

## License: Apache License 2.0

Please refer to [LICENSE](https://github.com/lisphilar/covid19-sir/blob/master/LICENSE) file.

## Citation

Please cite this library as follows with version number (`import covsirphy as cs; cs.__version__`).

**Hirokazu Takaya and CovsirPhy Development Team (2020-2024), CovsirPhy version [version number]: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models, [https://github.com/lisphilar/covid19-sir](https://github.com/lisphilar/covid19-sir)**

This is the output of `covsirphy.__citation__`.

```Python
import covsirphy as cs
cs.__citation__
```

**We have no original papers the author and contributors wrote, but note that some scientific approaches, including SIR-F model, S-R change point analysis, phase-dependent approach to SIR-derived models, were developed in this project.**

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lisphilar/covid19-sir/",
    "name": "covsirphy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.13",
    "maintainer_email": "",
    "keywords": "covid19,covid,data engineering,data science",
    "author": "Hirokazu Takaya",
    "author_email": "lisphilar@outlook.jp",
    "download_url": "https://files.pythonhosted.org/packages/d6/70/429cc703844212a094d5a90e2201efd1fd4aae9298bbdd45465e9d4bce23/covsirphy-3.1.1.tar.gz",
    "platform": null,
    "description": "\n<img src=\"https://raw.githubusercontent.com/lisphilar/covid19-sir/main/docs/logo/covsirphy_headline.png\" width=\"390\" alt=\"CovsirPhy: COVID-19 analysis with phase-dependent SIRs\">\n\n[![PyPI version](https://badge.fury.io/py/covsirphy.svg)](https://badge.fury.io/py/covsirphy)\n[![Downloads](https://static.pepy.tech/badge/covsirphy)](https://pepy.tech/project/covsirphy)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/covsirphy)](https://badge.fury.io/py/covsirphy)\n[![GitHub license](https://img.shields.io/github/license/lisphilar/covid19-sir)](https://github.com/lisphilar/covid19-sir/blob/master/LICENSE)\n[![Quality Check](https://github.com/lisphilar/covid19-sir/actions/workflows/test.yml/badge.svg)](https://github.com/lisphilar/covid19-sir/actions/workflows/test.yml)\n[![Test Coverage](https://codecov.io/gh/lisphilar/covid19-sir/branch/master/graph/badge.svg?token=9Z8Z1UHY3I)](https://codecov.io/gh/lisphilar/covid19-sir)\n\n# CovsirPhy introduction\n\n[<strong>Documentation</strong>](https://lisphilar.github.io/covid19-sir/index.html)\n| [<strong>Installation</strong>](https://lisphilar.github.io/covid19-sir/markdown/INSTALLATION.html)\n| [<strong>Tutorial</strong>](<https://lisphilar.github.io/covid19-sir/01_data_preparation.html>)\n| [<strong>API reference</strong>](https://lisphilar.github.io/covid19-sir/covsirphy.html)\n| [<strong>GitHub</strong>](https://github.com/lisphilar/covid19-sir)\n| [<strong>Qiita (Japanese)</strong>](https://qiita.com/tags/covsirphy)\n\n<strong>CovsirPhy is a Python library for infectious disease (COVID-19: Coronavirus disease 2019, Monkeypox 2022) 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. </strong>\n\n<img src=\"https://raw.githubusercontent.com/lisphilar/covid19-sir/main/docs/dfd/covsirphy_dfd.png\" width=\"800\" alt=\"Data flow diagram: data science for infectious diseases with CovsirPhy Python library\">\n\n## Inspiration\n\n* Monitor the spread of COVID-19/Monkeypox with SIR-derived ODE models\n* Predict the number of cases in each country/province\n* Find the relationship of reproductive number and measures taken by each country\n\n<strong>If you have ideas or need new functionalities, please join this project.\nAny suggestions with [Github Issues](https://github.com/lisphilar/covid19-sir/issues/new/choose) and [Twitter: @lisphilar](https://twitter.com/lisphilar) are always welcomed. Questions are also great. Please refer to [Guideline of contribution](https://lisphilar.github.io/covid19-sir/CONTRIBUTING.html).</strong>\n\n## Installation\n\nThe latest stable version of CovsirPhy is available at [PyPI (The Python Package Index): covsirphy](https://pypi.org/project/covsirphy/) and supports Python 3.8 or newer versions. Details are explained in [Documentation: Installation](https://lisphilar.github.io/covid19-sir/INSTALLATION.html).\n\n```Bash\npip install --upgrade covsirphy\n```\n\n## Demo\n\nQuickest tour of CovsirPhy is here. The following codes analyze the records in Japan.\n\n```Python\nimport covsirphy as cs\n# Data preparation,time-series segmentation, parameter estimation with SIR-F model\nsnr = cs.ODEScenario.auto_build(geo=\"Japan\", model=cs.SIRFModel)\n# Check actual records\nsnr.simulate(name=None);\n# Show the result of time-series segmentation\nsnr.to_dynamics(name=\"Baseline\").detect();\n# Perform simulation with estimated ODE parameter values\nsnr.simulate(name=\"Baseline\");\n# Predict ODE parameter values (30 days from the last date of actual records)\nsnr.build_with_template(name=\"Predicted\", template=\"Baseline\");\nsnr.predict(days=30, name=\"Predicted\");\n# Perform simulation with estimated and predicted ODE parameter values\nsnr.simulate(name=\"Predicted\");\n# Add a future phase to the baseline (ODE parameters will not be changed)\nsnr.append();\n# Show created phases and ODE parameter values\nsnr.summary()\n# Compare reproduction number of scenarios (predicted/baseline)\nsnr.compare_param(\"Rt\");\n# Compare simulated number of cases\nsnr.compare_cases(\"Confirmed\");\n# Describe representative values\nsnr.describe()\n```\n\nOutput of `snr.simulate(name=\"Predicted\");`\n\n<img src=\"https://raw.githubusercontent.com/lisphilar/covid19-sir/main/example/output/demo_jpn/04_predicted.png\" width=\"600\">\n\n## Tutorial\n\nTutorials of functionalities are included in the [CovsirPhy documentation](https://lisphilar.github.io/covid19-sir/index.html).\n\n* [Data preparation](https://lisphilar.github.io/covid19-sir/01_data_preparation.html)\n* [Data Engineering](https://lisphilar.github.io/covid19-sir/02_data_engineering.html)\n* [SIR-derived ODE models](https://lisphilar.github.io/covid19-sir/03_ode.html)\n* [Phase-dependent SIR models](https://lisphilar.github.io/covid19-sir/04_phase_dependent.html)\n* [Scenario analysis](https://lisphilar.github.io/covid19-sir/05_scenario_analysis.html)\n* [ODE parameter prediction](https://lisphilar.github.io/covid19-sir/06_prediction.html)\n\n## Release notes\n\nRelease notes are [here](https://github.com/lisphilar/covid19-sir/releases). Titles & links of issues are listed with acknowledgement.\n\nWe can see the release plan for the next stable version in [milestone page of the GitHub repository](https://github.com/lisphilar/covid19-sir/milestones). If you find a highly urgent matter, please let us know via [issue page](https://github.com/lisphilar/covid19-sir/issues).\n\n## Developers\n\nCovsirPhy library is developed by a community of volunteers. Please see the full list [here](https://github.com/lisphilar/covid19-sir/graphs/contributors).\n\nThis project started in Kaggle platform. Hirokazu Takaya ([@lisphilar](<https://www.kaggle.com/lisphilar>)) published [Kaggle Notebook: COVID-19 data with SIR model](https://www.kaggle.com/lisphilar/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. The first release in PyPI (version 2.3.0) was on 28Jun2020. Many APIs were reviewed via 2.x series and version 3.0.0 was released on 12May2023.\n\n## Support\n\nPlease support this project as a developer (or a backer).\n[![Become a backer](https://opencollective.com/covsirphy/tiers/backer.svg?avatarHeight=36&width=600)](https://opencollective.com/covsirphy)\n\n## License: Apache License 2.0\n\nPlease refer to [LICENSE](https://github.com/lisphilar/covid19-sir/blob/master/LICENSE) file.\n\n## Citation\n\nPlease cite this library as follows with version number (`import covsirphy as cs; cs.__version__`).\n\n**Hirokazu Takaya and CovsirPhy Development Team (2020-2024), CovsirPhy version [version number]: Python library for COVID-19 analysis with phase-dependent SIR-derived ODE models, [https://github.com/lisphilar/covid19-sir](https://github.com/lisphilar/covid19-sir)**\n\nThis is the output of `covsirphy.__citation__`.\n\n```Python\nimport covsirphy as cs\ncs.__citation__\n```\n\n**We have no original papers the author and contributors wrote, but note that some scientific approaches, including SIR-F model, S-R change point analysis, phase-dependent approach to SIR-derived models, were developed in this project.**\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "COVID-19 data analysis with phase-dependent SIR-derived ODE models",
    "version": "3.1.1",
    "project_urls": {
        "Documentation": "https://lisphilar.github.io/covid19-sir/",
        "Homepage": "https://github.com/lisphilar/covid19-sir/",
        "Repository": "https://github.com/lisphilar/covid19-sir/"
    },
    "split_keywords": [
        "covid19",
        "covid",
        "data engineering",
        "data science"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5f859e35ec0198e434f99b2bdd3f91ae4675978ce6734d61b431c69f2f66da4",
                "md5": "bc7680f4585d325d5ee758ef037ce83a",
                "sha256": "4e4c11c26317a76b417982a50757b12e8fbb3f54fc4424d5c359e94aded18c3e"
            },
            "downloads": -1,
            "filename": "covsirphy-3.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc7680f4585d325d5ee758ef037ce83a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.13",
            "size": 107143,
            "upload_time": "2024-02-04T13:48:11",
            "upload_time_iso_8601": "2024-02-04T13:48:11.449493Z",
            "url": "https://files.pythonhosted.org/packages/a5/f8/59e35ec0198e434f99b2bdd3f91ae4675978ce6734d61b431c69f2f66da4/covsirphy-3.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d670429cc703844212a094d5a90e2201efd1fd4aae9298bbdd45465e9d4bce23",
                "md5": "4871137169ebfa1b4c87826531a678ac",
                "sha256": "f7d56e98915a2e3b73eb6e061e2ac2bc1e13599d8bdbdbc0e55509235b37a52a"
            },
            "downloads": -1,
            "filename": "covsirphy-3.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4871137169ebfa1b4c87826531a678ac",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.13",
            "size": 76890,
            "upload_time": "2024-02-04T13:48:14",
            "upload_time_iso_8601": "2024-02-04T13:48:14.334056Z",
            "url": "https://files.pythonhosted.org/packages/d6/70/429cc703844212a094d5a90e2201efd1fd4aae9298bbdd45465e9d4bce23/covsirphy-3.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-04 13:48:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lisphilar",
    "github_project": "covid19-sir",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "covsirphy"
}
        
Elapsed time: 0.18418s