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.sir)
help(comodels.sir.PennDeath)
help(comodels.sir.Penn)
Penn Death model
# import the penn model
import matplotlib.pyplot as plt
from comodels.sir 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
Release history Release notifications | RSS feed
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.4.tar.gz
(112.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file covid-modeling-0.0.4.tar.gz.
File metadata
- Download URL: covid-modeling-0.0.4.tar.gz
- Upload date:
- Size: 112.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c560272312fbece68885e20017e1b5ed55e7ba41fea7ce1453fb9648203186fe
|
|
| MD5 |
8a42c7f6d0abc2aac228297b2bbb3254
|
|
| BLAKE2b-256 |
6f9d801589ac9ce613982d3ebab1576a7a271f1badcc04e74a24afffaf17696d
|
File details
Details for the file covid_modeling-0.0.4-py3-none-any.whl.
File metadata
- Download URL: covid_modeling-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.0 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
123dcef3ca155ddeda2e8bc86e71cb487333816a43ab1495f57fb57dba37ddec
|
|
| MD5 |
ad1a4a9ad6c63215076e3e3c34a0d293
|
|
| BLAKE2b-256 |
be61bc78dfb3acfda71c26e452ca96e057d2c1f76d94868707eacdcd7d4928f8
|