This function updates the saved datasets (therefore, has side-effects) by reading incremental data for a specified date. The prev_day argument can be specified in case the pipeline fails for some reason to catch up. Note that the default set up is one where the prediction is made on the morning of day \(i + 1\) for day \(i\).

predict_for_date(config, date = as.character(Sys.Date(), format =
  "%Y-%m-%d"), prev_day = NA)

Arguments

config

the site configuration

date

the date string for which the data is to be processed in "YYYY-mm-dd" format

prev_day

the previous date, default NA, which means it is computed from date

Value

a prediction tibble named prediction_df with a column for date and the prediction