elapid
Species distribution modeling tools, including a Python implementation of Maxent.
https://github.com/earth-chris/elapid
Category: Biosphere
Sub Category: Species Distribution Modeling
Keywords
biodiversity-informatics biogeography geospatial maxent niche-modelling species-distribution-modelling
Keywords from Contributors
conservation ecology spectral-unmixing california wildfire
Last synced: about 15 hours ago
JSON representation
Repository metadata
Species distribution modeling tools, including a python implementation of Maxent
- Host: GitHub
- URL: https://github.com/earth-chris/elapid
- Owner: earth-chris
- License: mit
- Created: 2021-03-20T04:00:24.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-06-11T23:54:24.000Z (10 days ago)
- Last Synced: 2026-06-13T15:04:08.319Z (9 days ago)
- Topics: biodiversity-informatics, biogeography, geospatial, maxent, niche-modelling, species-distribution-modelling
- Language: Python
- Homepage: https://elapid.org
- Size: 6.6 MB
- Stars: 72
- Watchers: 7
- Forks: 14
- Open Issues: 2
- Releases: 12
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
- Citation: CITATION.cff
README.md
Documentation: earth-chris.github.io/elapid
Source code: earth-chris/elapid
🐍 Introduction
elapid is a series of species distribution modeling tools for python. This includes a custom implementation of Maxent and a suite of methods to simplify working with biogeography data.
The name is an homage to A Biogeographic Analysis of Australian Elapid Snakes (H.A. Nix, 1986), the paper widely credited with defining the essential bioclimatic variables to use in species distribution modeling. It's also a snake pun (a python wrapper for mapping snake biogeography).
🌱 Installation
pip install elapid or conda install -c conda-forge elapid
Installing glmnet is optional, but recommended where it can be installed. The pip path for glmnet is currently broken on modern Python; use conda install -c conda-forge elapid glmnet instead, or the bundled pixi run -e dev-glmnet ... env. For more details, see this page.
The conda install is recommended for Windows users. While there is a pip distribution, you may experience some challenges. The easiest way to overcome them is to use Windows Subsystem for Linux (WSL). Otherwise, see this page for support.
🌳 Why use elapid?
The amount and quality of bioegeographic data has increased dramatically over the past decade, as have cloud-based tools for working with it. elapid was designed to provide a set of modern, python-based tools for working with species occurrence records and environmental covariates to map different dimensions of a species' niche.
elapid supports working with modern geospatial data formats and uses contemporary approaches to training statistical models. It uses sklearn conventions to fit and apply models, rasterio to handle raster operations, geopandas for vector operations, and processes data under the hood with numpy.
This makes it easier to do things like fit/apply models to multi-temporal and multi-scale data, fit geographically-weighted models, create ensembles, precisely define background point distributions, and summarize model predictions.
It does the following things reasonably well:
🌐 Point sampling
Select random geographic point samples (aka background or pseudoabsence points) within polygons or rasters, handling nodata locations, as well as sampling from bias maps (using elapid.sample_raster(), elapid.sample_vector(), or elapid.sample_bias_file()).
📈 Vector annotation
Extract and annotate point data from rasters, creating GeoDataFrames with sample locations and their matching covariate values (using elapid.annotate()). On-the-fly reprojection, dropping nodata, multi-band inputs and multi-file inputs are all supported.
📊 Zonal statistics
Calculate zonal statistics from multi-band, multi-raster data into a single GeoDataFrame from one command (using elapid.zonal_stats()).
🐛 Feature transformations
Transform covariate data into derivative features to expand data dimensionality and improve prediction accuracy (like elapid.ProductTransformer(), elapid.HingeTransformer(), or the all-in-one elapid.MaxentFeatureTransformer()).
🐦 Species distribution modeling
Train and apply species distribution models based on annotated point data, configured with sensible defaults (like elapid.MaxentModel() and elapid.NicheEnvelopeModel()).
📡 Training spatially-aware models
Compute spatially-explicit sample weights, checkerboard train/test splits, or geographically-clustered cross-validation splits to reduce spatial autocorellation effects (with elapid.distance_weights(), elapid.checkerboard_split() and elapid.GeographicKFold()).
🌏 Applying models to rasters
Apply any pixel-based model with a .predict() method to raster data to easily create prediction probability maps (like training a RandomForestClassifier() and applying with elapid.apply_model_to_rasters()).
☁️ Cloud-native geo support
Work with cloud- or web-hosted raster/vector data (on https://, gs://, s3://, etc.) to keep your disk free of temporary files.
Check out some example code snippets and workflows on the Working with Geospatial Data page.
🐍 elapid requires some effort on the user's part to draw samples and extract covariate data. This is by design.
Selecting background samples, computing sample weights, splitting train/test data, and specifying training parameters are all critical modeling choices that have profound effects on inference and interpretation.
The extra flexibility provided by elapid enables more control over the seemingly black-box approach of Maxent, enabling users to better tune and evaluate their models.
How to cite
BibTeX:
@article{
Anderson2023,
title = {elapid: Species distribution modeling tools for Python}, journal = {Journal of Open Source Software}
author = {Christopher B. Anderson},
doi = {10.21105/joss.04930},
url = {https://doi.org/10.21105/joss.04930},
year = {2023},
publisher = {The Open Journal},
volume = {8},
number = {84},
pages = {4930},
}
Or click "Cite this repository" on the GitHub page.
Developed by
Christopher Anderson[^1] [^2]
[^1]: Earth Observation Lab, Planet Labs PBC
[^2]: Center for Conservation Biology, Stanford University
Citation (CITATION.cff)
cff-version: "1.2.0"
authors:
- family-names: Anderson
given-names: Christopher B.
orcid: "https://orcid.org/0000-0001-7392-4368"
doi: 10.5281/zenodo.7813017
message: If you use this software, please cite our article in the
Journal of Open Source Software.
preferred-citation:
authors:
- family-names: Anderson
given-names: Christopher B.
orcid: "https://orcid.org/0000-0001-7392-4368"
date-published: 2023-04-19
doi: 10.21105/joss.04930
issn: 2475-9066
issue: 84
journal: Journal of Open Source Software
publisher:
name: Open Journals
start: 4930
title: "elapid: Species distribution modeling tools for Python"
type: article
url: "https://joss.theoj.org/papers/10.21105/joss.04930"
volume: 8
title: "elapid: Species distribution modeling tools for Python"
Owner metadata
- Name: Christopher Anderson
- Login: earth-chris
- Email:
- Kind: user
- Description: ecology | space | design
- Website: https://earth-chris.github.io
- Location: San Francisco, CA
- Twitter: earth_chris
- Company: @planetlabs
- Icon url: https://avatars.githubusercontent.com/u/10216182?u=abccdd72eae96ab5042a5a9a11580202af0adfdf&v=4
- Repositories: 17
- Last ynced at: 2026-03-01T15:07:02.694Z
- Profile URL: https://github.com/earth-chris
GitHub Events
Total
- Release event: 4
- Delete event: 6
- Pull request event: 10
- Fork event: 5
- Issues event: 6
- Watch event: 12
- Issue comment event: 9
- Push event: 19
- Pull request review comment event: 3
- Pull request review event: 5
- Create event: 7
Last Year
- Release event: 1
- Delete event: 1
- Pull request event: 4
- Fork event: 1
- Issues event: 3
- Watch event: 1
- Issue comment event: 2
- Push event: 8
- Pull request review event: 1
- Pull request review comment event: 1
- Create event: 1
Committers metadata
Last synced: 4 days ago
Total Commits: 410
Total Committers: 3
Avg Commits per committer: 136.667
Development Distribution Score (DDS): 0.007
Commits in past year: 5
Committers in past year: 3
Avg Commits per committer in past year: 1.667
Development Distribution Score (DDS) in past year: 0.6
| Name | Commits | |
|---|---|---|
| earth-chris | c****a@s****i | 407 |
| Harry Horsley | h****9@g****m | 2 |
| Thomas Maschler | t****r@p****m | 1 |
Committer domains:
- planet.com: 1
- salo.ai: 1
Issue and Pull Request metadata
Last synced: 9 days ago
Total issues: 40
Total pull requests: 75
Average time to close issues: 4 months
Average time to close pull requests: 10 days
Total issue authors: 9
Total pull request authors: 6
Average comments per issue: 1.05
Average comments per pull request: 0.36
Merged pull request: 70
Bot issues: 0
Bot pull requests: 0
Past year issues: 2
Past year pull requests: 5
Past year average time to close issues: 1 day
Past year average time to close pull requests: about 1 month
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 1.5
Past year average comments per pull request: 1.6
Past year merged pull request: 5
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- earth-chris (28)
- gabrieldansereau (5)
- jeffreysmith-jrs (1)
- bweeding (1)
- aFewThings (1)
- jcrangel (1)
- outdoorCoding (1)
- bobilong (1)
- BachirNILU (1)
Top Pull Request Authors
- earth-chris (67)
- butterman0 (4)
- osgeokr (1)
- PC-FSU (1)
- gabrieldansereau (1)
- thomas-maschler (1)
Top Issue Labels
- bug (16)
- enhancement (12)
- documentation (11)
- low priority (7)
- high priority (4)
- help wanted (1)
- science (1)
Top Pull Request Labels
- enhancement (28)
- documentation (20)
- bug (14)
- science (3)
- low priority (1)
- high priority (1)
Package metadata
- Total packages: 3
-
Total downloads:
- conda: 17,813 total
- pypi: 1,472 last-month
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 1 (may contain duplicates)
- Total versions: 45
- Total maintainers: 1
proxy.golang.org: github.com/earth-chris/elapid
- Homepage:
- Documentation: https://pkg.go.dev/github.com/earth-chris/elapid#section-documentation
- Licenses: mit
- Latest release: v1.0.4 (published 10 days ago)
- Last Synced: 2026-06-18T17:00:42.854Z (4 days ago)
- Versions: 13
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.401%
- Average: 5.583%
- Dependent repos count: 5.764%
pypi.org: elapid
Species distribution modeling tools
- Homepage: https://github.com/earth-chris/elapid
- Documentation: https://earth-chris.github.io/elapid/
- Licenses: MIT
- Latest release: 1.0.4 (published 10 days ago)
- Last Synced: 2026-06-18T17:00:41.578Z (4 days ago)
- Versions: 28
- Dependent Packages: 0
- Dependent Repositories: 1
- Downloads: 1,472 Last month
-
Rankings:
- Dependent packages count: 10.108%
- Average: 16.401%
- Downloads: 17.513%
- Dependent repos count: 21.581%
- Maintainers (1)
conda-forge.org: elapid
- Homepage: https://elapid.org
- Licenses: MIT
- Latest release: 0.3.18 (published over 3 years ago)
- Last Synced: 2026-04-01T13:28:26.734Z (3 months ago)
- Versions: 4
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 17,813 Total
-
Rankings:
- Dependent repos count: 34.025%
- Average: 48.037%
- Stargazers count: 49.578%
- Dependent packages count: 51.175%
- Forks count: 57.37%
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pypa/gh-action-pypi-publish release/v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- descartes >=1.1 develop
- ipython >=8.0 develop
- jupyter >=1.0 develop
- mkdocs-jupyter >=0.24 develop
- mkdocs-material >=9.5 develop
- mkdocstrings >=0.25 develop
- pre-commit >=3.0 develop
- pytest >=8.3 develop
- pytest-cov >=5.0 develop
- pytest-xdist >=3.6 develop
- geopandas >=1.0
- matplotlib >=3.7
- numpy >=2.0
- pandas >=1.0.3,<3.0
- pyproj >3.0
- python >=3.9
- rasterio >=1.2.1
- rtree >=0.9
- scikit-learn >=1.2,<1.6
- scipy >=1.13
- tqdm >=4.60
Score: 15.269863954682076