Skip to contents

This function generates a tibble of forecast data for a given reference date. It can filter by model IDs; allows flexibility retrieve all models or specific subsets (e.g., ensemble only).

Usage

summarize_ref_date_forecasts(
  reference_date,
  base_hub_path,
  disease,
  population_data,
  horizons_to_include = c(0, 1, 2),
  excluded_locations = character(0),
  targets = NULL,
  model_ids = NULL
)

Arguments

reference_date

character, the reference date for the forecast in YYYY-MM-DD format (ISO-8601).

base_hub_path

character, path to the forecast hub directory.

disease

character, disease name ("covid" or "rsv"). Used to derive hub name and file prefix.

population_data

data frame with columns "location" and "population". Adds population-based calculations.

horizons_to_include

integer vector, horizons to include in the output. Default: c(0, 1, 2).

excluded_locations

character vector of location codes to exclude from the output. Default: character(0).

targets

character vector, target name(s) to filter forecasts. If NULL (default), does not filter by target.

model_ids

character vector of model IDs to include. If NULL (default), includes all models.

Value

tibble containing forecast summary data