Skip to content

Commit

Permalink
Add epiweekly "other" option to create_hubverse_table.R (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhmorris authored Dec 12, 2024
1 parent bc3c4e4 commit bb28800
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions pipelines/create_hubverse_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@
#' to create a hubverse table
#' @param output_path path to save the table as a tsv
#' @param exclude Locations to exclude, as a vector of strings.
#' @param epiweekly_other Use an expressly epiweekly forecast
#' for non-target ED visits instead of a daily forecast aggregated
#' to epiweekly? Boolean, default `FALSE`.
#' @return Nothing, saving the table as a side effect.
main <- function(model_batch_dir,
output_path,
exclude = NULL) {
exclude = NULL,
epiweekly_other = FALSE) {
hewr::to_epiweekly_quantile_table(
model_batch_dir,
exclude = exclude
exclude = exclude,
epiweekly_other = epiweekly_other
) |>
readr::write_tsv(output_path)
}
Expand All @@ -39,7 +44,13 @@ p <- argparser::arg_parser(
"--exclude",
help = "locations to exclude, as a whitespace-separated string",
default = ""
) |>
argparser::add_argument(
"--epiweekly-other",
help = "Use an epiweekly forecast for the non-target visits?",
flag = TRUE
)

argv <- argparser::parse_args(p)

main(
Expand Down

0 comments on commit bb28800

Please sign in to comment.