iobridge / thingspeak

ThingSpeak is an open source “Internet of Things” application and API to store and retrieve data from things using HTTP over the Internet or via a Local Area Network. With ThingSpeak, you can create sensor logging applications, location tracking applications, and a social network of things with status updates.
https://thingspeak.com
Other
1.04k stars 329 forks source link

Average aggregator works wrong when there are missing values for the period #45

Open KonishchevDmitry opened 8 years ago

KonishchevDmitry commented 8 years ago

Hi! I've noticed that average aggregator works wrong when there are missing values for the period.

Here I got an aggregated chart (generated by https://thingspeak.com/channels/134669/charts/3?title=CO2%20concentration&xaxis=&yaxis=&width=auto&days=1&average=10): Aggregated

As you can see there is a gap at 22:00:00, but if we look on non-aggregated chart (generated by https://thingspeak.com/channels/134669/charts/3?title=CO2%20concentration&xaxis=&yaxis=&width=auto&start=2016-09-11%2021:00:00&end=2016-09-11%2023:00:00&offset=3): Non-aggregated we'll see that the gap was an aggregation error due to missing data.