Creates formatted text content for forecast hub visualizations by loading a template and filling in computed data values.
Usage
generate_webtext_block(
reference_date,
disease,
base_hub_path,
weekly_data_path,
targets,
excluded_locations = NULL,
input_format = "csv"
)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.
- weekly_data_path
Character, path to the directory with weekly summary files.
- targets
Character vector of target names to generate text for.
- 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".