ribbit-network-dashboard icon indicating copy to clipboard operation
ribbit-network-dashboard copied to clipboard

Only query data for sensors that are visible on the map

Open brianstrauch opened this issue 4 years ago • 3 comments

The map is 2D, so we only need to query and render the sensors that are visible on the map. Approach: find the (lat, lon) of the top left and bottom right corners of the map and pass those coordinates to the InfluxDB query.

https://docs.influxdata.com/influxdb/cloud/query-data/flux/geo/filter-by-region/#box

brianstrauch avatar Sep 11 '21 02:09 brianstrauch

That would be a great improvement for sure as the number of sensors grows.

keenanjohnson avatar Sep 13 '21 18:09 keenanjohnson

Hello,

It looks like at the moment, sensor data is queried only for specific sensors

https://github.com/Ribbit-Network/ribbit-network-dashboard/blob/bd8050df06d0514dea20e99916c39e8e7d9e7d20/db.py#L21-L24

Is this about the other query, and having a lat lon filter there? https://github.com/Ribbit-Network/ribbit-network-dashboard/blob/bd8050df06d0514dea20e99916c39e8e7d9e7d20/db.py#L9-L14

sriki18 avatar Oct 09 '21 01:10 sriki18

@sriki18 Yep, this issue is for the top query (the map data query)

brianstrauch avatar Oct 09 '21 16:10 brianstrauch