openaq / openaq-api-v2

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

Feature/merge trends and measurements #336

Closed caparker closed 7 months ago

caparker commented 7 months ago

Adds the trends methods: day of week, hour of day and month of year to the sensors/:id/measurements endpoint. To do this we had to use the period model instead of the factor model and I think there could be some improvements we could make to that model. For example, when grouping by day the period has a straight forward first and last datetime of that period. But when grouping by day of week its more complicated. Closes issue #335