Package: covsirphy
CovsirPhy introductionDocumentation|Installation|Tutorial|API reference|GitHub|Qiita (Japanese)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.InspirationMonitor the spread of COVID-19/Monkeypox with SIR-derived ODE modelsPredict the number of cases in each country/provinceFind the relationship of reproductive number and measures taken by each countryIf you have ideas or need new functionalities, please join this project.
Any suggestions withGithub IssuesandTwitter: @lisphilarare always welcomed. Questions are also great. Please refer toGuideline of contribution.InstallationThe latest stable version of CovsirPhy is available atPyPI (The Python Package Index): covsirphyand supports Python 3.8 or newer versions. Details are explained inDocumentation: Installation.pipinstall--upgradecovsirphyDemoQuickest tour of CovsirPhy is here. The following codes analyze the records in Japan.importcovsirphyascs# Data preparation,time-series segmentation, parameter estimation with SIR-F modelsnr=cs.ODEScenario.auto_build(geo="Japan",model=cs.SIRFModel)# Check actual recordssnr.simulate(name=None);# Show the result of time-series segmentationsnr.to_dynamics(name="Baseline").detect();# Perform simulation with estimated ODE parameter valuessnr.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 valuessnr.simulate(name="Predicted");# Add a future phase to the baseline (ODE parameters will not be changed)snr.append();# Show created phases and ODE parameter valuessnr.summary()# Compare reproduction number of scenarios (predicted/baseline)snr.compare_param("Rt");# Compare simulated number of casessnr.compare_cases("Confirmed");# Describe representative valuessnr.describe()Output ofsnr.simulate(name="Predicted");TutorialTutorials of functionalities are included in theCovsirPhy documentation.Data preparationData EngineeringSIR-derived ODE modelsPhase-dependent SIR modelsScenario analysisODE parameter predictionRelease notesRelease notes arehere. Titles & links of issues are listed with acknowledgement.We can see the release plan for the next stable version inmilestone page of the GitHub repository. If you find a highly urgent matter, please let us know viaissue page.DevelopersCovsirPhy library is developed by a community of volunteers. Please see the full listhere.This project started in Kaggle platform. Hirokazu Takaya (@lisphilar) publishedKaggle Notebook: COVID-19 data with SIR modelon 12Feb2020 and developed it, discussing with Kaggle community. On 07May2020, "covid19-sir" repository was created. On 10May2020,covsirphyversion 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.SupportPlease support this project as a developer (or a backer).License: Apache License 2.0Please refer toLICENSEfile.CitationPlease 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-sirThis is the output ofcovsirphy.__citation__.importcovsirphyascscs.__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.