Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/explore: Available data is misleading based on zoom level #24

Open
pdille opened this issue Dec 9, 2020 · 7 comments
Open

/explore: Available data is misleading based on zoom level #24

pdille opened this issue Dec 9, 2020 · 7 comments
Assignees

Comments

@pdille
Copy link
Contributor

pdille commented Dec 9, 2020

I pulled up some channels to see when data was available and the way the bar graphs are drawn depending upon zoom level is quite misleading. In the first image you'll see that it appears there is data available up to and a little past 6am on the 8th. But then when you zoom in, you see that there is not data for the 8th and only up to about 22:00 on the 7th.

In my personal opinion, I find these new bars very confusing and very much preferred the line charts of before.

esdr1

esdr2

@dognotdog
Copy link
Contributor

@chrisbartley
Copy link
Member

Possible solutions (not intended to be mutually exclusive...an ideal implementation would employ them all):

  1. For sensors where the sample rate is fixed, make use of a feed's channelSpecs field, which stores (or could store) the sample interval. E.g., we know Airnow's sample interval is 1 hour, there's also some fixed interval at which we're pulling PurpleAir data, etc. If the sample interval isn't in the feed's channelSpecs already, it wouldn't be hard to insert sample intervals into the majority of feeds people care about (EPA, PurpleAir, etc).
  2. As a fallback for the above, the grapher could try to "sense" the sample interval by just looking at the gaps between samples. This would also be a reasonable solution for devices where sample rate isn't fixed (e.g. a Speck's sample interval is user configurable).
  3. As a last resort, decide that bars can never be wider than N seconds. E.g perhaps 3600s would be a reasonable start, even for sensors that sample at a faster rate. We could just decide that, after N/2 seconds (assuming bars are centered on the sample timestamp), a sample is "stale" and the value should no longer be considered accurate.

@dognotdog dognotdog transferred this issue from CMU-CREATE-Lab/esdr Feb 22, 2021
@rsargent
Copy link
Member

Bumping this. We keep getting complaints that we're misrepresenting RAMP data from Albert.

@dognotdog
Copy link
Contributor

@rsargent @chrisbartley as far as I can tell, this is a limitation of using tiles, as at some increased zoom tiles simply don't contain many samples any more, and the grapher actually tries to widen the bars, to fill the tile, instead of showing a single blip. Eventually, it'll just show nothing when the zoom level is high enough and the tiles are all empty. Limiting zoom isn't simple when some channels only have one sample every 24h.

What do you suggest should happen in these cases? I imagine if we get empty tiles, we could fall back to the raw data API, though there is no allowance for that, currently, and going further, when no samples exist within the shown window, what would be the mechanism to get the nearest samples outside the window?

@rsargent
Copy link
Member

rsargent commented Oct 11, 2021 via email

@dognotdog
Copy link
Contributor

That does bring up the whole UI question again... it is possible to switch to lines instead of bars, but that option is currently hidden in the interface, see #15 and this view.

In either case it doesn't solve the problem of zooming in too far eventually resulting in zero samples being visible.

@rsargent
Copy link
Member

rsargent commented Oct 11, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants