# solarforecastarbiter.datamodel.AggregateObservation¶

class solarforecastarbiter.datamodel.AggregateObservation(observation: solarforecastarbiter.datamodel.Observation, effective_from: pandas._libs.tslibs.timestamps.Timestamp, effective_until: Optional[pandas._libs.tslibs.timestamps.Timestamp] = None, observation_deleted_at: Optional[pandas._libs.tslibs.timestamps.Timestamp] = None)[source]

Class for keeping track of an Observation and when it is added and (optionally) removed from an Aggregate. This metadata allows the Arbiter to calculate the correct quantities while the Aggregate grows or shrinks over time.

Parameters: observation (Observation) – The Observation object that is part of the Aggregate effective_from (pandas.Timestamp) – The datetime of when the Observation should be included in the Aggregate effective_until (pandas.Timestamp) – The datetime of when the Observation should be excluded from the Aggregate observation_deleted_at (pandas.Timestamp) – The datetime that the Observation was deleted from the Arbiter. This indicates that the Observation should be removed from the Aggregate, and without the data from this Observation, the Aggregate is invalid before this time.
__init__(observation: solarforecastarbiter.datamodel.Observation, effective_from: pandas._libs.tslibs.timestamps.Timestamp, effective_until: Optional[pandas._libs.tslibs.timestamps.Timestamp] = None, observation_deleted_at: Optional[pandas._libs.tslibs.timestamps.Timestamp] = None) → None

Methods

 __init__(observation, effective_from, …) 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

 effective_until observation_deleted_at