solarforecastarbiter.datamodel.Forecast

class solarforecastarbiter.datamodel.Forecast(name: str, issue_time_of_day: datetime.time, lead_time_to_start: pandas._libs.tslibs.timedeltas.Timedelta, interval_length: pandas._libs.tslibs.timedeltas.Timedelta, run_length: pandas._libs.tslibs.timedeltas.Timedelta, interval_label: str, interval_value_type: str, variable: str, site: solarforecastarbiter.datamodel.Site, forecast_id: str = '', extra_parameters: str = '')[source]

A class to hold metadata for Forecast objects.

Parameters:
name : str

Name of the Forecast

issue_time_of_day : datetime.time

The time of day that a forecast run is issued, e.g. 00:30. For forecast runs issued multiple times within one day (e.g. hourly), this specifies the first issue time of day. Additional issue times are uniquely determined by the first issue time and the run length & issue frequency attribute.

lead_time_to_start : pandas.Timedelta

The difference between the issue time and the start of the first forecast interval, e.g. 1 hour.

interval_length : pandas.Timedelta

The length of time between consecutive data points, e.g. 5 minutes, 1 hour.

run_length : pandas.Timedelta

The total length of a single issued forecast run, e.g. 1 hour. To enforce a continuous, non-overlapping sequence, this is equal to the forecast run issue frequency.

interval_label : str

Indicates if a time labels the beginning or the ending of an interval average, or indicates an instantaneous value, e.g. beginning, ending, instant.

interval_value_type : str

The type of the data in the forecast, e.g. mean, max, 95th percentile.

variable : str

The variable in the forecast, e.g. power, GHI, DNI. Each variable is associated with a standard unit.

site : Site

The predefined site that the forecast is for, e.g. Power Plant X or Aggregate Y.

forecast_id : str, optional

UUID of the forecast in the API

extra_parameters : str, optional

Extra configuration parameters of forecast.

See also

Site

Methods

from_dict(dict_[, raise_on_extra]) Construct a dataclass from the given dict, matching keys with the class fields.
to_dict() Convert the dataclass into a dictionary suitable for uploading to the API.
__init__(name: str, issue_time_of_day: datetime.time, lead_time_to_start: pandas._libs.tslibs.timedeltas.Timedelta, interval_length: pandas._libs.tslibs.timedeltas.Timedelta, run_length: pandas._libs.tslibs.timedeltas.Timedelta, interval_label: str, interval_value_type: str, variable: str, site: solarforecastarbiter.datamodel.Site, forecast_id: str = '', extra_parameters: str = '') → None

Methods

__init__(name, issue_time_of_day, …)
from_dict(dict_[, raise_on_extra]) Construct a dataclass from the given dict, matching keys with the class fields.
to_dict() Convert the dataclass into a dictionary suitable for uploading to the API.

Attributes

extra_parameters
forecast_id