Group By Timerange

Hello Everybody,

I need your help to group my data by DateTime Column.
For each 3 second I need to calculate the range of speed of vehicles (Max - Min) .

My second question is what is the best way to cluster this data by behaviour of the driver?
I used K-means (Speed and RPM-Egine) but the results was not really clear.

Thanks in advance.


If you provide a sample dataset and a bit more clarification of your question then I think I can help you.


I have a sensor dataset (Timestamp (every 30ms) / Vehiclespeed / RPM Engine)
I want to do a group by every 3 s and calculate the range value (Max - Min)

I guess what you are looking for is the “Window Loop Start” node in which you can loop over chunks based on date&time column. So you can find the range in the loop by a Math Formula (using COL_MAX() & COL_MIN() functions) node or you can label each chunk (for example by using the iteration number) and then after ending the loop, use a GroupBy node and group on the labels then find the max and min of the column you want then calculate the range (this way you have one row for each group).


1 Like

Sorry for misunderstanding me, my english is not so good to explain well!
I don’t want to calculate the range time value, I already defined it (it’s 3 Seconds)
I want to calculate for each 3 seconds the range of the values ( speed and RPM )
I think the group by node very relevant for my problem but I need to do it for every 3s :slight_smile:
Thanks in advance

I think I had understood your question but maybe I couldn’t express my answer clearly.

By using the Window loop start you can loop over chunks of data based on your time column which has an instance every 30 ms and you want to measure another column in groups of 3 seconds (you want to group your data in 3 seconds duration. All the instances within each 3 seconds to be in a same group then you measure the range of another column). You set the window size and the step in the node to 3 seconds and then in each loop iteration you have the rows in every 3 seconds, then you can measure the range of any other column for that 3 seconds.

However, if you provide me with a sample data, I will build a workflow for you to make everything clear.



Ive done it Thanks !

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.