Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs: Apply rank filters to observation searches #138

Closed
synrg opened this issue Nov 15, 2020 · 4 comments
Closed

obs: Apply rank filters to observation searches #138

synrg opened this issue Nov 15, 2020 · 4 comments
Labels
enhancement New feature or request inat 🍃 iNaturalist cog obs iNaturalist observations

Comments

@synrg
Copy link
Collaborator

synrg commented Nov 15, 2020

The ,obs, ,search obs, and ,tab commands should apply rank filters to observations matching the taxon, and not to the taxon search itself. See also #137 wherein I reference this in a comment.

That is, if someone performs a ,search obs hybrid anatidae by me, they very likely want all of their own observations of rank hybrid that are ducks, geese or swans (Anatidae), and not their observations that are in a taxon that is a hybrid that matches "Anatidae" (there is no such taxon!)

@synrg synrg added enhancement New feature or request inat 🍃 iNaturalist cog obs iNaturalist observations labels Nov 15, 2020
@synrg
Copy link
Collaborator Author

synrg commented Nov 15, 2020

On iNat Discord, mws asked:

I think a command that would just spit out all your obs at hybrid level could be nice? (At hybrid and genushybrid simultaneously if possible?)

If this wishlist were coded, I imagine the syntax would be ,s obs hybrid genushybrid by me. Or, if you just wanted your most recent one, ,obs hybrid genushybrid by me, or if you wanted just a link to all of them on the web, ,tab obs hybrid genushybrid by me (though to improve that last one, it would be nice if it had a breakdown of counts by leaf taxon appearing as a table beneath the link).

@synrg
Copy link
Collaborator Author

synrg commented Nov 15, 2020

#136 would need to be done to do the "breakdown of counts by leaf taxon" tabulation mentioned in the prior comment.

@synrg
Copy link
Collaborator Author

synrg commented Nov 15, 2020

Caveat: Just changing the behaviour here without preserving the ability to do the original behaviour loses something important: the ability to filter the taxon by rank is sometimes necessary to disambiguate taxa.

Current behaviour:

You can say ,s obs carex and it will browse all observations that are in Genus Carex (regardless of rank). But if you specify ,s obs subg carex, then you browse all observations that are in Carex subg. carex (regardless of rank).

proposed behaviour:

For the first case (no rank keyword) it will be the same. For the second, ,s obs subg carex would match any Genus Carex that are exactly the rank subgenus, which may not be what was intended.

The confusion is even worse with names that don't just match multiple ranks within the same subtree, but match completely unrelated taxa. Consider ,s obs kites would search for Genus Gasteracantha (Kitespiders), while ,s obs order kites would search for Order Accipitriformes (Hawks, Eagles, Kites, and Allies). Adding order to the query disambiguates between the two. But if we change ,s obs order kites to mean "find all kites that are of rank order are lower", you get zero matches, because "kites" matches a genus and genera don't contain orders!

So we need to think carefully about this ambiguity we've introduced between filter on taxon and filter on observations.

@synrg
Copy link
Collaborator Author

synrg commented Aug 22, 2021

This is now possible with the addition of rank to the list of supported opt arguments. You can do ,s my anatidae opt rank=hybrid to match all your Anatidae that are of the specific rank hybrid. This option also accepts a comma-delimited list to match observations in any of the specific ranks listed, e.g. ,s my birds opt rank=hybrid,genushybrid to match your birds either at hybrid or genushybrid rank.

Please note: as per other opt options, Dronefly does no processing of the argument. That means you must use the exact name of the rank here and cannot use the convenient abbreviations that Dronefly supports for the taxon rank filter, like ssp for subspecies. Until there is demand for it beyond a handful of advanced users who might want to do this kind of search, it's not something that will go higher in my list of priorities to make any easier. At least there's now a way to do this kind of search in Dronefly, even if it's a bit fiddly to use.

@synrg synrg closed this as completed Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request inat 🍃 iNaturalist cog obs iNaturalist observations
Projects
None yet
Development

No branches or pull requests

1 participant