Skip to contents

This function ingests a list of nowcast matrixes, and generates a long tidy dataframe indexed by time and delay.

Usage

nowcast_matrix_list_to_df(nowcast_matrix_list)

Arguments

nowcast_matrix_list

List of probabilistic nowcast matrices

Value

nowcast_df Dataframe containing observations and probabilistic nowcasts indexed by reference time and delay.

Examples

point_nowcast_matrix <- matrix(
  c(
    80, 50, 25, 10,
    100, 50, 30, 20,
    90, 45, 25, 17.8,
    80, 40, 23.2, 15.9,
    70, 35, 20.3, 19.9
  ),
  nrow = 5,
  byrow = TRUE
)

nowcast_matrix_list <- add_uncertainty(
  point_nowcast_matrix = point_nowcast_matrix,
  disp = c(8, 1.4, 4),
  n_draws = 10
)

nowcast_df <- nowcast_matrix_list_to_df(
  nowcast_matrix_list = nowcast_matrix_list
)