I am trying to find the last low “pivot” point in a time series table using Flux. By low “pivot” point I mean the data point that is lower than its three previous data points and three next data points (time wise). I want to identify the last low “pivot” point and retrieve its value as well as its timestamp from the table.
I have tried using the reduce() function along with filter() and map() functions, but I am facing issues with the array operations such as slice() and min(), as they are not available in Flux.
Can you please help me with an example query or suggest an alternative approach to achieve this low “pivot” point identification using Flux?
My table looks like this and there is no “na” value:
_time | _value
2023-03-07 18:00:00 | 14.1
2023-03-07 19:00:00 | 28.7
2023-03-07 20:00:00 | 42.7
2023-03-07 21:00:00 | 56.8