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
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.7.tar.gz
(112.3 kB
view hashes)
Built Distribution
Close
Hashes for covid_modeling-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1079a1628cc2faa68c32cd5a2dba0c58e82e05537023e02bc74e92726b0d0c2 |
|
MD5 | c44fcfeb78ad88d957541798f8870280 |
|
BLAKE2b-256 | a03a43849f2710a16f48f80be6832c177130a78b1e8f2476db02c50b25b4b6c7 |