upload_forecast: Upload a forecast

Description Usage Arguments Value Examples

View source: R/model.R

Description

This function submits forecast data to the server for uploading. Returns an UploadFileJob object that can be used to up, which depends on the number of current uploads in the queue. Zoltar tracks these via 'UploadFileJob' objects.)

Usage

1
2
3
4
5
6
7
upload_forecast(
  zoltar_connection,
  model_url,
  timezero_date,
  forecast_data,
  notes = ""
)

Arguments

zoltar_connection

A 'ZoltarConnection' object as returned by new_connection

model_url

URL of a model in zoltar_connection's projects

timezero_date

The date of the project timezero you are uploading for. it is a string in format YYYYMMDD

forecast_data

Forecast data as a 'list' in the Zoltar standard format

notes

Optional user notes for the new forecast

Value

An UploadFileJob URL for the upload

Examples

1
2
3
4
5
6
## Not run: 
  forecast_data <- jsonlite::read_json("docs-predictions.json")
  upload_file_job_url <- upload_forecast(conn, "http://www.zoltardata.com/api/model/1/",
                                         "2017-01-17", forecast_data, "a mid-January forecast")

## End(Not run)

zoltr documentation built on April 17, 2020, 1:15 a.m.