Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bnb32/corona_modeling

Compartmental epidemiology models for COVID
https://github.com/bnb32/corona_modeling

compartmental-models covid-19

Last synced: about 2 months ago
JSON representation

Compartmental epidemiology models for COVID

Awesome Lists containing this project

README

        

***********************
COVID Modeling Overview
***********************

Documentation
=============
``_

Installation
============

Follow instructions `here `_

Usage
=====

Instantiate model:

.. code-block:: python

from covid.models import SIR
model = SIR()

Instantiate dataset:

.. code-block:: python

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

Get data:

.. code-block:: python

data = ds.get_data()

Fit model parameters:

.. code-block:: python

model.fit_parameters_from_data(data)

Run model:

.. code-block:: python

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

Plot output of specific compartment:

.. code-block:: python

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

Change model parameters:

.. code-block:: python

model.update_parameters()