I have a set of data that has two points; “watts” and a time stamp.
Each data point is separated by 1 second.
So it looks like this:
0:01 100
0:02 110
0:03 133
0:04 280
…..
The data set is a couple hours long.
I’d like to write a query where I can find the maximum average watts for different time periods (5 seconds, 1 minutes, 5 minutes, 20 minutes, ect).
I’d also like to know where in the data set that maximum average took place.
Edit
I think I need to do a query with a moving average and the appropriate bucket (let’s say 10 seconds). Once I get that result, I query that to find the max.
Okay, a guy at work helped me. Here’s the answer in LINQ Pad.