I do have the exact same question I think - I want to show some averaged out numbers (charts, lines) that provide a hint how some measurement are changing in general, i.e. smoothed out, but max/min at the correct timestamps. There is moving_average function, but it’s shifted to later times (to the right) - the moving_average() function takes the past individual measurements to calculate the average at a given time.
In a picture:
Since it would be more useful (at least for me) to understand at what time a measurement is e.g. maximal I would like to have something like a centered_moving_average function. From a mathematical viewpoint that function would take n/2 measurements to the left and n/2 to the right at a given point to calculate the average.
In the example (graph) shown above I would like to see the moving_average() showing the maximum around 12:00 (at which time the actual measurement was really showing the maximum).
Is there such a function around or possibly a simple kind of ‘shift’ to the moving_average() query that I overlooked?