How to get historical forecasts
Get archived past forecasts for a site
What are historical forecasts
When a forecast is generated it is stored in a data base and can be retrieved at a later time. The issue/update time of the forecast is also stored. Therefore, it is possible to do ex-post forecast error analysis when the actual generation or demand data become available.
How to query historical forecasts
To query historical forecasts you will need to provide the following requests parameters.
Start date start_date
Specify the starting target period of the forecast.
Example: "2024-10-18 00:00"
End date end_date
Specify the ending target period of the forecast.
Example: "2024-10-18 23:00"
Reference time as_of
Specify the reference time. The API will return the most recent forecasts which were available at the reference time and cover the period between start_date
and end_date
.
If not provided, then by default the request time is considered as reference time.
Example: "2024-10-17 12:00"
Time zone tz
Specify the time zone. The default time zone is UTC
.
Example: "CET"
In the example below we want to query the forecasts for solar site with ID a923653c-26f1-1b29-955d-ffde5d182276
for the period between 2024-06-28 00:00
and 2024-06-28 01:00
which
were available at 11:00 in the morning the previous day. All times are in UTC.
The response is a serialized table with the following columns:
valid_time
: It contains the target times, i.e. the periods which are forecasted.
forecast
: It contains the forecast values.
model_name
: It contains the names of the models which create the forecasts.
model_version
: It contains the versions of the models which create the forecasts.
update_time
: It contains the issue/update time, i.e. the time when the forecasts were updated.
As it can be seen from the response, the update time for the specific forecasts is 2024-06-27 06:00
UTC.
This is the latest available forecast for the specific target periods issued before 2024-06-27 11:00
UTC.
If the reference time is omitted, the request time is considered as reference time.
In this case the API returns the most recent forecast update which was issued at 2024-06-28 00:00
UTC.
How to query the update times
To query the update times you need to provide the ID of the site. The API will return all the update times of the forecasts that were generated for the specific site.