Skip to content

bnb32/corona_modeling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>)

About

Compartmental epidemiology models for COVID

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages