Skip to content

Latest commit

 

History

History
62 lines (36 loc) · 1.1 KB

README.rst

File metadata and controls

62 lines (36 loc) · 1.1 KB

COVID Modeling Overview

Documentation

https://bnb32.github.io/corona_modeling

Installation

Follow instructions here

Usage

Instantiate model:

from covid.models import SIR
model = SIR()

Instantiate dataset:

from covid.fetch import Dataset
ds = Dataset({'state': <state>, 'n_days': <n_days>})

Get data:

data = ds.get_data()

Fit model parameters:

model.fit_parameters_from_data(data)

Run model:

model.initialize({k: data[k][0] for k in model.compartment_names})
output = model.run_model(n_days=<n_days>)

Plot output of specific compartment:

from covid.postprocessing import plot_compartment
plot_compartment(sim_data=output, raw_data=data, params=ds.params, compartment=<compartment_name>)

Change model parameters:

model.update_parameters(<params>)