solarforecastarbiter.datamodel.Observation

class solarforecastarbiter.datamodel.Observation(name: str, variable: str, interval_value_type: str, interval_length: pandas._libs.tslibs.timedeltas.Timedelta, interval_label: str, site: solarforecastarbiter.datamodel.Site, uncertainty: float, observation_id: str = '', provider: str = '', extra_parameters: str = '')[source]

A class for keeping track of metadata associated with an observation. Units are set according to the variable type.

Parameters:
  • name (str) – Name of the Observation
  • variable (str) – Variable name, e.g. power, GHI. Each allowed variable has an associated pre-defined unit.
  • interval_value_type (str) – The type of the data in the observation. Typically interval_mean or instantaneous, but additional types may be defined for events.
  • interval_length (pandas.Timedelta) – The length of time between consecutive data points, e.g. 5 minutes, 1 hour.
  • interval_label ({'beginning', 'ending', 'instant', 'event'}) – Indicates if a time labels the beginning or the ending of an interval average, indicates an instantaneous value, or indicates an event.
  • site (Site) – The site that this Observation was generated for.
  • uncertainty (float) – A measure of the uncertainty of the observation values. The format will be determined later.
  • observation_id (str, optional) – UUID of the observation in the API
  • provider (str, optional) – Provider of the Observation information.
  • extra_parameters (str, optional) – Any extra parameters for the observation
__init__(name: str, variable: str, interval_value_type: str, interval_length: pandas._libs.tslibs.timedeltas.Timedelta, interval_label: str, site: solarforecastarbiter.datamodel.Site, uncertainty: float, observation_id: str = '', provider: str = '', extra_parameters: str = '') → None

Methods

__init__(name, variable, …)
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

extra_parameters
observation_id
provider