inaturalist-clumper
Group iNaturalist sightings into clumps, represented as JSON.
Given one or more iNaturalist user logins, this CLI fetches every public observation those users have recorded and groups sightings that happened within ~5 km and ~3 hours of each other into "clumps" — useful for reconstructing a single hike, birding session, or tide-pool visit as one record.
See simonw/inaturalist-clumps/blob/main/clumps.json for example output from this tool.
The output JSON file records, for every clump:
- start/end timestamps, duration, centroid, bounding box, span
- a species roll-up
- a
locationblock: the mode of the observations'place_guessplus the most-specific iNaturalist place that every observation in the clump falls inside (with abreadcrumbof ancestor place IDs) - per-observation: timestamp, latitude/longitude, identified taxon, user-typed
place_guess, iNatplace_ids, and photo URLs (thumbnail / large / original)
A top-level places dictionary caches the iNat place metadata (name, display_name, admin_level, ancestor_ids) for every ID that appears in a clump's breadcrumb, so the file is self-contained. Incremental runs reuse this cache and only fetch newly-referenced places.
Install
pip install inaturalist-clumper
Or:
uv tool install inaturalist-clumper
Usage
inaturalist-clumper simonw --output clumps.json
You can pass more than one iNaturalist username to gather sightings from multiple users accounts.
Options:
USERNAME ...— required
One or more iNaturalist user logins to fetch.--output— default:clumps.json
Output JSON path. Used as the basis for incremental runs if it exists.--distance-km— default:5.0
Spatial threshold for linking two observations into the same clump.--hours— default:3.0
Temporal threshold for linking two observations into the same clump.--full-refresh— default: off
Ignore any existing observations in the output file and re-fetch fully.
Incremental runs
A second invocation against the same --output file reads the existing data and asks the iNaturalist API for any observations that have been created or edited since the previous run's generated_at timestamp (using the updated_since parameter). Edited records overwrite the cached copy on merge, so corrected taxa, new photos, or fixed coordinates flow back in. The full set is then re-clumped and the file rewritten — so a new sighting that bridges two previous clumps will merge them.
Use --full-refresh to ignore the existing file and start over.
Development
Clone the repo and then:
uv run pytest
To run the development version:
uv run inaturalist-clumper --help
Release files for inaturalist-clumper 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inaturalist_clumper-0.1.tar.gz | 34.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inaturalist_clumper-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.3 kB
Release files / inaturalist_clumper-0.1.tar.gz
| Download URL | inaturalist_clumper-0.1.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ede198ceea509909496576d6c167ab6c86b2c0ed8dd748d7f0fe903ebd0945c5
|
|
BLAKE2b-256 checksum How to use checksums |
bede9bc8f3143305d87f461385c98be4ae5d031ccff9515adcb5b10d1f69e960
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 15, 2026.
Transparency logRelease files / inaturalist_clumper-0.1-py3-none-any.whl
| Download URL | inaturalist_clumper-0.1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9aacd7a392a1574af2507965f91a36036c61eee047b163274633b0cb9cec2eff
|
|
BLAKE2b-256 checksum How to use checksums |
77b5e7c18d71a5edb9f457967eeeaa657575dc78e46484f1b2ebff0aa58ad973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 15, 2026.
Transparency log