openaq / openaq-api-v2

OpenAQ API
https://api.openaq.org
43 stars 9 forks source link

order_by parameter in /v2/measurements api call has no effect #261

Closed jeffmcwhirter closed 1 year ago

jeffmcwhirter commented 1 year ago

Hi OpenAQ folks, The order_by param in /v2/measurements seems to not have any effect. e.g., calling: curl "https://api.openaq.org/v2/measurements?format=csv&limit=10&sort=asc&order_by=datetime&date_from=2023-09-07T12%3A42&date_to=2023-09-14T12%3A42&location_id=8689" > 8689.csv

Results in (see attached): locationId,location,city,country,utc,local,parameter,value,unit,latitude,longitude 8689,Denver Swansea Eleme,,US,2023-09-08T00:00:00+00:00,2023-09-08T00:00:00+00:00,pm10,18.0,µg/m³,39.781083,-104.95665 8689,Denver Swansea Eleme,,US,2023-09-10T00:00:00+00:00,2023-09-10T00:00:00+00:00,pm10,32.0,µg/m³,39.781083,-104.95665 8689,Denver Swansea Eleme,,US,2023-09-08T01:00:00+00:00,2023-09-08T01:00:00+00:00,pm10,27.0,µg/m³,39.781083,-104.95665 ...

This is also not working for the JSON output. I have a workaround for this so it is not critical

Thanks Jeff

8689.csv

russbiggs commented 1 year ago

@majesticio can you take a look at this?

majesticio commented 1 year ago

resolved by #263

jeffmcwhirter commented 1 year ago

Thanks! You OpenAQ folks are great

russbiggs commented 1 year ago

Sure thing, this will be in next week's release on 9.20.2023