Skip to contents

Takes nowcast output with multiple draws and summarizes into prediction intervals per location and reference date in forecast hub format.

Usage

summarize_nowcast(
  nowcast_results,
  quantiles = c(0.01, 0.025, seq(0.05, 0.95, by = 0.05), 0.975, 0.99)
)

Arguments

nowcast_results

A data frame as returned by run_state_nowcasts() or run_single_nowcast(), containing columns reference_date, location, pred_count, and draw.

quantiles

Numeric vector of quantiles to compute. Default uses forecast hub standard: c(0.01, 0.025, seq(0.05, 0.95, by = 0.05), 0.975, 0.99).

Value

A data frame in forecast hub format with columns:

  • reference_date: The reference date

  • location: Geographic identifier

  • output_type: Always "quantile"

  • output_type_id: Quantile level as character (e.g., "0.5")

  • value: The prediction value

Examples

if (FALSE) { # \dontrun{
results <- run_state_nowcasts(data, config)
summary <- summarize_nowcast(results)
} # }