Generate and save text content for forecast hub visualization webpage.
Source:R/write_webtext.R
write_webtext.RdGenerates formatted text summary for a single disease and saves it to disk. Run separately for each disease.
Usage
write_webtext(
reference_date,
disease,
base_hub_path,
hub_reports_path,
targets = NULL,
excluded_locations = NULL,
input_format = "csv",
overwrite_existing = FALSE
)Arguments
- reference_date
Character, the reference date for the forecast in YYYY-MM-DD format (ISO-8601).
- disease
Character, disease name ("covid" or "rsv").
- base_hub_path
Character, path to the forecast hub directory.
- hub_reports_path
Character, path to forecast hub reports directory.
- targets
Character vector of target names to generate text for. Default NULL discovers targets from hub time-series data.
- excluded_locations
NULL, character vector, or named list of US state/territory 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 (no exclusions).
- input_format
Character, input file format for reading summary data files. One of "csv", "tsv", or "parquet". Default: "csv".
- overwrite_existing
logical. If TRUE, overwrite existing files. Default: FALSE.