Skip to content

Commit

Permalink
Update to_epiweekly_quantile_table to work with new output schema (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhmorris authored Dec 9, 2024
1 parent 9f5ea65 commit 5b9a052
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hewr/R/to_epiweekly_quantile_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
#' to look back when generating epiweekly quantiles (determines how
#' many negative epiweekly forecast horizons (i.e. nowcast/backcast)
#' quantiles will be generated.
#' @param disease_model_name Name of the model for the target
#' disease to use when making the quantile table. Default
#' `"pyrenew_e"`.
#' @param other_model_name Name of the model for other ed visits
#' to use when making the quantile table if "epiweekly_other" is
#' `TRUE` (ignored when `epiweekly_other` is `FALSE`). Default
#' `"timeseries_e"`.
#' @param epiweekly_other Use an expressly epiweekly forecast
#' for non-target ED visits instead of a daily forecast aggregated
#' to epiweekly? Boolean, default `FALSE`.
Expand All @@ -19,9 +26,12 @@
to_epiweekly_quantiles <- function(model_run_dir,
report_date,
max_lookback_days,
disease_model_name = "pyrenew_e",
other_model_name = "timeseries_e",
epiweekly_other = FALSE) {
message(glue::glue("Processing {model_run_dir}..."))
draws_path <- fs::path(model_run_dir,
disease_model_name,
"forecast_samples",
ext = "parquet"
)
Expand Down Expand Up @@ -60,6 +70,7 @@ to_epiweekly_quantiles <- function(model_run_dir,
)
} else {
denom_path <- fs::path(model_run_dir,
other_model_name,
"epiweekly_other_ed_visits_forecast",
ext = "parquet"
)
Expand Down
11 changes: 11 additions & 0 deletions hewr/man/to_epiweekly_quantiles.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5b9a052

Please sign in to comment.