Managing forecasts

A forecast is a set of predictions for combinations of units and targets. See Data Model for detail on the structure of predictions. Following are the forecast operations you can do from within Zoltar.

Note: Operations on forecasts, like many Zoltar activities, can be done either through the zoltardata.com web interface or programmatically using the Zoltar libraries.

Note: As mentioned in Concepts, forecasts can have versions via their issue_date field. However, versioning is currently supported only via the API.

Upload a forecast

Here we show how to upload forecast data into Zoltar.

Note: As mentioned at Jobs, uploading a forecast is done in a separate worker process because it may take more than a handful of seconds to run. Thus the workflow is based on that (see Job workflow for details).

Forecasts are uploaded to a particular model for a particular time zero. To upload one:

  1. Go to the model detail page of the one you want to upload into.
  2. Make sure "Hide if no data" is unchecked.
  3. Find the time zero that the forecast is associated with.
  4. If the time zero already has a forecast then delete it (see Delete a forecast below). You can tell if a time zero has an uploaded forecast in two ways: the text in the "Data Source" column is a link instead of the words "(No data)" and the icon in the "Action" column is a red trash can and not a green upload icon.
  5. Click the "Browse..." button in the time zero's "Action" column.
  6. In the dialog that appears, select a Forecast data format JSON file
  7. Click the green upload button.
  8. If the file is OK then you will be taken to a job detail page that shows the status of your upload, with the message "Queued the forecast file _ for uploading.", where _ is your file's name.
  9. Once the upload is successful (you can refresh the job detail page to check) then you will see the newly-uploaded file listed next to the selected time zero on the model detail page.
  10. If there was a problem uploading then you will see the upload's status as FAILED. The Failure section will provide some information to help debug the problem.

Delete a forecast

Delete a forecast via these steps:

  1. Go to the model detail page where the forecast resides.
  2. Click the red trash can button in the "Action" column.
  3. Click "Delete" in the confirmation dialog that appears. Note that this cannot be undone!

Download a single forecast

To download a particular forecast:

  1. Go to the model detail page where the forecast resides.
  2. Click the link in the "Data Source" column to go to the forecast detail page.
  3. Click the "Download JSON" button and save the file in the JSON format documented at Forecast data format for details.

(Note that if you are only interested in a particular unit/target combination, you can use the "Query Forecast Data" form on that page - see here for details.)

Download multiple forecasts

Note: Downloading multiple forecasts is currently available only to users with Zoltar accounts.

Note: As mentioned at Jobs, downloading a forecast is done in a separate worker process because it may take more than a handful of seconds to run. Thus the workflow is based on that (see Job workflow for details).

Forecasts are downloaded by executing a forecast query by either a) Zoltar API using the Zoltar libraries, or b) via a simple web UI form (shown below). In both cases you need to follow these steps:

  1. Decide the data of interest (i.e., models, units, targets, timezeros, and prediction types).
  2. Submit the query to get a Job ID.
  3. Poll the resulting Job until it succeeds (see Check a job's status).
  4. Download the job's data (see Download a job's data). The format is described at Forecast data format (CSV).

Download multiple forecasts via the web UI

To download forecast data via the web UI:

  1. Go to the project detail page whose models contain the forecasts.
  2. Click the "Download" button to the right of "Forecasts" in the Features section at the page's top.
  3. On the "Edit Forecast Query" page that shows, enter your query and then click "Submit" (see the screen shot below).
  4. Poll the resulting Job until it succeeds (see Check a job's status).
  5. Download the job's data (see Download a job's data).

Here's an example of the Edit Forecast Query page:

Query forecasts page