Skip to main content

The Bucky model is a spatial SEIR model for simulating COVID-19 at the county level.

Project description

Bucky Model

Documentation Status black-flake8-isort-hooks CodeFactor Interrogate

Documentation

Developer Guide

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bucky-covid-1.0.0a0.tar.gz (958.7 kB view hashes)

Uploaded Source

Built Distribution

bucky_covid-1.0.0a0-py3-none-any.whl (978.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page