Skip to main content

COVID-19 Modeling

Project description

COMODELS

Models for COVID - 19

For documentation, see the docstrings! Much more to come. For help:

import comodels
help(comodels)
help(comodels.PennDeath)
help(comodels.Penn)

Penn Death model

# import the penn model
import matplotlib.pyplot as plt
from comodels import PennDeath

help(PennDeath)
tx = PennDeath(N = 28304596, I = 223, R = 0, D = 3, D_today = 2)

help(PennDeath.sir)

def plot_penn(Pdp: PennDeath, n_days: int) -> None:
    # predict the coming storm and plot it
    curve, admissions = Pdp.sir(n_days)
    fig, ax = plt.subplots(1,3, figsize=(15,5))
    for k, v in curve.items():
        if k not in Pdp.rates.keys() :
            ax[0].plot(v, label=k)
            ax[0].legend()
        else:
            ax[1].plot(v, label=k)
            ax[1].legend()
    ax[1].set_title('Hospital Resource Usage')
    ax[0].set_title('SIR curve')
    for k, v in admissions.items():
        ax[2].plot(v, label = k)
        ax[2].legend()
    ax[2].set_title('Additional Resource Usage by day')
    fig.suptitle(f"No social distancing, total deaths = {int(max(curve['dead']))}")
    plt.show()


plot_penn(tx, 120)
print(curve.keys())
print(occupancy.keys())

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

covid-modeling-0.0.8.tar.gz (112.3 kB view details)

Uploaded Source

Built Distribution

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

covid_modeling-0.0.8-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file covid-modeling-0.0.8.tar.gz.

File metadata

  • Download URL: covid-modeling-0.0.8.tar.gz
  • Upload date:
  • Size: 112.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5

File hashes

Hashes for covid-modeling-0.0.8.tar.gz
Algorithm Hash digest
SHA256 f4d5d3f0a8f6cc2dcc8492ce17988e6a84bb3acc1e6d6c1973a8b70d872060a2
MD5 c62c69cc9957b9b8904f0110bbfbb376
BLAKE2b-256 56b4124752038a20758b7931ebf2d396cf5008ddf44fe166a70c374e65893999

See more details on using hashes here.

File details

Details for the file covid_modeling-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: covid_modeling-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5

File hashes

Hashes for covid_modeling-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 822b5f63aa13e74b9b088a26a91263142a65b275543a7e9aa38c2b123fe7133f
MD5 2dc56de3cc00a5972bcfb2d78ac3ae00
BLAKE2b-256 da3ebcf43b3f486d11305e7a2e481395c5932e57ffeef7f5a850d1c843aac333

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