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 = '', 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 : 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

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

extra_parameters : str, optional

Any extra parameters for the observation

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, 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 = '', extra_parameters: str = '') → None

Methods

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