Aggregation
When the resolution of data is different from the resolution of the corresponding time series it becomes necessary to condense or spread the data as needed in order to obtain feasible results.
Examples
- A time series stores daily consumption records. The data is read out for an entire year as one value.
- A sensor provides hourly values. The data is stored on a time series with a 15 minute interval.
In the context of HAKOM time series as well as in this documentation, both operations in the above examples are refered to as aggregation.
Aggregation Methods
Different use cases require different methods of aggregation to provide feasible results. The following aggregation methods are currently available:
- Sum
- Average
- Min
- Max
- MostFrequently
- AtTheMoment
- AbsMin
- AbsMax
Order of Aggregation Methods
There are multiple ways to apply an aggregation method to a data operation and an inherent order controls which method will be applied in case more than one aggregation method would be applicable. The possible configuration options are listed here in the order they will be overruled (eg. an aggregation method configured in the master data of a time series will overrule the aggregation method specified for the unit assigned to this time series).
Unit
Certain units are preconfigured in the HAKOM database and have an aggregation method assigned to them. These entries can be changed, deleted or extended as needed, more information can be found here: Units and aggregation rules
Time Series
Each time series may have it's own aggregation method configured as part of the time series master data. More information on time series master data can be found here: Define time series
Formula References
For formula time series it's possible to specify the aggregation method that will be used when resolving a time series reference in the formula. More information can be found here: Formulas and time series
Data Request
When reading out data via the WebTSM Services it is possible to specify the desired aggregation method for a singular request. More detailled information can be found at the documentation of relevant endpoints here: Open API Reference
Sum
Values are summed up when condensing multiple values from short intervals over a longer time period and divided proportionally when spreading a value over multiple intervals.
Average
Values are averaged out when condensing multiple values from short intervals over a longer time period and repeated when spreading a value over multiple intervals.
Min
Provides the lowest value in the selected time period when condensing multiple values. When spreading a value over multiple intervals "Min" behaves like "Average".
Max
Provides the highest value in the selected time period when condensing multiple values. When spreading a value over multiple intervals "Max" behaves like "Average".
Most Frequently
Provides the most frequently used value in the selected time period when condensing multiple values. In case multiple values occur with the same frequency, the chronologically last of these values will be returned. When spreading a value over multiple intervals "Most Frequently" behaves like "Average".
At The Moment
Provides the first value in the selected time period when condensing multiple values. Values with the flag "Missing" will be ignored by this aggregation method. When spreading a value over multiple intervals "At The Moment" behaves like "Average".
Last Value
This aggregation method has been added in patch version 3.9.2.2
Provides the last value in the selected time period when condensing multiple values. Values with the flag "Missing" will be ignored by this aggregation method. When spreading a value over multiple intervals "Last Value" behaves like "Average".
AbsMin
Similar to the aggregation method "Min" this method provides the lowest absolute value in the selected time period when condensing multiple values, ignoring positive/negative signs. When spreading a value over multiple intervals "AbsMin" behaves like "Average".
AbsMax
Similar to the aggregation method "Max" this method provides the highest absolute value in the selected time period when condensing multiple values, ignoring positive/negative signs. When spreading a value over multiple intervals "AbsMax" behaves like "Average".
Further Information
We recommend the following videos under Video Tutorials:
- Aggregation
- Behaviour of Flags During Data Aggregation