gbif.range
Species Range Mapping from GBIF Using Ecoregion Constraints
Provides a workflow to retrieve, filter, and analyze 'GBIF' occurrence records and to generate ecologically informed species range maps using downloaded or custom ecoregions. The package includes tools for querying the 'GBIF' backbone taxonomy with get_status(), counting or downloading occurrences with get_gbif_count() and get_gbif(), creating custom ecoregion layers with make_ecoreg(), building range maps with get_range(), and evaluating them against independent validation data with evaluate_range() and cv_range(). A disk-based batch workflow (split_gbif_by_species(), species_csvs_to_ranges(), read_range_rds()) supports large multi-species 'GBIF' exports without loading the full table into memory. Bundled ecoregion layers cover terrestrial (Olson et al. 2001 <doi:10.1641/0006-3568(2001)051[0933:TEOTWA]2.0.CO;2>), marine (Spalding et al. 2007 <doi:10.1641/B570707>), and freshwater (Abell et al. 2008 <doi:10.1641/B580507>) realms. The 'GBIF' API is accessed via the 'rgbif' package, and coordinate cleaning uses 'CoordinateCleaner' (Zizka et al. 2019 <doi:10.1111/2041-210X.13152>). The 'GBIF' API is described at <https://www.gbif.org/developer/summary>.
README
# gbif.range [<img src="man/figures/logo.png" align="right" width="150"/>](https://www.gbif.org)
[](https://github.com/8Ginette8/gbif.range/actions/workflows/R-Package-Auto-Version.yml)
[](https://github.com/8Ginette8/gbif.range/actions/workflows/R-CMD-check-month-test.yml)
[](https://www.repostatus.org/#active)
[](https://doi.org/10.5281/zenodo.20826609)
Species ranges can be estimated from expert maps (for example <a href="https://www.iucnredlist.org/resources/spatial-data-download">IUCN</a> and <a href="https://www.euforgen.org/species">EUFORGEN</a>) or with modelling approaches. Expert data, however, remain unavailable for many species, whereas modelling workflows often require substantial technical expertise and large numbers of occurrence records. [Global Biodiversity Information Facility (GBIF)](https://www.gbif.org) — the largest public repository of georeferenced species observations worldwide — offers a practical alternative, yet retrieving them at scale in R remains cumbersome and translating raw occurrences into ecologically meaningful range maps is not straightforward, as records often contain erroneous coordinates that must be identified and removed before spatial analyses.
**gbif.range** provides a complete workflow to retrieve, clean, and analyze GBIF occurrence records and generate ecologically informed species range maps. Built around the GBIF backbone taxonomy, the package handles synonym-aware downloads, dynamic tiling for large datasets, and 13 configurable post-processing filters via `CoordinateCleaner`. Range maps are constrained by bundled or custom ecoregion layers (terrestrial, marine, and freshwater), and can be validated against independent data using built-in evaluation and cross-validation functions. A dedicated disk-based pipeline allows processing very large multi-species GBIF exports without loading them into memory. Additional utilities cover GBIF taxonomy inspection, occurrence thinning, geographic tiling, and GBIF-derived DOI generation.
For full documentation, workflows, and examples, visit the **[package website](https://8ginette8.github.io/gbif.range/)**.
## Installation
```r
# From GitHub (development version)
remotes::install_github("8Ginette8/gbif.range", build_vignettes = TRUE)
library(gbif.range)
```
> **CRAN submission coming soon.** Once available, the package will also be installable with `install.packages("gbif.range")`.
## Quick example
```r
# 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
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)
```
## 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](https://doi.org/10.22541/au.175130858.83083354/v1)
Versions across snapshots
| Version | Repository | File | Size |
|---|---|---|---|
1.9.1 |
rolling linux/jammy R-4.5 | gbif.range_1.9.1.tar.gz |
3.4 MiB |
1.9.1 |
rolling linux/noble R-4.5 | gbif.range_1.9.1.tar.gz |
3.7 MiB |
1.9.1 |
rolling source/ R- | gbif.range_1.9.1.tar.gz |
3.4 MiB |
1.9.1 |
latest linux/jammy R-4.5 | gbif.range_1.9.1.tar.gz |
3.4 MiB |
1.9.1 |
latest linux/noble R-4.5 | gbif.range_1.9.1.tar.gz |
3.7 MiB |
1.9.1 |
latest source/ R- | gbif.range_1.9.1.tar.gz |
3.4 MiB |
1.9.1 |
2026-04-23 source/ R- | gbif.range_1.9.1.tar.gz |
0 B |