h3sdm: Machine learning–based spatial species distribution modeling and habitat/landscape analysis using H3 spatial index grids.
Overview
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:
- Conversion of point occurrence data into H3-based spatial grids
- Extraction of environmental and landscape predictors at different resolutions
- Support for multiple modeling approaches through tidymodels
- Tools for visualizing model predictions and habitat structure
By leveraging H3 grids and the tidymodels ecosystem, h3sdm makes it easy to bridge species distribution modeling and landscape ecology in a scalable way.
Installation
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")
Get Started
Explore full workflows and examples for h3sdm in the Articles section.
Each vignette demonstrates different aspects of species distribution and habitat analysis using H3 grids.