Objective: Provide a library/API that ingests COVID-19 data to provide simulated outcomes based on local isolation/quarantine policy levers as represented in published models.
- R-Based Model
- Penn-Chime
- Imperial College Model
- Astor Sq ICU Beds Model
- Epidemic Calculator built by Open AI member
- Hopkins IDD Model
See covid-data-public for data sources being used or considered.
We automatically build & publish an API snapshot (e.g. https://data.covidactnow.org/snapshot/123/) twice a day via a github action. To manually kick off a new snapshot, get a personal access token, and run:
export GITHUB_TOKEN=<YOUR PERSONAL GITHUB TOKEN>
./tools/push-api.sh
Once a snapshot has been vetted, you can "label" it with a friendly name, e.g. pointing https://data.covidactnow.org/v0/ at https://data.covidactnow.org/snapshot/123/ with:
export GITHUB_TOKEN=<YOUR PERSONAL GITHUB TOKEN>
./tools/label-api.sh v0 123
This will run all models and generate data needed for the website, outputting to ../covid-projections/public/data
.
./deploy_website.sh
In order to have sentry run locally and report errors to the dev sentry instance, add the following to your .env
export SENTRY_DSN=https://<GET_SENTRY_DSN_FOR_DEV_INSTANCE>.ingest.sentry.io/<DEV_INSTANCE>
The gitub action pulls the sentry_dsn for the prod instance from a secrets stored within github.
Recommend virtualenv or miniconda python 3.7 from here https://docs.conda.io/en/latest/miniconda.html
If using conda, you can use the following:
conda create python=3.7 -n covid-data-model
conda activate covid-data-model
pip install -r requirements.txt -r requirements_test.txt
PySEIR provides a command line interface in the activated environment. You can access the model with pyseir --help
and pyseir <subcommand> --help
providing more information.
Example:
pyseir build-all --states="New York"
will run state and county models for New York.
States can also be specified by their state code: --states="New York"
and --states=NY
are equivalent.
Check the output/
folder for results.
There are a variety of output artifacts to paths described in pyseir/utils.py.
The main artifact is the ensemble_result which contains the output information
for each suppression policy -> model compartment
as well as capacity
information.