CLI Interface¶
bucky.make_input_graph¶
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: “2022-01-12”
- -o, --output
Directory for graph file. Defaults to data/input_graphs/
Default: “config.yml: <data_dir>/input_graphs/”
- --hist_file
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
- --no_update
Skip updating data
Default: True
bucky.model¶
Bucky Model
usage: model [-h] [--graph GRAPH_FILE] [--n_mc N_MC] [--days DAYS]
[--seed SEED] [-v] [-q] [-gpu] [-opt] [-optk] [-r]
[-o OUTPUT_DIR] [--npi_file [NPI_FILE]] [--disable-npi]
[par_file]
Positional Arguments¶
- par_file
File/directory containing parameters
Default: “config.yml: <base_dir>/par/”
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
- --seed, -s
Initial seed to generate PRNG seeds from (doesn’t need to be high entropy)
Default: 42
- -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
- -gpu, --gpu
Use cupy instead of numpy
Default: False
- -opt, --optimize
Run optimization over historical data
Default: False
- -optk, --optimize_kernels
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>”
- --npi_file
File containing NPIs
- --disable-npi
Disable all active NPI from the npi_file at the start of the run
Default: False
bucky.postprocess¶
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]
[-gpu] [--verify] [-v]
[file]
Positional Arguments¶
- file
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
Prefix for output folder (default is UUID)
- --end_date
- --lookup
Lookup table defining geoid relationships
- -gpu, --gpu
Use cupy instead of numpy
Default: False
- --verify
Verify the quality of the data
Default: False
- -v, --verbose
Print extra information
Default: False
bucky.viz.plot¶
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] [-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’]
- --plot_columns
Columns to plot
Default: [‘daily_reported_cases’, ‘daily_deaths’]
- --lookup
Lookup table for geographic mapping info
- --min_hist
Minimum number of historical data points to plot.
Default: 0
- --hist_start
Start date of historical data. If not passed in, will align with start date of simulation
- --adm1_name
Admin1 to make admin2-level plots for
- --end_date
Data will not be plotted past this point
- -hist, --hist
Plot historical data in addition to simulation data
Default: False
- --hist_file
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
bucky.viz.map¶
Bucky model mapping tools
usage: viz.map [-h] [-i INPUT_DIR] [-o OUTPUT] [-g GRAPH_FILE]
[--columns COLUMNS [COLUMNS ...]] [--linear]
[-f {daily,weekly,monthly}] [-d DATES [DATES ...]] [--adm0]
[--all_adm1] [--adm1 ADM1 [ADM1 ...]] [--adm1_shape ADM1_SHAPE]
[--adm2_shape ADM2_SHAPE] [--adm1_col ADM1_COL]
[--adm2_col ADM2_COL] [--lookup LOOKUP] [-c CMAP]
Named Arguments¶
- -i, --input_dir
Directory location of processed simulation data
Default: “Most recently created folder in output_dir”
- -o, --output
Output directory for maps. Defaults to input_dir/maps/
- -g, --graph_file
Graph file used during model
- --columns
Data columns to plot. Maps are created separately for each requested column
Default: [‘daily_reported_cases’, ‘daily_deaths’]
- --linear
Use linear scaling for values instead of log
Default: False
- -f, --freq
Possible choices: daily, weekly, monthly
Frequency at which to create maps
Default: “weekly”
- -d, --dates
Specific dates to map
- --adm0
Create adm0-level plot
Default: False
- --all_adm1
Create adm1-level plot for every available adm1-level area
Default: False
- --adm1
Create adm1-level plot for the requested adm1 name
- --adm1_shape
Location of admin1 shapefile
Default: “config.yml: <data_dir>/shapefiles/tl_2019_us_state.shp”
- --adm2_shape
Location of admin2 shapefile
Default: “config.yml: <data_dir>/shapefiles/tl_2019_us_county.shp”
- --adm1_col
Shapefile adm1 column name
Default: “STATEFP”
- --adm2_col
Shapefile adm2 column name
Default: “GEOID”
- --lookup
Lookup table for geographic mapping info
- -c, --cmap
Colormap to use. Must be a valid matplotlib colormap.
Default: “Reds”