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: “2020-10-11”
- -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] [-v] [-q]
[-c] [-nmc] [-gpu] [-opt] [-r] [-o OUTPUT_DIR]
[--npi_file [NPI_FILE]] [--disable-npi]
[par_file]
Positional Arguments¶
- par_file
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>”
- --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]
[-n NPROCS] [-cpu] [--verify] [--no-sort] [-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
- -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
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.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] [-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’]
- --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
- -v, --verbose
Print extra information
Default: False
- -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