CLI Interface


Bucky Model input graph creation

usage: make_input_graph [-h] [-d DATE] [-o OUTPUT] [--hist_file HIST_FILE]
                        [-v] [--no_update]

Named Arguments

-d, --date

Start date of simulation, last date for historical data.

Default: “2020-10-11”

-o, --output

Directory for graph file. Defaults to data/input_graphs/

Default: “config.yml: <data_dir>/input_graphs/”


File to use for historical data

Default: “config.yml: <data_dir>/cases/csse_hist_timeseries.csv”

-v, --verbose

verbose output (repeat for increased verbosity; defaults to WARN, -v is INFO, -vv is DEBUG)

Default: 0


Skip updating data

Default: True


Bucky Model

usage: model [-h] [--graph GRAPH_FILE] [--n_mc N_MC] [--days DAYS] [-v] [-q]
             [-c] [-nmc] [-gpu] [-opt] [-r] [-o OUTPUT_DIR]
             [--npi_file [NPI_FILE]] [--disable-npi]

Positional Arguments


File containing paramters

Default: “config.yml: <base_dir>/par/scenario_5.yml”

Named Arguments

--graph, -g

Pickle file containing the graph to run

Default: “Most recently created graph in <data_dir>/input_graphs”

--n_mc, -n

Number of runs to do for Monte Carlo

Default: 100

--days, -d

Length of the runs in days

Default: 40

-v, --verbose

verbose output (repeat for increased verbosity; defaults to WARN, -v is INFO, -vv is DEBUG)

Default: 0

-q, --quiet

quiet output (only show ERROR and higher)

Default: 0

-c, --cache

Cache python files/par file/graph pickle for the run

Default: False

-nmc, --no_mc

Just do one run with the mean param values

Default: False

-gpu, --gpu

Use cupy instead of numpy

Default: False

-opt, --opt

Enable cupy kernel optimizations. Do this for large runs using the gpu (n > 100).

Default: False

-r, --reject_runs

Reject Monte Carlo runs with incidence rates that don’t align with historical data

Default: False

-o, --output_dir

Dir to put the output files

Default: “config.yml: <raw_output_dir>”


File containing NPIs


Disable all active NPI from the npi_file at the start of the run

Default: False


Bucky Model postprocessing

usage: postprocess [-h] [-g GRAPH_FILE] [-l LEVELS [LEVELS ...]]
                   [-q QUANTILES [QUANTILES ...]] [-o OUTPUT]
                   [--prefix PREFIX] [--end_date END_DATE] [--lookup LOOKUP]
                   [-n NPROCS] [-cpu] [--verify] [--no-sort] [-v]

Positional Arguments


File to proess

Default: “Most recently created folder in raw_output_dir”

Named Arguments

-g, --graph_file

Graph file used for simulation

-l, --levels

Levels on which to aggregate

Default: [‘adm0’, ‘adm1’, ‘adm2’]

-q, --quantiles

Quantiles to process

Default: [0.01, 0.025, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 0.975, 0.99]

-o, --output

Directory for output files

Default: “config.yml: <output_dir>”


Prefix for output folder (default is UUID)


Lookup table defining geoid relationships

-n, --nprocs

Number of threads doing aggregations, more is better till you go OOM…

Default: 1

-cpu, --cpu

Do not use cupy

Default: False


Verify the quality of the data

Default: False

--no-sort, --no_sort

Skip sorting the aggregated files

Default: False

-v, --verbose

Print extra information

Default: False


Bucky model plotting tools

usage: viz.plot [-h] [-i INPUT_DIR] [-o OUTPUT] [-g GRAPH_FILE]
                [-l LEVELS [LEVELS ...]]
                [--plot_columns PLOT_COLUMNS [PLOT_COLUMNS ...]]
                [--lookup LOOKUP] [--min_hist MIN_HIST]
                [--hist_start HIST_START] [--adm1_name ADM1_NAME]
                [--end_date END_DATE] [-v] [-hist] [--hist_file HIST_FILE]
                [-q QUANTILES [QUANTILES ...]] [-w WINDOW_SIZE]

Named Arguments

-i, --input_dir

Directory location of aggregated data

Default: “Most recently created folder in output_dir”

-o, --output

Output directory for plots. Defaults to input_dir/plots/

-g, --graph_file

Graph file used during model. Defaults to most recently created graph

-l, --levels

Requested plot levels

Default: [‘adm0’, ‘adm1’]


Columns to plot

Default: [‘daily_reported_cases’, ‘daily_deaths’]


Lookup table for geographic mapping info


Minimum number of historical data points to plot.

Default: 0


Start date of historical data. If not passed in, will align with start date of simulation


Admin1 to make admin2-level plots for


Data will not be plotted past this point

-v, --verbose

Print extra information

Default: False

-hist, --hist

Plot historical data in addition to simulation data

Default: False


Path to historical data file. If None, uses either CSSE or Covid Tracking data depending on columns requested.

-q, --quantiles

Specify the quantiles to plot. Defaults to all quantiles present in data.

-w, --window_size

Size of window (in days) to apply to historical data

Default: 7