From 99464bbadabcfc508a0d8a987e108c4eb6d0c066 Mon Sep 17 00:00:00 2001 From: "Dylan H. Morris" Date: Mon, 9 Dec 2024 21:42:10 +0000 Subject: [PATCH] Update to_epiweekly_quantile_table to work with new output schema --- hewr/R/to_epiweekly_quantile_table.R | 11 +++++++++++ hewr/man/to_epiweekly_quantiles.Rd | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/hewr/R/to_epiweekly_quantile_table.R b/hewr/R/to_epiweekly_quantile_table.R index 45c39360..9ac595b5 100644 --- a/hewr/R/to_epiweekly_quantile_table.R +++ b/hewr/R/to_epiweekly_quantile_table.R @@ -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`. @@ -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" ) @@ -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" ) diff --git a/hewr/man/to_epiweekly_quantiles.Rd b/hewr/man/to_epiweekly_quantiles.Rd index 47cf7f73..af8e9ee2 100644 --- a/hewr/man/to_epiweekly_quantiles.Rd +++ b/hewr/man/to_epiweekly_quantiles.Rd @@ -10,6 +10,8 @@ to_epiweekly_quantiles( model_run_dir, report_date, max_lookback_days, + disease_model_name = "pyrenew_e", + other_model_name = "timeseries_e", epiweekly_other = FALSE ) } @@ -26,6 +28,15 @@ to look back when generating epiweekly quantiles (determines how many negative epiweekly forecast horizons (i.e. nowcast/backcast) quantiles will be generated.} +\item{disease_model_name}{Name of the model for the target +disease to use when making the quantile table. Default +\code{"pyrenew_e"}.} + +\item{other_model_name}{Name of the model for other ed visits +to use when making the quantile table if "epiweekly_other" is +\code{TRUE} (ignored when \code{epiweekly_other} is \code{FALSE}). Default +\code{"timeseries_e"}.} + \item{epiweekly_other}{Use an expressly epiweekly forecast for non-target ED visits instead of a daily forecast aggregated to epiweekly? Boolean, default \code{FALSE}.}