Write ensemble forecast summary to disk.
Source:R/write_ref_date_summary.R
write_ref_date_summary_ens.RdThis function generates and writes ensemble-only forecast data.
Usage
write_ref_date_summary_ens(
reference_date,
base_hub_path,
hub_reports_path,
disease,
horizons_to_include = c(0, 1, 2),
population_data = hubhelpr::population_data,
excluded_locations = NULL,
output_format = "csv",
targets = NULL,
n_models_for_reporting = 2,
overwrite_existing = FALSE
)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.
- hub_reports_path
character, path to forecast hub reports directory.
- disease
character, disease name ("covid" or "rsv").
- horizons_to_include
integer vector, horizons to include in the output. Default: c(0, 1, 2).
- population_data
data frame with columns "location" and "population". Default: population_data.
- excluded_locations
character vector or named list specifying US state abbreviations to exclude. If a character vector, locations are excluded across all targets. If a named list, names should be target names (or "all" for global exclusions) mapping to character vectors of abbreviations. Default: NULL.
- output_format
character, output file format. One of "csv", "tsv", or "parquet". Default: "csv".
- targets
character vector, target name(s) to filter forecasts. If NULL (default), does not filter by target.
- n_models_for_reporting
integer, minimum number of designated model submissions required to include an ensemble forecast in the report. Default: 2.
- overwrite_existing
logical. If TRUE, overwrite existing files. Default: FALSE.