Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to_epiweekly_quantile_table to work with new output schema #197

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading