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

Implement use of per to support ,tab obs...per <place> #130

Open
michaelpirrello opened this issue Aug 27, 2020 · 2 comments
Open

Implement use of per to support ,tab obs...per <place> #130

michaelpirrello opened this issue Aug 27, 2020 · 2 comments
Labels
enhancement New feature or request inat 🍃 iNaturalist cog place iNaturalist places

Comments

@michaelpirrello
Copy link
Collaborator

Per original discussion in #trips-and-meetups, and subsequent discussion in #coding, implement use of ...per in order to achieve something like ,tab obs by me per where place is of a place type maintained by iNaturalist.org (continent, country, state, county).

@michaelpirrello michaelpirrello added enhancement New feature or request inat 🍃 iNaturalist cog labels Aug 27, 2020
@synrg
Copy link
Collaborator

synrg commented Aug 27, 2020

Given an optional place to find them within (though except for the largest places, it's probably a good idea to include one), and a place type to enumerate, we can efficiently retrieve all matching places with this API call, e.g. to get all counties in Pennsylvania:

https://www.inaturalist.org/places.json?per_page=200&ancestor_id=42&place_type=county

We don't need to create Place objects for the results, but just want the ids from each record.

Here's where it gets tricky and makes me wonder if we can do the feature at all right now. With the current API we can't actually do a single API call that retrieves a place breakdown, and iterating over all places, doing one API call per place would take a significant amount of time for even modest sized data sets, being rate-limited at one API call per second per place. Even if broken into smaller sized pages it will still be several seconds to produce each page. I don't think this will be a wonderful user experience.

@synrg
Copy link
Collaborator

synrg commented Aug 27, 2020

Since it seems we need some iNat dev help for this, unless I've overlooked some API call that already does this, I have asked about it on the forums here: https://forum.inaturalist.org/t/observation-species-counts-per-place-type-within-a-place/15775

@synrg synrg added the place iNaturalist places label Aug 30, 2020
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 place iNaturalist places
Projects
None yet
Development

No branches or pull requests

2 participants