skalnik / aqi-wtf

😷 WTF is the AQI near me right now?!
https://aqi.wtf
MIT License
44 stars 12 forks source link

Use 10 minute average instead of instantaneous data #50

Open skalnik opened 3 years ago

skalnik commented 3 years ago

Someone requested we use the 10 minute average instead of the latest value. I think that'd be good, but I believe we'll need to poll ThingSpeak instead of PA for that. Unsure how hard that'd be to implement, but I wanted to make note of it.

obra commented 3 years ago

Is there a -reason- they want the 10 minute averages?

One -possible- alternative to using the thingspeak API would be to compute our own rolling 5 or 10 minute average if we have the data and the sensor we're polling hasn't changed.

obra commented 3 years ago

(I don't believe that there's no reason to want 10 minute averages or that those averages aren't better. I am absolutely not skilled in that side of things. But I'm a big fan of documenting the "why" of changes.

skalnik commented 3 years ago

They said they preferred the 10 minute average to avoid sudden spikes/dips and smooth those out. I think that's fair, but also not a huge problem. I promised I'd document this but I'm not sure it's a huge priority.

obra commented 3 years ago

If we end up going down that path, it might be interesting to also look at averaging data from multiple sensors, ideally ones we're in the middle of. But that may be a really bad idea in non-densely-covered areas.

On Thu, Sep 10, 2020, at 2:44 PM, Mike Skalnik wrote:

They said they preferred the 10 minute average to avoid sudden spikes/dips and smooth those out. I think that's fair, but also not a huge problem. I promised I'd document this but I'm not sure it's a huge priority.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/skalnik/aqi-wtf/issues/50#issuecomment-690748531, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALC2AGKJWEALYYUA67JU3SFFCFPANCNFSM4REMNFEQ.