skalnik / aqi-wtf

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

Switch to a variant of the options used by the purpleair map when fetching data.json #15

Closed obra closed 3 years ago

obra commented 3 years ago

The version we used before fetched approximately 640k of data. This fetches about 260k of data. That's still pretty nutty when we're just trying to find the nearest sensor. But it's a lot friendlier on users network stacks and purpleair's servers

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/skalnik/aqi-wtf/cghpfdwjv
✅ Preview: https://aqi-wtf-git-fork-obra-lighter-data-json.skalnik.vercel.app

skalnik commented 3 years ago

Oh nice! I initially tried to limit the amount of sensor data with their nwLat, nwLng, seLat, seLng, but I started getting back null for the actual coordinates of the sensors. I didn't think about just limiting what fields we got.

PurpleAir commented 2 years ago

"with their nwLat, nwLng, seLat, seLng, but I started getting back null for the actual coordinates", can you confirm this is still true? You should be able to limit the sensors returned with a bounding box and get back exactly the same data as without it for the sensors returned.