GROUP_BY_TIME
Description
Converts vector to a grouped vector, by gouping by timespans, so that we have a list of events per timespan. The timespan either is fixed on the latest event, or can be fixed on another time if specified.
GROUP_BY_TIME(Vector<Event>, Scalar<Timespan>)
GROUP_BY_TIME(vector: Vector<Event>, timespan: Scalar<Timespan>): GroupedVector<Time,Event>
Groups the events in the given vector in spans defined by timespan, starting from the latest event.
Parameters
vector
A vector of type Event
timespan
A timespan in which the events should be grouped
Returns
A GroupedVector of type <Time, Event>.
GROUP_BY_TIME(Vector<Event>, Scalar<Timespan>, Scalar<Time>)
GROUP_BY_TIME(vector: Vector<Event>, timespan: Scalar<Timespan>, time: Scalar<Time>): GroupedVector<Time,Event>
Group the vector in the given timespans starting at the given time.
Parameters
vector
A vector of type Event
timespan
A timespan in which the events should be grouped
time
The time form which we want to start grouping.
Returns
A GroupedVector of type <Time, Event>.
Examples
Group events in 1h spans starting from latest event
GROUP_BY_TIME($GridPowerConsumption, 1h)
Group events in 1d spans on full day spans (i.e. 00:00-23:59)
GROUP_BY_TIME($Produced, 1d, lastZeroHour)
Last updated