Species Range Mapping from GBIF Using Ecoregion Constraints

A user-friendly, end-to-end workflow to generate ecologically informed species range maps from sparse observations using environmental clustering and convex hulls. Serves as a standalone framework or complementary approach to Species Distribution Models (SDMs). By constraining estimated ranges within authoritative or custom ecoregion boundaries, the approach prevents spurious range over-prediction common in geometric hull methods. The package automates data acquisition via 'GBIF' synonym-aware, tiled downloads; curates records using 13 configurable filters; and supports multi-scale analysis by integrating global or user-provided spatial layers. Also includes disk-based batch processing for large-scale studies and built-in tools for cross-validation and expert-derived evaluations.


gbif.range

Auto-Version R-CMD-check DOI CRAN Version Monthly Downloads Total Downloads

Mapping species distribution mostly relies on expert ranges (for example, IUCN and EUFORGEN) or predictive modeling. However, expert maps remain unavailable for many rare and regional species, while modelling workflows require advanced technical expertise and highly accurate, spatially continuous occurrence data that often demand intensive error-cleaning. The gbif.range R package overcomes these limitations by providing a user-friendly, integrated workflow to generate ecologically informed range maps from sparse observations using environmental clustering and convex hulls.

To streamline data acquisition, gbif.range handles synonym-aware Global Biodiversity Information Facility (GBIF) downloads and uses dynamic geographic tiling to bypass GBIF's 100,000 record API limit without credentials. The package also automates data curation via 13 custom and configurable CoordinateCleaner filters, and constrains estimated ranges using built-in or custom terrestrial, marine, and freshwater ecoregion layers to prevent over-prediction into non-viable habitats. For large-scale workflows, a dedicated disk-based pipeline processes multi-species exports without memory limits, while built-in cross-validation and evaluation functions enable rigorous map validation against independent datasets, offering a robust, low-barrier alternative to traditional modeling approaches.

For full documentation, workflows, and examples, visit the package website.

Installation

# From CRAN
install.packages("gbif.range")

# From GitHub (development version)
remotes::install_github("8Ginette8/gbif.range", build_vignettes = TRUE)

# Load
library(gbif.range)

Quick example

# Download Panthera tigris occurrences
obs_pt <- get_gbif(sp_name = "Panthera tigris")

# Load terrestrial ecoregions and build range map
eco_terra <- read_ecoreg(ecoreg_name = "eco_terra", save_dir = tempdir())
range_tiger <- get_range(occ_coord = obs_pt,
                         ecoreg = eco_terra,
                         ecoreg_name = "ECO_NAME",
                         degrees_outlier = 5,
                         clust_pts_outlier = 4,
                         format = "SpatRaster")

# Plot range
countries <- terra::vect(
  system.file("extdata", "world_countries.shp", package = "gbif.range")
)
terra::plot(countries, col = "#bcbddc")
terra::plot(range_tiger$rangeOutput, col = "#238b45",
            add = TRUE, axes = FALSE, legend = FALSE)

# Visualise points
graphics::points(obs_pt[, c("decimalLongitude", "decimalLatitude")],
       pch = 20, col = "#99340470", cex = 1.5)

Citation

Yohann Chauvier, Oskar Hagen, Stefan Pinkert, Camille Albouy, Fabian Fopp, Philipp Brun, Patrice Descombes, Florian Altermatt, Loic Pellissier, Katalin Csilléry. gbif.range: An R package to generate ecologically-informed species range maps from occurrence data with seamless GBIF integration. Authorea. June 30, 2025. doi: 10.22541/au.175130858.83083354/v1

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("gbif.range")

1.9.2 by Yohann Chauvier, 2 months ago


https://github.com/8Ginette8/gbif.range, https://8ginette8.github.io/gbif.range/


Report a bug at https://github.com/8Ginette8/gbif.range/issues


Browse source code at https://github.com/cran/gbif.range


Authors: Yohann Chauvier [cre, aut] (ORCID: , Oskar Hagen [aut] , Stefan Pinkert [aut] , Camille Albouy [aut] , Fabian Fopp [aut] , Philipp Brun [aut] , Patrice Descombes [aut] (ORCID: , Florian Altermatt [aut] (ORCID: , Loïc Pellissier [aut] , Katalin Csillery [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports terra, rgbif, CoordinateCleaner, sf, ClusterR, FNN, geometry, cluster, mclust, methods, utils, zip, class, NMOF, stats, tools, graphics, grDevices

Suggests data.table, knitr, rmarkdown, testthat


See at CRAN