The Bucky model is a spatial SEIR model for simulating COVID-19 at the county level.
Project description
Bucky Model
The Bucky model is a spatial SEIR model for simulating COVID-19 at the county level.
Getting Started
Requirements
The Bucky model currently supports Linux and OSX and includes GPU support for accelerated modeling and processing.
git
must be installed and in your PATH.- GPU support requires a cupy-compatible CUDA installation. See the CuPy docs for details.
Installation
!! Until the PyPi release you'll need to install via poetry !! |
---|
See the Developer Guide for instructions. |
Standard installation:
pip install bucky-covid
GPU installation:
pip install bucky-covid[gpu]
Configuration (TODO this is WIP)
To use a customized configuration you first need to make a local copy of the bucky configuration. In your working directory:
bucky cfg install-local
Download Input Data
To download the required input data to the data_dir
specified in the configuration files:
bucky data sync
Running the Model
bucky run model [TODO enum params]
bucky run postprocess
!!! EVERYTHING BELOW HERE IS OUTDATED FOR THE NEW CLI !!!
In order to illustrate how to run the model, this section contains the commands needed to run a small simulation. First, create the intermediate graph format used by the model. This graph contains county-level data on the nodes and mobility information on the edges. The command below creates a US graph for a simulation that will start on October 1, 2020.
./bmodel make_input_graph -d 2020-10-01
After creating the graph, run the model with 100 iterations and 20 days:
./bmodel model -n 100 -d 20
This will create a folder in the raw_output
directory with the unique run ID. The script postprocess
processes and aggregates the Monte Carlo runs. This script by default postprocesses the most recent data in the raw_output
directory and aggregates at the national, state, and county level.
./bmodel postprocess
Visualizing Results
To create plots:
./bmodel viz.plot
Like postprocessing, this script by default creates plots for the most recently processed data. Plots will be located in output/<run_id>/plots
. These plots can be customized to show different columns and historical data. See the documentation for more.
Lookup Tables
During postprocessing, the graph file is used to define geographic relationships between administrative levels (e.g. counties, states). In some cases, a user may want to define custom geographic groupings for visualization and analysis. For example, the National Capital Region includes counties from Maryland and Virginia along with Washington, DC. An example lookup table for this region (also known as the DMV) is included in the repo, DMV.lookup.
To aggregate data with this lookup table, use the flag --lookup
followed by the path to the lookup file:
./bmodel postprocess --lookup DMV.lookup
This will create a new directory with the prefix DMV_ in the default output directory (output/DMV_<run_id>/). To plot:
./bmodel model viz.plot --lookup DMV.lookup
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
Built Distribution
Hashes for bucky_covid-1.0.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed79d349844ff812e4e3f927b6ccdf73a3d7f4a69540deb55398dd3605de1f54 |
|
MD5 | de4da307f646acde955ab922d8acb804 |
|
BLAKE2b-256 | cc7eabc603c7a19a75ea416ef476bf55b688adfb4c35cffc035395254e18f154 |