menu
DETELINA IVANOVA
Feb. 9, 2022
3:44 p.m. PST

uploaded/posted forecast uuid and meta data

I have two questions about our forecasts we are uploading:
1) what uuid we need to use for our forecasts?
2) do we need to create and upload meta data for our forecasts?
2 Replies

Leland Boeman
Feb. 9, 2022
4:51 p.m. PST
Hi Detelina,

To answer your second question, you do not need to create any metadata for the competition. All of the necessary Forecast metadata has been created for you. You should have received an email with your Teams assigned forecasts and Reports.


The UUIDS for each forecast's percentiles are available as the "constant_values" fields of the Probabilistic Forecasts we have provided you.

There are a couple ways to retrieve these UUIDS.

You could follow the links in that email, and scroll down to the list of "constant value forecasts" and use those links to manually collect the UUIDS. This will be a tedious process for all 110 percentiles (10 sites X 11 percentiles each).

If you are using python and the solarforecastarbiter package, you may use session.get_probabilistic_forecast(<uuid>) (documented here: function which returns the probabilistic forecast metadata in the form of a ProbabilisticForecast object (see https://solarforecastarbiter-core.readthedocs.io/en/latest/generated/solarforecastarbiter.datamodel.ProbabilisticForecast.html#solarforecastarbiter.datamodel.ProbabilisticForecast). The returned object will have a constant_values property which is a list of ProbabilisticForecastConstantValues objects, each of which has a constant_value property (the percentile) and a forecast_id field that is the correct UUID to post to for that percentile of that Probabilistic Forecast.

An implementation of the above explanation might look something like:

forecast = session.get_probabilistic_forecast(<uuid>)
constant_value_forecastss = forecast.constant_values
for constant_value_forecast in constant_values:
forecast_uuid = constant_value_forecast.forecast_id
percentile = constant_value_forecast.constant_value
percentile_series = my_forecast_dataframe[percentile]
session.post_probabilistic_forecast_constant_value_values(forecast_uuid, percentile_series)

If you are using a language other than Python, you will need to interact directly with the SFA Rest API. The code should serve as a basis for parsing the needed uuids, plus some boilerplate code to setup HTTP requests and parse json. The documentation of the following API endpoints will be of interest:

Get probabilistic forecast metadata: https://api.solarforecastarbiter.org/#tag/Probabilistic-Forecasts/paths/~1forecasts~1cdf~1{forecast_id}/get
Post probabilistic forecast constant value data: https://api.solarforecastarbiter.org/#tag/Probabilistic-Forecasts/paths/~1forecasts~1cdf~1single~1{forecast_id}~1values/post


Hopefully that helps. Please let us know if you have any further questions.

DETELINA IVANOVA
Feb. 9, 2022
6:42 p.m. PST
Thank you! This helps.
Post Your Reply