Git Product home page Git Product logo

Comments (2)

budowski avatar budowski commented on July 18, 2024

Seems like an issue with the API - for example:
Retrieving page number 5 of the observers list for Australia+Fungi:
https://api.inaturalist.org/v1/observations/observers?page=5&per_page=30&taxon_id=47170&place_id=6744&quality_grade=needs_id,research&order_by=created_at&order=desc

Same call, just with page number 6:
https://api.inaturalist.org/v1/observations/observers?page=6&per_page=30&taxon_id=47170&place_id=6744&quality_grade=needs_id,research&order_by=created_at&order=desc

Notice that in both responses, for example - the user named "wazzza" appears (with obseration_count = 315).

@pleary - what do you think?

from inaturalistandroid.

pleary avatar pleary commented on July 18, 2024

Observer counts will unfortunately always be approximate, and may vary from request to request (see this section and the following sections for more information from the Elasticsearch documentation).

We can set some parameters like shard_size to help counts be more accurate. I've updated the shard_size we use when the requests is for results up to 500 deep in the result set, and that appears to have helped this case - userwazzza is no longer appearing in that second URL. When making multiple requests for pagination, there is unfortunately always a chance that some results might get repeated in different result sets. One way to avoid repeats is to request the maximum number of observers (500) in a single request. Another would be do code around it on the client side - suppressing potential duplicates in later pages.

from inaturalistandroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.