dronefly
dronefly copied to clipboard
ebird: Display most recent sighting for a species for a location
Requested by upupa-epops on eBird Discord #bot-commands:
Dec. 4, 2019
[12:49 AM AST] upupa-epops: Bring up the latest report of a specific species at a certain location [12:49 AM AST] upupa-epops: that would be super useful
- needs to understand what "a species" is (e.g. like inatcog's "taxon" command)
- needs to understand what "a location" is (no support for this in inatcog, yet, but it needs something too; the ebirdcog 'hybrids' command understands only codes, and not text queries; ideally both cogs would handle text queries as well as codes
- needs to do the lookup on species & lookup on location, then do the lookup on most recent for species at the location
- needs to format an embed that contains the results
For official eBird locations, eBird does this itself partially on the location pages, e.g.:
- List of every species in Ontario in order of which was seen most recently: https://ebird.org/canada/subnational1/CA-ON?yr=all&m=
- List of every species in taxonomic order with the date it was most recently seen: https://ebird.org/canada/region/CA-ON/media?yr=all&m=
What I mean by points 1 thru 3, more specifically, is that unlike the iNat API which provides endpoints for looking up things (taxa, regions) by name, the eBird API provides no endpoints like that. Thus, we'd need to retrieve their entire taxonomy & all regions known to eBird, then build our own indices before we could support such lookups.
This is a huge blocker for further eBird development. I'm not really interested in writing & maintaining such code. I also wonder what other projects calling into the eBird API are doing to solve these problems. If there is code already written to do these things (region code lookups & species code lookups), I'd be very interested to look it over.
See also issue #55 which should be done first. Especially see my most recent comment on that issue: I have a lead on possibly getting some help to make it happen.