Closed rsargent closed 3 years ago
This should be fairly easy, I think, simply checking the maxTimeSeconds field for each feed when enumerating. It might be possible to do when querying, depending on how the feeds are loaded, but then would require re-querying as the user toggles the option.
More detail...
For example, this returns IDs of all public Specks with a maxTimeSecs greater than 1500690855:
https://esdr.cmucreatelab.org/api/v1/feeds?where=productId=9,maxTimeSecs%3E1500690855&fields=id
By "easy", above, I mean that no back end changes should be necessary.
Oh, I should mention that this where clause filtering isn't supported when enumerating feeds contained within a multifeed. That is, this will still return all 1037 feeds in the "pm_25" multifeed.
https://esdr.cmucreatelab.org/api/v1/multifeeds/pm_25/feeds?where=id=2912&fields=id
So, in the case of feeds obtained from a multifeed, they'll need to be filtered by date on the client side. Which shouldn't be a big deal.
Randy said:
It would be great to have a dropdown or something that says
V Show sensors with data in last month
by default, with other options being something like
Option, default turned on, to filter results by feeds that have data in the past 30 days. Maybe it could go in the search results?
When showing RAMP sites, half or more are decommissioned locations.