Data and code from: Assessing habitat suitability and landscape connectivity for the endangered forest musk deer (Moschus berezovskii) at its northern distribution margin: A multi-scale ensemble approach
Data files
Jul 21, 2026 version files 179.29 MB
-
Data_and_Code_Forest_Musk_Deer.zip
179.28 MB
-
README.md
6.70 KB
Abstract
For forest-dwelling habitat specialists, landscapes at range margins can serve as critical refugia if they provide suitable topographic and thermal conditions. However, the spatial isolation of these important habitats makes their dispersal pathways vulnerable to anthropogenic barriers. Understanding the habitat suitability and landscape connectivity of such peripheral populations is critical for targeted conservation. This study investigates the endangered forest musk deer (Moschus berezovskii) at its northernmost known distribution limit in China (Huanglong Mountains, Shaanxi). To facilitate representative sampling, we conducted systematic field surveys and utilized DNA molecular identification of fecal remains to collect occurrence data. We employed a multi-scale ensemble species distribution model (ensemble SDM) and circuit theory to evaluate habitat suitability and landscape connectivity. The results indicate that habitat suitability at this environmental edge is associated with scale-dependent factors, particularly steep terrain (slope contribution 56.2 %), annual precipitation (19.1 %), and maximum temperature of the warmest month (12.8 %). Our multi-scale approach reveals a decoupled spatial pattern: forest musk deer rely on macro-scale steep terrain for security while utilizing micro-scale microclimatic refugia to mitigate physiological heat stress. We identified 863.0 km2 of primary habitat, of which 66.1 % is currently protected, revealing substantial conservation gaps. Furthermore, 25 potential dispersal corridors were delineated, showing that localized linear infrastructure intersects with or flanks critical dispersal bottlenecks, impeding landscape permeability. These findings emphasize that conservation planning should shift toward dynamic, network-oriented management. Future strategies should prioritize expanding protected areas to formally encompass unprotected habitats, mitigating infrastructure barriers via targeted crossing structures, and establishing cross-administrative governance alongside local community engagement to sustain the long-term viability of this endangered specialist at its range margins.
Authors and Contact Information
- Authors & Institutions:
- Wangshan Zheng, Pengfei Luo, Yixin Li, Luyao Hai, Xinghu Qin, Liping Yan, Defu Hu (School of Ecology and Nature Conservation, Beijing Forestry University)
- Xuelin Jin (Shaanxi Institute of Zoology)
- Corresponding Authors:
- Liping Yan (yanlp@bjfu.edu.cn)
- Defu Hu (hudf@bjfu.edu.cn)
- Date of Data Collection: 2016–2017, 2024
- Date of Readme Revision: July 2026
General Overview
This repository contains the species occurrence data, environmental variable layers, and R analytical script necessary to replicate the multi-scale ensemble species distribution modeling (ensemble SDM) presented in the associated manuscript. The final continuous habitat suitability map generated by this R script serves as the foundational data input for the subsequent landscape connectivity and dispersal corridor analyses (which were executed using the Linkage Mapper and Circuitscape software environments as described in the manuscript).
File Structure and Description
Master Archive File:
- File: Data_and_Code_Forest_Musk_Deer.zip
- Description: All data, environmental variables, and analytical R scripts described below are compressed within this single master archive. Please download and extract this .zip file to access the individual components.
1. Species Occurrence Data
- File: spe_example.csv
- Description: Contains the verified presence records for the forest musk deer used in the ensemble SDM.
- Important Note on Data Sensitization: As the forest musk deer (Moschus berezovskii) is a highly sensitive and endangered Class I state-protected species threatened by poaching, the precise spatial coordinates (longitude and latitude) in this public dataset have been generalized and coarsened to one decimal place (0.1 decimal degrees precision) to obscure exact field locations, in accordance with sensitive biodiversity data guidelines (e.g., GBIF best practices). These coordinates represent generalized locations (coarsened to grid centroids) rather than precise wild occurrence sites to protect the vulnerable populations from potential human threats.
- Filtering Status: The dataset provided here represents the 177 independent occurrence records retained after applying spatial filtering (a 120-m minimum distance threshold, matching the species' minimum home range) to mitigate spatial autocorrelation.
2. Environmental Variable Layers
- Folder: /EnvironmentData/current/
- Format: .asc (Esri ASCII Raster grids)
- Spatial Resolution: 30 meters
- Projection: UTM Zone 49N (WGS84)
- Description: This folder contains the initial pool of 15 environmental variables (covering bioclimatic, topographic, vegetation, human disturbance, and water resource predictors) to allow users to fully replicate the multi-scale selection and multicollinearity screening processes.
- Final Retained Variables (8 predictors): Following rigorous screening, 8 variables were retained for the final modeling: aspect, maximum temperature of the warmest month (Bio5), annual precipitation (Bio12), landcover, slope, distance to nearest road (Dis_road), distance to nearest river (Dis_river), and distance to nearest residential area (Dis_resident). (Note: Precipitation of the driest month (Bio14) was excluded to resolve multicollinearity and VIF inflation).
3. R Code and Analytical Pipeline
- File: SDM_biomod2_script.R
- Description: The complete, fully annotated R script to replicate the ensemble species distribution modeling workflow. The script is structured into the following sequential steps:
- Data Ingestion: Loading the 177 occurrence records and the initial pool of 15 environmental variables.
- Multicollinearity Screening: Conducting pairwise Pearson correlations (
r) followed by Variance Inflation Factor (VIF) analysis to enforce a strict VIF < 5 threshold. This step includes the manual exclusion of Bio14 to securely retain Bio5 (physiological limit) and Bio12 (environmental driver), resulting in 8 final predictors. - Pseudo-Absence (PA) Generation: Designing 8 distinct background configurations (PA1–PA8) (two replicates each of 300, 500, 800, and 1000 random background points) to evaluate model sensitivity to varying presence-to-background prevalence levels.
- Single-Algorithm Modeling: Running 11 individual algorithms in biomod2 with 20 cross-validation replicates (80 % training / 20 % testing). Six high-performance algorithms meeting the selection criteria (mean ROC > 0.9 and mean TSS > 0.75) were retained: RF, GBM, MARS, MaxEnt, GLM, and CTA.
- Ensemble Modeling & Projection: Building the final weighted-average ensemble SDM (EMwmean) to buffer individual algorithmic variance, and projecting the continuous 0–1 habitat suitability map as an Esri ASCII raster file.
Note on Subsequent Connectivity Analyses: The output rasters (continuous suitability and binary patches) generated by this R script were subsequently exported to ArcGIS. Dispersal resistance was constructed from the continuous suitability using a negative exponential function (Equation 1 in the manuscript, baseline scenario c = 8). Ecological corridors and cumulative current density (pinch points) were then simulated using the Linkage Mapper v2.0 toolbox and Circuitscape v4.0.5 with a 10,000-m cost-weighted distance (CWD) cutoff, as described in Sections 2.4 and 3.4 of the manuscript.
Software Requirements
- R Version: 4.4.2 (or higher recommended)
- Key R Packages Required:
- biomod2 (v.4.2-6-2)
- terra (v.1.7-71 or higher)
- raster
- tidyverse
- usdm (for VIF computation)
- quickcor (for correlation heatmaps)
- Note: Please modify the working directory (setwd) at the top of the R script to match your local machine's folder path before execution.
Sharing and Access Information
- Licenses & Waivers: This dataset is released under the Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. You can copy, modify, distribute, and perform the work, even for commercial purposes, all without asking permission.
- Citation Appreciation: While not required under the CC0 waiver, we would highly appreciate it if users of this dataset or the accompanying scripts cite our original publication in any resulting research.
Species occurrence data were collected via systematic field surveys and verified using DNA molecular identification of fecal remains. To mitigate spatial autocorrelation, the records were spatially filtered using a 120-m minimum distance threshold. To protect this endangered species from potential poaching risks, the precise spatial coordinates in the publicly provided dataset were coarsened (rounded to two decimal places). The environmental data consist of 8 raster layers (30-m resolution), which were retained from an initial pool of 15 variables following multi-scale optimization and rigorous multicollinearity screening (incorporating both Pearson correlation and Variance Inflation Factor analysis, VIF < 5). All species distribution modeling was executed using the ‘biomod2’ package in R.
