This function creates formatted text content for forecast hub visualizations. It processes forecast data, target data, and team metadata to generate a text description for the specified targets.
Usage
generate_webtext_block(
reference_date,
disease,
base_hub_path,
weekly_data_path,
targets,
included_locations = hubhelpr::included_locations,
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 (e.g., "wk inc covid hosp").
- included_locations
Character vector of location codes that are expected to report. Default hubhelpr::included_locations.
- input_format
Character, input file format for reading summary data files. One of "csv", "tsv", or "parquet". Default: "csv".