data_frame_from_forecast_data {zoltr} | R Documentation |
Converts forecast data from Zoltar's native list
format to a data.frame
Description
Converts forecast data from Zoltar's native list
format to a data.frame
Usage
data_frame_from_forecast_data(forecast_data)
Arguments
forecast_data |
Forecast data as a |
Value
A data.frame
from forecast_data in zoltar-specific format. The columns are:
'unit', 'target', 'class', 'value', 'cat', 'prob', 'sample', 'quantile', 'family',
'param1', 'param2', 'param3'. They are documented at
https://docs.zoltardata.com/fileformats/#forecast-data-format-csv .
NB: columns are all character (i.e., data type information from forecast_data is lost). Also note that a retracted
prediction element is represented as a single row with NA values for all but the first four columns.
Examples
## Not run:
forecast_data <- jsonlite::read_json("docs-predictions.json")
data_frame <- data_frame_from_forecast_data(forecast_data)
## End(Not run)
[Package zoltr version 1.0.1 Index]