solarforecastarbiter.datamodel.EventForecast

class solarforecastarbiter.datamodel.EventForecast(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: Optional[solarforecastarbiter.datamodel.Site] = None, aggregate: Optional[solarforecastarbiter.datamodel.Aggregate] = None, forecast_id: str = '', provider: str = '', extra_parameters: str = '')[source]

Extends Forecast dataclass to include event forecast attributes.

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. This is assumed to be a UTC time.
  • 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 ({'event'}) –
  • interval_value_type (str) – The type of the data in the forecast, e.g. mean, max, 95th percentile.
  • variable ({'event'}) –
  • site (Site or None) – The predefined site that the forecast is for, e.g. Power Plant X.
  • aggregate (Aggregate or None) – The predefined aggregate that the forecast is for, e.g. Aggregate Y.
  • forecast_id (str, optional) – UUID of the forecast in the API
  • provider (str, optional) – Provider of the Forecast information.
  • extra_parameters (str, optional) – Extra configuration parameters of forecast.
__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: Optional[solarforecastarbiter.datamodel.Site] = None, aggregate: Optional[solarforecastarbiter.datamodel.Aggregate] = None, forecast_id: str = '', provider: str = '', extra_parameters: str = '') → None

Methods

__init__(name, issue_time_of_day, …)
from_dict(input_dict[, raise_on_extra]) Construct a dataclass from the given dict, matching keys with the class fields.
replace(**kwargs) Convience wrapper for dataclasses.replace() to create a new dataclasses from the old with the given keys replaced.
to_dict() Convert the dataclass into a dictionary suitable for uploading to the API.

Attributes

aggregate
extra_parameters
forecast_id
provider
site