This function submits forecast data to the server for uploading. Returns a Job object that can be used to
up, which depends on the number of current uploads in the queue. Zoltar tracks these via Job
objects.)
upload_forecast(
zoltar_connection,
model_url,
timezero_date,
forecast_data,
is_json = TRUE,
notes = ""
)
A ZoltarConnection
object as returned by new_connection()
URL of a model in zoltar_connection's projects
The date of the project timezero you are uploading for. it is a string in format YYYYMMDD
Forecast data to upload data to upload, either a list
(if is_json==TRUE) or a dataframe
otherwise. formats are documented at https://docs.zoltardata.com/
TRUE if forecast_data is JSON (list) format, and FALSE if it is CSV (dataframe) format
Optional user notes for the new forecast
A Job URL for the upload
if (FALSE) {
forecast_data <- jsonlite::read_json("docs-predictions.json")
job_url <- upload_forecast(conn, "http://www.zoltardata.com/api/model/1/",
"2017-01-17", forecast_data, TRUE, "a mid-January forecast")
}