Validate and standardise surveillance data for use throughout the package.
The returned incast_data object can be passed directly to forecasting
and nowcasting functions.
Arguments
- data
A data frame containing
target_end_date(Date),observation(numeric),target(character), and one or more key columns. An optionalas_of(Date) column enables nowcasting withget_ncast. Ifdatais already anincast_dataobject, it is returned unchanged.- key
Character vector giving the column name(s) that uniquely identify each time series, equivalent to the key of a
tsibble. Each unique combination of key values is treated as a separate series. Defaults to"location".
Value
An incast_data object containing:
- data
Validated data with standardised column types.
- key
Names of the key columns.
- target
Target variable name.
- window
Start and end dates of the data.
- interval
Reporting interval in days (for example, 7 for weekly data).
- history
Logical indicating whether revision history (
as_of) is available.
