Skip to content

About

Efficient multi-resolution least-cost connectivity algorithms for biodiversity indicators in Rust, R and Python.

Topics

Resources

Stars

18 stars

Watchers

0 watching

Forks

Repository files navigation

connectivity: a multi-resolution landscape connectivity algorithm

Python R Rust core PyPI version crates.io DOI

This repository implements an efficient multi-resolution least-cost algorithm for calculating connectivity-based biodiversity indicators, including Connected Habitat (connectivity-adjusted condition), the Protected Area Connectedness Index (PARC-connectedness), and the Bioclimatic Ecosystem Resilience Index (BERI). It combines habitat condition, least-cost paths and dispersal kernels to estimate how much surrounding habitat is accessible across dispersal scales. The algorithm retains fine spatial resolution near each focal cell and progressively coarsens with distance, enabling analysis of large landscapes. PARC-connectedness incorporates protected-area coverage, while BERI uses current and future climate-related compositional similarity to assess ecosystem resilience under climate change. The software is built around a shared Rust numerical engine, connectivity-core, with R and Python packages for spatial data processing and analysis. See Valavi et al. (2026) for the full method.

Packages

Each package has its own installation instructions, documentation and changelog:

Package Directory Install
Python, eco-connectivity (imported as connectivity) python/ pip install eco-connectivity
R, connectivity (not yet on CRAN) r/connectivity/ Build from source; see its README
Rust, connectivity-core crates/connectivity-core/ connectivity-core = "0.1" in Cargo.toml

Development

The repository root is a Cargo workspace containing the core crate and the PyO3 extension in python/. The R binding has its own Cargo workspace and lockfile, and builds against the published connectivity-core release.

cargo test --workspace          # every Rust test (the extension links libpython)
cargo test -p connectivity-core # the core alone, without Python
pip install ./python            # build and install the Python package

Releases

Each package has its own version and release tags:

Package Tag Release
Python, eco-connectivity vX.Y.Z CI publishes the wheels and sdist to PyPI and creates the GitHub Release
Rust, connectivity-core connectivity-core-vX.Y.Z CI checks the tag; the crate is published with cargo publish -p connectivity-core
R, connectivity r-vX.Y.Z Tag only; the package is submitted to CRAN separately

Only Python releases appear under GitHub Releases. The Python version is set in python/Cargo.toml. Changes are listed in python/NEWS.md, crates/connectivity-core/CHANGELOG.md and r/connectivity/NEWS.md.

Citation

To cite connectivity in publications and reports, please use:

Valavi, R., Mokany, K., Ware, C., Vickers, M., Giljohann, K. M., & Ferrier, S. (2026). A scalable multi-resolution framework for connectivity-based biodiversity indicators. EcoEvoRxiv. https://doi.org/10.32942/X2S68V

About

Efficient multi-resolution least-cost connectivity algorithms for biodiversity indicators in Rust, R and Python.

Topics

Resources

Stars

18 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages