Overview statistics of all countries

it’s possible to pull this data via the API. however, given the number of countries, the available API endpoints, and API request limits, you’d have to purposely limit the rate at which you pull the data. roughly, 200 countries x 4 types of data (obs, species, observers, identifiers) = 800 requests. if you do 1 request per second (the recommended limit), then that’s at least 13 minutes to get the data.

it wouldn’t be difficult to make something to get the data. it just wouldn’t be a very satisfying experience to actually run the thing to pull the data.

if you want to display this on an actual map with country polygons (for choropleth or whole-country clickability), then you’d either have to have to provide your own set of country polygons, or else you’d have to get those on the fly via the API (which would be an additional burden). if you didn’t want the polygon burden but still wanted to see the data on a map, you could still display it as some sort of marker or set of markers.

and then there’s the question of stuff that’s not in a particular country…

the alternative would be to create a project for each country and then an umbrella project for all those projects. that kind of approach would probably be problematic because it would take so long to set up, and then i can envision that someone would probably want to see, say, only verifiable observations, while someone else might want to see, say, only data for the current year, etc…

if you had only a handful of countries that you wanted to get data for, then you could just query by country on the Explore screen. if you wanted to see some more complicated things like those shown in the World Tours, you could look at this discussion: https://forum.inaturalist.org/t/how-to-replicate-world-tour-figures/13109.

if you went over to GBIF, you might be able to download all the data for the iNat dataset (https://www.gbif.org/occurrence/search?dataset_key=50c9509d-22c7-4a22-a47d-8c48425ef4a7), or else you could get the 5GB file that iNat sends to GBIF (http://www.inaturalist.org/observations/gbif-observations-dwca.zip), and then you could crunch the numbers by country that way. but the limitation here is that GBIF contains only research-grade observations that have relatively unrestrictive licenses.

UPDATE: i made the following page to list countries set up in iNaturalist. it doesn’t provide stats, but you can click on the name of a country to take you directly to the Explore page, where you can get stats.

page: https://jumear.github.io/stirfry/iNat_countries.html
code: https://github.com/jumear/stirfry/blob/gh-pages/iNat_countries.html

3 Likes