Provides tools for species distribution modeling using H3 hexagonal grids (Uber Technologies Inc., 2022, < https://h3geo.org>). Facilitates retrieval of species occurrence records, generation of H3 grids, computation of landscape metrics, and preparation of spatial data for modern species distribution models workflows. Designed for biodiversity and landscape ecology research.

h3sdm: Machine learning–based spatial species distribution modeling and habitat/landscape analysis using H3 spatial index grids.
h3sdm is an R package for species distribution modeling (SDM) and habitat analysis using hexagonal spatial index grids based on H3.
It provides a consistent spatial framework to combine species occurrence data with environmental predictors and landscape metrics, enabling both ecological modeling and habitat characterization. The modeling framework is built on tidymodels, offering flexibility to use different approaches (e.g., logistic regression, GAMs, Random Forest, XGBoost).
Key features include:
By leveraging H3 grids and the tidymodels ecosystem, h3sdm makes it easy to bridge species distribution modeling and landscape ecology in a scalable way.
You can install the development version of h3sdm from GitHub using one of the following methods:
# install.packages("pak")
pak::pak("ManuelSpinola/h3sdm")
# install.packages("remotes")
remotes::install_github("ManuelSpinola/h3sdm")
# install.packages("devtools")
devtools::install_github("ManuelSpinola/h3sdm")
Explore h3sdm through the Get Started
section of the website, which
provides a quick introduction to the package and its core workflows.
For more practical examples, visit the Articles
section, where each
vignette demonstrates different aspects of species distribution and
habitat analysis using H3 grids.