RolnickLab / antenna

GNU General Public License v3.0
11 stars 3 forks source link

New filters for Occurrences #608

Closed mihow closed 1 week ago

mihow commented 2 weeks ago

Added the following date filter query params:

These should be in ISO format (2023-01-01) and are assumed to be in the same local timezone that the occurrence timestamps are in.

These filters can have multiple instances and will be converted into lists

Include or exclude multiple like: http://localhost:8000/api/v2/occurrences/?not_algorithm=6&not_algorithm=3 http://localhost:8000/api/v2/occurrences/?algorithm=6&algorithm=3

This may look strange but this is how html multi-select forms will create the query params if you submit them in a GET request.

Filters for the identification status:

netlify[bot] commented 2 weeks ago

Deploy Preview for ami-dev canceled.

Name Link
Latest commit a38fae4402ff7fd06eb5405ed6fadb2fa689fa7e
Latest deploy log https://app.netlify.com/sites/ami-dev/deploys/6735d47ae697e400089b4a7a
annavik commented 1 week ago

I included some UI controls for for algorithm filters. To start with, the user can set a single value for each filter. We populate the options by calling /ml/algorithms.

Skärmavbild 2024-11-12 kl  14 40 19

Let me know what you think. Is setting multiple values important for example?

Next up, date filtering! :)

mihow commented 1 week ago

Fantastic, thanks @annavik! I think single selection is great for now!

mihow commented 1 week ago

@annavik added filters for the identification status! added details to the PR description

annavik commented 1 week ago

Woho! Thanks for the new filters!!

Skärmavbild 2024-11-13 kl  11 36 06

annavik commented 1 week ago

Added a ticket for UI controls to "identified by": https://github.com/RolnickLab/antenna/issues/615

We must figure out how to define the list of users to show, but I don't want that to be a blocker for this PR! :)

mihow commented 1 week ago

@annavik I changed "identified" -> "verified" as you pointed out, thanks! I also re-ordered a few of the filters. I wonder if we can make it easier to define sections instead of only Filters & Advanced filters? I moved Stations to advanced for Occurrences, but left it under regular Filters for Taxa, since that page doesn't have any other filters.

Also! I swapped out VerifiedBy for VerifiedByMe! Which is a boolean filter to check what has been verified by the currently logged-in user. We can test that in #615