Skip to content

This repo contains an R Markdown script with a UI that performs Species Distribution Modeling (SDM). Predictors are sourced from the BioClim database and databases that store land use.

License

Notifications You must be signed in to change notification settings

thesnakeguy/SDM_BioClim-and-LandUse

Repository files navigation

Maxent SDM using BioClim and Land Use Data

Overview

This RMarkdown script provides a framework for Species Distribution Modeling (SDM) and ecological niche analysis under present and future climate scenarios under different trajectories. Using MaxEnt, it models species distributions based on both BioClim and Land Use data applying 10-fold cross-validation. Model parameterization is performed for feature class (fc) and regularization multiplier (rm) using ENMeval::ENMevaluate.

Features

  • Species Record Retrieval: Extracts georeferenced records from GBIF, iNaturalist, or Observation.org based on species name, country, and continent.
  • Climate and Land Use Data: Incorporates WorldClim’s BioClim variables and land use data (e.g., vegetation, population density).
  • Database selection: Choose between gbif, inaturalist and observation.org as data sources for species occurrences and set restrictions regarding country/continent.
  • Future Projections: Models species distribution under various CMIP6 climate models across SSPs 126, 245, 370, and 585 for 2041-2060 and 2061-2080.
  • Custom Plotting: Visualize the predicted SDM or ecological niche within specified coordinate ranges. Plotting range does not need to overlap range of occurrences (relevant for invasives).
  • Distribution ranges: Distribution ranges can be estimated using a dynamic alpha-hull approach, restricting predictions to the distribution range. (this feature can be toggled on or off)
  • multicollinearity: Highly correlated (r>0.75) predictors within the range of the specified occurrences are automaticcaly removed.
  • Parameterization: Every MaxEnt model is finetuned with optimal feature class (fc) and regularization multiplier (rm) parameters.

Usage

Clone this repository and run the script in an R environment. To specify parameters, edit them within the params list or interact with the user interface when the document is knitted in RStudio.

Key Parameters

Parameter Description
Species Scientific name of the species
Country Optional 2-letter country code
Continent Select continent or specify all
Database Choose from gbif, inaturalist, observation
Climate.model CMIP6 climate model for future predictions
SSP Shared Socioeconomic Pathway (126, 245, 370, 585)
Working Directory Path to save results

Requirements

The script requires the following packages:

  • dismo, raster, rgbif, sf, rmaxent, rJava, rasterVis, viridis, geodata, ggplot2, stringr, rnaturalearth, caret, dichromat, dplyr, kableExtra, rangeBuilder, ENMeval, cowplot

CMIP6 BioClim and Land Use Variables

  • BioClim: 19 variables including temperature and precipitation measures.
  • Land Use: Variables representing vegetation, built environments, water bodies, population density, human footprint, and elevation.

For more details on Land Use data, see geodata documentation.

Process multiple species

You can use the Process_species.R script to loop over multiple species stored in a 1-column format in a .txt document containing the scientific names. Parameter values can be modified in the script and override the defaults in the markdown script.

Citation

Please make a reference to this github page when using this tool in publications.

License

This project is licensed under the MIT License. Contributions and improvements are welcome!

About

This repo contains an R Markdown script with a UI that performs Species Distribution Modeling (SDM). Predictors are sourced from the BioClim database and databases that store land use.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published