iNaturalist Species Ranking + Rarities — open Shiny app (R) by @andreferrari

Goal of the tool:
To help iNaturalist users explore two complementary views of their observations: a ranking of their most-recorded species with global context (world total and top 3 global observers per taxon), and a rarities list showing which of their species are rarest worldwide, sorted by global observation count.

Niche it fills in the iNaturalist ecosystem:
There is no built-in way on iNaturalist to see how a user’s species list compares globally, or to identify which of their recorded species have the fewest worldwide observations. This app fills that gap with a simple, username-based lookup — no login required.

Is there a commercial component, or do you plan to include one in the future? Are donations requested?
No. The app is completely free, with no ads, no commercial component, and no donations requested.

What sort of data (if any) does your app collect from its users?
None. The app only uses the iNaturalist username typed by the user to query the public iNaturalist API. No data is stored or logged.

Link to your iNaturalist profile:

https://www.inaturalist.org/people/andreferrari

Description:
A free web app built with R Shiny offering two tabs:

:bar_chart: Ranking — the user’s most-observed species, with world total, Brazil total, and the top 3 global observers per taxon.

:gem_stone: Rarities — the rarest species in the user’s list, sorted by world total observations (ascending), with rarity badges: :purple_circle: Extremely rare (≤50 world obs.), :orange_circle: Very rare (≤200), :yellow_circle: Rare (≤1000).

Both tabs support filtering by taxonomic group and by any iNaturalist place (place_id). The app queries the public API in read-only mode, with sequential requests and a minimum 1.2-second pause between calls, in line with iNaturalist’s recommended practices.

Built as part of the Vem Pra Mata project — a nature cinema studio documenting Atlantic Forest biodiversity at Sítio Canaã, Santa Teresa, Espírito Santo, Brazil.

:link: App: https://andreferrari.shinyapps.io/ranking_inaturalist/
:play_button: Tutorial (in Portuguese): https://youtu.be/rtyT3zaEg-E?is=5eSgnldKpzzoeg7o

Discussion questions or areas seeking feedback:

  • Does the rarities logic (sorting by world total, ascending) feel useful and intuitive?
  • Any edge cases you’ve found with obscured species coordinates affecting the counts?
  • Suggestions for additional filters or views are very welcome.
2 Likes

The app is very good! I was surprised to discover that I rank among the top contributors worldwide for observations of several small wild cat species.

1 Like

I like it, it’s quite cool! But I can’t get the Rarities section to work properly - it only shows me birds when I search for all groups. I have observed many rare taxa in other groups (mostly insects) that are much rarer than any of the birds, so I’m not sure why only they are showing up.

Even when I restrict it only to insects, it gives me a very odd selection of species:

E.g., why is this species not in second place?

Or indeed why is this one not first??

The rarities portion seemed to pick a random 50 families/genera/species that were not sorted for their total of worldwide observations. I’ve got 500+ observations of species with 10 or fewer worldwide observations but none of those showed up. Maybe I just misunderstood the purpose.

1 Like

Thank you all — this is exactly the kind of feedback I was hoping for, and you found a real bug.

@matthew_connors and @LostInCR are both right, and it’s the same underlying problem. The Rarities tab was fetching your species sorted by your own observation count (ascending), taking the first 50, and only then looking up world totals and re-sorting. For any experienced observer, hundreds or thousands of species sit tied at a single observation, so the API returned an essentially arbitrary slice of that tie — which is why it looked random, and why one taxonomic group could dominate the whole list. The genuinely rare species never even entered the sample. My apologies — that was a poor design decision on my part.

I’ve rewritten the logic. It now:

Fetches all of your species, not a slice

Retrieves world totals for all of them using species_counts with comma-separated taxon_id values in batches, so it takes ~20 requests instead of thousands

Sorts by world total ascending, then takes the N rarest

Only fetches country/place totals for the species actually displayed

There’s also a new selector in Advanced Options to choose 25, 50, or 100 rarities.

A pleasant side effect: batching the requests means the app makes far fewer API calls than before, even while covering your entire species list — which is better for iNaturalist’s servers and for my Shiny hosting quota.

I’m testing the new version now and will update here once it’s deployed. @matthew_connors and @LostInCR, if you’d be willing to try it again afterwards, your accounts are the best stress test I could ask for.

@polones — glad you enjoyed it, and thank you again for the BioPoster/TrailCam tool, which was part of what inspired me to build and share this in the first place.

2 Likes

Update — Rarities Logic Fixed + UX Improvements

Thank you for all the feedback — @matthew_connors and @LostInCR, your reports were crucial to diagnosing the root cause.

I’ve rolled out several improvements:

1. Rarities Logic Rewritten — The app now fetches all your species, gets their world totals in batches (not one-by-one), and ranks by global rarity ascending. This solves the “random 50 species” problem you reported. You now see the genuinely rare species you’ve observed.

2. Dynamic Time Estimate — When you type your username in Rarities, the app counts your species (one quick API call) and shows a proportional estimate: “~5 min · 12,621 species”. It updates as you type, with a debounce so it doesn’t spam the API. If you have 2,000+ species, an additional warning appears: “:warning: This user has many species. The search scans all of them to find the rarest and may take a few minutes — worth the wait.”

3. Pause Optimized — Reduced from 0.8s to 0.6s between batches, within iNaturalist’s recommended ~1 req/sec guideline, and carefully calibrated against observed run times.

4. Identifier Mode — Rarities now gracefully disables in Identifier role. It’s an observer-specific metric; trying to apply it to identifications you made for others is conceptually confusing. If you switch to Identifier while viewing Rarities, you get a clear message and the previous result clears.

5. Selector for Quantity — Choose 25, 50, or 100 rarities to display (default 50) in Advanced Options.

If you’d like to test again, the updated app is live at https://andreferrari.shinyapps.io/ranking_inaturalist/. Your accounts remain excellent benchmarks — a real-world stress test.

2 Likes

Thanks, it seems to work perfectly now!

One thing I note is that if a species does not have a taxon photo then it gives an error image (e.g. Neosparassus pallidus, number 11 here). But presumably that is a very easy fix. If there’s anything else you want me to test please let me know :D

I tried out the identifier part. It seems to use my most observed species for the list instead of my most identified species. I’m not sure if that’s intended, but I would imagine not

1 Like

Same.

Same of the taxa have a ‘not ranked’ error for both the observer:

and identifier:

sections. I unfortunately didn’t get a screenshot of it, but these taxa changes; the 1st time, west indian manatee was included, even though I the top observer of them.

Update — Identifier mode fixed :tada:

Thanks for the detailed reports, @ncb1221 and @brennafarrell — you were right. The species list itself was always being built from observations (user_login), regardless of which role was selected. When Identifier mode was active, only the ranking source (/observations/identifiers) changed, but the underlying “top 50 species” list still came from what you’d observed, not identified.

Fixed: in Identifier mode, the app now resolves your user ID and pulls the species list via ident_user_id, so it reflects species you’ve actually identified for others. Ranking source stays the same (/observations/identifiers).

Also fixed — thanks @matthew_connors for flagging it: species without a valid taxon photo (e.g. Neosparassus pallidus) were showing a broken image icon. This wasn’t intermittent — any taxon lacking a usable default photo hit this every time. The photo now falls back to the group icon automatically if it fails to load.

Both fixes are live. Would appreciate it if you could give Identifier mode another spin and let me know if the list now matches what you’d expect from your identification history — always happy to keep tightening this up based on real testing like yours. :folded_hands:

2 Likes

I just tried it out. Seems to be working as expected now. Thanks for the app and the quick fixes

1 Like

You’re welcome! It’s working now.

1 Like