This release is a pre-release and may not be stable for production use.
Python client for discovering, filtering, and retrieving ecological field data from the TERN EcoPlots Portal. Pagination, streaming, and response normalisation are handled automatically — you get back a clean pandas.DataFrame, geopandas.GeoDataFrame, GeoJSON (for observations), or Parquet output with no post-processing required.
Features
Data access
- 🔬 Observations & Samples — Two purpose-built workflows covering ecological plot observations and physical material samples (soil, plant vouchers, tissue) from TERN's national monitoring network.
- 🌐 Full API abstraction — Pagination, streaming, and response normalisation are handled automatically; you work with clean Python objects, not raw HTTP.
- 📦 Analysis-ready outputs — Observations and samples return a
geopandas.GeoDataFrameby default; also available aspandas.DataFrameor Parquet bytes. Observations can also be returned as GeoJSON.
Discovery & filtering
- 🔎 Validated filters with fuzzy resolution — Mistyped or partial filter values are caught and corrected before any request is sent, with a ranked list of suggestions.
- ⚡ Preview before you download — Inspect the first page of results instantly to confirm your filters before committing to a full retrieval.
- 🗺️ Interactive spatial selector — Draw a bounding polygon on a live map widget directly in Jupyter; the geometry is applied as a filter automatically.
Developer experience
- 🧭 Sync and async clients —
EcoPlotsfor scripts and notebooks;AsyncEcoPlotsfor async/ASGI services and concurrent I/O pipelines. - 💾 Reproducible projects — Save and reload the full discovery state as a
.ecoprojfile for shareable, version-controllable workflows. - 🖼️ Notebook widgets — Built-in IGSN viewer and sample image browser for interactive exploration without leaving the notebook.
📖 Full documentation: https://terndata-ecoplots.readthedocs.io/en/latest/
Installation
pip install terndata.ecoplots
The standard install includes the synchronous client, observations and samples workflows, discovery/filtering, data retrieval, attribute data retrieval, and Parquet output.
Optional modules:
pip install "terndata.ecoplots[async]" # AsyncEcoPlots and async streaming transport
pip install "terndata.ecoplots[gui]" # Jupyter/ipyleaflet/ipywidgets helpers
Supported Python: 3.10, 3.11, 3.12, 3.13
Core dependencies include geopandas, pandas, pyarrow, requests, rapidfuzz, and orjson. Async and GUI dependencies are installed only when their extras are requested.
Quick Start
Zero to data in three lines:
from terndata.ecoplots import EcoPlots
ec = EcoPlots()
ec.select(site_id="TCFTNS0002")
gdf = ec.get_data() # → GeoDataFrame, ready for analysis
See Modes for full workflow examples, or jump to the demo notebooks.
Modes
Observations (default)
Retrieve ecological observation data — site visits, feature types, and measured properties — across Australia's TERN monitoring network.
from terndata.ecoplots import EcoPlots
ec = EcoPlots() # mode="observations" by default
ec.select(dataset="TERN Surveillance",
site_id="TCFTNS0002")
ec.preview() # quick look (first page)
gdf = ec.get_data() # default → GeoDataFrame
df = ec.get_data(dformat="pd") # → pandas DataFrame
pq = ec.get_data(dformat="pq") # → Parquet bytes
gjson = ec.get_data(dformat="geojson") # → GeoJSON (observations only)
ec.export_data("outputs/ecoplots.parquet") # retrieve and save directly
sites = ec.get_sites(include_region=True) # site region columns included
site_attrs = ec.get_site_attributes_data()
Samples
Retrieve physical specimens — soil pit samples, plant voucher specimens, plant tissue samples, and more — with access to IGSN identifiers and sample images.
from terndata.ecoplots import EcoPlots
ec = EcoPlots("samples")
ec.select(material_sample_type="Plant Voucher Specimen",
has_image=True)
gdf = ec.get_data() # default → GeoDataFrame
pq = ec.get_data(dformat="pq") # Parquet bytes
ec.export_data("outputs/samples.csv") # retrieve and save directly
sites = ec.get_sites(include_region=True) # enrich sites with region columns
Samples mode includes two dedicated notebook widgets:
| Widget | Method | Description |
|---|---|---|
| IGSN viewer | ec.view_sample_igsn() |
Browse International Geo Sample Numbers linked to retrieved specimens |
| Sample image viewer | ec.view_sample_images() |
Preview photos associated with sample records inline in Jupyter |
Note: In samples mode the TERN Ecosystem Surveillance dataset is applied automatically and cannot be removed.
Find filters with search
Search for a concept, inspect the suggestions, then select the relevant row:
from terndata.ecoplots import EcoPlots
ec = EcoPlots() # observations mode
suggestions = ec.search("above ground biomass")
choices = suggestions[suggestions["selectable"]]
if not choices.empty:
ec.select(choices.iloc[0]["filters"])
ec.help() # methods and short descriptions for the current mode
Search automatically uses the client's observations or samples mode.
Existing selections do not restrict search suggestions. Searching never changes selections. A result-value match
selects its observed property, which includes other result values, rather
than filtering to the matched value itself. Inspect facet, filters, and
note before selecting. Rows with selectable=False cannot be applied.
Species discovery and selection
species = ec.get_speciesname() # speciesname and count columns; either mode
species = ec.discover("speciesname")
if not species.empty:
ec.select(speciesname=species.iloc[0]["speciesname"])
suggestions = ec.search("Acacia")
choices = suggestions[suggestions["selectable"]]
if not choices.empty:
ec.select(choices.iloc[0]["filters"])
Species are literal names rather than vocabulary URIs.
Scientific and accepted-name search suggestions resolve to speciesname filters
in either mode, including when species filters are already selected.
Async client (AsyncEcoPlots)
For async/ASGI services or concurrent I/O pipelines, install the async extra and use AsyncEcoPlots — it has the same interface as EcoPlots with await-able retrieval methods. Both modes and all filters are supported.
from terndata.ecoplots import AsyncEcoPlots
ec = AsyncEcoPlots()
ec.select(site_id="TCFTNS0002")
gdf = await ec.get_data() # non-blocking fetch
async for chunk in ec.get_data_stream(dformat="gpd"):
...
Data jobs (observations)
get_data() handles job submission, polling, and retrieval automatically. To submit work and retrieve it later, use submit_data_job(dformat="csv") or dformat="geojson":
ec = EcoPlots()
ec.select(site_id="TCFTNS0002")
job = ec.submit_data_job() # EcoPlots; CSV by default
job.refresh()
print(job.status)
job.download("observations.csv") # Wait and save the complete result
for frame in job.stream():
...
With AsyncEcoPlots:
aec = AsyncEcoPlots()
aec.select(site_id="TCFTNS0002")
job = aec.submit_data_job()
job.refresh()
await job.download("observations.csv")
async for frame in job.stream():
...
CSV streaming yields a DataFrame per feature type; GeoJSON streaming yields bytes. CSV downloads combine all results into one file.
Interactive Widgets
Both modes provide notebook widgets for interactive data exploration:
| Widget | Mode | Method |
|---|---|---|
| Spatial selector | Both | ec.select_spatial() |
| IGSN viewer | Samples | ec.view_sample_igsn() |
| Sample image viewer | Samples | ec.view_sample_images() |
Demo Notebooks
| Mode | Notebook |
|---|---|
| Observations | examples/demo.ipynb |
| Samples | examples/demo_samples.ipynb |
Links
- 📚 Docs: https://terndata-ecoplots.readthedocs.io/en/latest/
- 🗺️ Workflow Reference: https://terndata-ecoplots.readthedocs.io/en/latest/workflows.html
- 🧭 EcoPlots Portal: https://ecoplots.tern.org.au
- 🧑💻 Source: https://github.com/ternaustralia/terndata.ecoplots
- 📦 PyPI: https://pypi.org/project/terndata.ecoplots/
Contributing
Contributions are welcome! Please open an issue first to discuss substantial changes before submitting a PR. For small bug fixes, a direct PR is fine.
Target branch: main
Development commands:
| Task | Command |
|---|---|
| Run tests | make test |
| Lint | make check-lint |
| Type check | make check-types |
| Lint + types | make check |
| Build docs | make doc |
| Build wheel | make build |
All checks are also available via tox — see tox.ini for environment definitions.
Support
- 🐛 Bug reports & feature requests: Open a GitHub issue
- 📧 Direct enquiries: esupport@tern.org.au
- 📚 Documentation: terndata-ecoplots.readthedocs.io
Citation
Generate citations for the current filters, including the software reference:
print(ec.cite())
ec.cite(path="references.ris") # Save for EndNote and other reference managers
Use dformat="ris" to return RIS text, or save to .txt for readable text.
The software citation credits authors, with TERN Data Services and
Analytics affiliation, as recorded in CITATION.cff, and includes
the installed package version.
License
Licensed under the terms in LICENSE. Copyright © 2025-2026 TDSA (TERN Data Services and Analytics). Author: Avinash Chandra
Metadata
Release files for terndata.ecoplots 1.1.3.dev16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| terndata_ecoplots-1.1.3.dev16.tar.gz | 2.6 MB | With provenance | Details for terndata_ecoplots-1.1.3.dev16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| terndata_ecoplots-1.1.3.dev16-py3-none-any.whl | Python 3 | none | any | Details for terndata_ecoplots-1.1.3.dev16-py3-none-any.whl |
Total release size: 2.8 MB
Release files / terndata_ecoplots-1.1.3.dev16.tar.gz
| Download URL | terndata_ecoplots-1.1.3.dev16.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab0de88f3df3f24e1d23248dac59ead5a34e4e59512c53ad7e9f8efe167fe242
|
|
BLAKE2b-256 checksum How to use checksums |
a9b1b7f21381b90f50fd2c8f48fb50b78b308e9770e49e6c625ffb5de38ec6a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logRelease files / terndata_ecoplots-1.1.3.dev16-py3-none-any.whl
| Download URL | terndata_ecoplots-1.1.3.dev16-py3-none-any.whl |
|---|---|
| Size | 151.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a57168fff5a2fb695a9b9e0e9b34950da445fbe4a32c968e1f89c081e5c8a3a6
|
|
BLAKE2b-256 checksum How to use checksums |
f27029f96c399bbde2c65b9cfc401fbd9d84d3b1869217272b39c1b935c24811
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 25, 2026.
Transparency logSecurity for terndata.ecoplots 1.1.3.dev16
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for terndata_ecoplots-1.1.3.dev16.tar.gz
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 Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.