how to get full active sensors id table #43
Replies: 2 comments
-
There is no construct of cities within the API, because this is highly subjective geographically. Instead of using the radius and coordinate method I recommend the bounding box parameter: https://docs.openaq.org/using-the-api/geospatial#bounding-box locations = client.locations.list(limit = 1000, bbox=[-119.115567,33.514103,-117.138028,34.344752]) This bounding box covers most of Los Angeles. Given a GeoJSON or shapefile of a city boundary theres an abundant number of libraries and tools that can help define the bounding box. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I found there is a new R package [openaq]. I am trying to use it instead. I want get daily PM2.5 data for a city(eg Los Angeles). There is how I do it. But I think its may not be the best way. Do you have some recommendation: load pacakge
Step 1 get city box coordinatefind Los Angeles latitude and longitude
make a box
Step 2 get location which have PM2.5 data at past 10 day
Step 3 get sensor with first locationusing first location within box coordinate
filter pm2.5 sensor
Step 4 get daily PM2.5 measurement data from sensor since 2024-01-01
|
Beta Was this translation helpful? Give feedback.
-
May I ask how to get full active sensors id table include senior id and city name?So that we could search certain city measurement data.
I try to use locations API to find sensors, but its require city coordinates and the active sensors may be outside city center 25000 radius range.
Beta Was this translation helpful? Give feedback.
All reactions