Skip to contents

Runs the baselinenowcast model for a single geographic location. This is the inner function called by run_state_nowcasts() and can also be used directly for Azure single-state entrypoint scripts.

When called directly (not via run_state_nowcasts()), this function converts cumulative counts to incremental counts internally.

Usage

run_single_nowcast(data, location, config, nowcast_date, cumulative = TRUE)

Arguments

data

A data frame of reporting data (cumulative or incremental). When called via run_state_nowcasts(), data is already incremental. When called directly, cumulative data is converted automatically.

location

Character. The location code to process.

config

A nowcast_config object.

nowcast_date

Date. The nowcast date.

cumulative

Logical. If TRUE (default), converts cumulative counts to incremental. Set to FALSE if data is already incremental.

Value

A data frame of nowcast results for the single location.

Examples

if (FALSE) { # \dontrun{
config <- nowcast_config(uncertainty_model = "normal")
# Pass cumulative data directly - conversion happens internally
result <- run_single_nowcast(data, "ca", config, as.Date("2025-01-04"))
} # }