Data and code from: Does disturbance drive hybridization? A case study in vascular plants
Data files
Jun 15, 2026 version files 2.67 GB
-
1-_DATA_CHUNKING.R
2.44 KB
-
2A-_COMBINING_CHUNKS_AND_GETTING_SPECIES_NAMES.R
1.08 KB
-
2B-_CREATING_A_NAME_KEY.R
1.50 KB
-
3-_FINAL_TAXONOMIC_AND_GEOGRAPHIC_RESOLUTION.R
4.03 KB
-
4-_REDUCE_YOUR_OCCURRENCES_TO_PRESENCE-ABSENCE_COMMUNITY_MATRIX.R
1.85 KB
-
Calculate_MFA_GenusOverlapMetrics.R
2.26 KB
-
CalculatingHybOcc_HybAbund.R
2.40 KB
-
CalculatingMPD_MNTD.R
1.84 KB
-
CalculatingPsig_GlobalAndRegional.R
4.12 KB
-
Centroids_Continents_WGS_FIXED_BUFFERED.csv
135.96 KB
-
Comm_CentroidsFIXED.RData
2.54 GB
-
EPM_Hybs_FIXED.rds
7.74 MB
-
ExtractEnvironmentalVariables_EPM.R
2.82 KB
-
GDM_Analyses.R
9.65 KB
-
GDM_RASTS.tif
96.35 MB
-
MakingEPM_Grid.R
1.91 KB
-
MAXENT_modeling.R
7.66 KB
-
POWO_archDist.csv
38.04 KB
-
PreparingDataForRF.R
5.44 KB
-
PreparingGDM_matrices.R
1.69 KB
-
Raw_dist.csv
19.90 MB
-
README.md
5.75 KB
-
regional_DataframesLists_Ready4RF_NOSITES.RData
1.10 MB
-
RF_GLM_Analyses.R
3.34 KB
-
tdwg.cpg
5 B
-
tdwg.dbf
26.73 KB
-
tdwg.prj
144 B
-
tdwg.shp
7.28 MB
-
tdwg.shx
3.05 KB
Abstract
Here you will find all code and datasets used to analyze global and regional patterns of hybridization for over 200,000 vascular plants. We used random forest, GLM, GDM, and species distribution modeling to assess spatial, climatic, and phylogenetic-community factors that may drive variation in hybrid occurrence, hybrid abundance, and hybrid community assemblage at both global and regional scales. All code and data required to replicate our analyses are provided here; sample datasets have also been provided, as the vascular plant dataset is very large. Researchers interested in curating and cleaning massive occurrence datasets will find a comprehensive pipeline here (files labeled 1-4), and researchers interested in analyzing correlates of biodiversity patterns using machine learning can also adapt our provided code to their specific needs. All vascular plant occurrences were downloaded from GBIF, and they comprise the most comprehensive curated distribution records for vascular plants globally. These records can be reused under a CC BY-NC copyright license (data not re-hosted in this repository). Researchers using this distribution data should cite the GBIF DOI: https://doi.org/10.15468/dl.qu4f2t.
Dataset DOI: 10.5061/dryad.wm37pvn1b
Description of the data and file structure
This dataset uses cleaned and curated distribution data for over 300 million GBIF occurrence records for all vascular plants (GBIF.org (11 January 2023) GBIF Occurrence Download https://doi.org/10.15468/dl.qu4f2t). Data were downloaded directly from GBIF, and processed in the manner described below. Here, you'll find environmental rasters, community matrices, and all scripts needed to complete data preparation and analysis. In addition, you'll find a numbered tutorial detailing how to work with, and reduce, massive occurrence datasets (including sample data and required cross-reference materials).
Files and variables
File: Calculate_MFA_GenusOverlapMetrics.R
Description: Script for calculating mean family age and custom con-generic overlap metrics for community matrices
File: CalculatingHybOcc_HybAbund.R
Description: script for calculating hybrid occurrence and abundance given a gridded community matrix.
File: CalculatingMPD_MNTD.R
Description: script for calculating global and region-partitioned MPD and MNTD.
File: CalculatingPsig_GlobalAndRegional.R
Description: Script for calculating phylogenetic signal for global and region-partitioned phylogenetic communities.
File: ExtractEnvironmentalVariables_EPM.R
Description: script for extracting values of environmental variables (Rasters) into gridded cells
File: MakingEPM_Grid.R
Description: Script for transforming raw distribution records into gridded presence-absence community matrices with equal area grid cells.
File: MAXENT_modeling.R
Description: script for applying MAXENT models to non-traditional geospatial/ecological datasets.
File: PreparingGDM_matrices.R
Description: script for preparing organismal and environmental data for generalized dissimilarity modeling.
File: PreparingDataForRF.R
Description: script for preparing response and predictor variable sets for global and regionally partitioned random forest analyses
File: RF_GLM_Analyses.R
Description: script for conducting global and regionally partitioned random forest and GLM analyses.
File: GDM_Analyses.R
Description: Script for conducting generalized dissimilarity modeling and visualizing the results in R.
File: EPM_Hybs_FIXED.rds
Description: Community matrix for all vascular plants using R package EPM, as an Rdata file
File: Centroids_Continents_WGS_FIXED_BUFFERED.csv
Description: dataset containing all community matrix cells, their names, the lat-long coordinates of their centroids, and the botanical continent to which they belong.
Variables
- LEVEL1_COD: botanical continent code
- LEVEL1_NAM: botanical continent name
- Site: site name
- long: centroid longitude
- lat: centroid latitude
File: GDM_RASTS.tif
Description: a RasterStack of all environmental variables used for analyses
File: regional_DataframesLists_Ready4RF_NOSITES.RData
Description: collated and prepared datasets to be used in random forest and GLM analyses, as an RData file.
File: 1-_DATA_CHUNKING.R
Description: Part one of massive occurrence dataset management: breaking it into smaller chunks.
File: 2A-_COMBINING_CHUNKS_AND_GETTING_SPECIES_NAMES.R
Description: Part 2 of massive occurrence dataset management: Combining the chunks and getting a few summary statistics
File: tdwg.shp
Description: region-specific shapefile, used for occurrence dataset cleaning and cross validation
File: 2B-_CREATING_A_NAME_KEY.R
Description: Part 2B of massive occurrence dataset management: resolving taxonomy and creating a universal name key
File: 3-_FINAL_TAXONOMIC_AND_GEOGRAPHIC_RESOLUTION.R
Description: Part 3 of massive occurrence dataset management: Cross validation and variable selection.
File: tdwg.cpg
Description: region-specific shapefile, used for occurrence dataset cleaning and cross validation
File: Comm_CentroidsFIXED.RData
Description: community matrix for all vascular plant occurrence data, as an RData file.
File: 4-_REDUCE_YOUR_OCCURRENCES_TO_PRESENCE-ABSENCE_COMMUNITY_MATRIX.R
Description: part 4 of massive occurrence dataset management: Reducing coordinate occurrences to presence-absence community matrices.
File: tdwg.dbf
Description: region-specific shapefile, used for occurrence dataset cleaning and cross validation
File: tdwg.prj
Description: region-specific shapefile, used for occurrence dataset cleaning and cross validation
File: tdwg.shx
Description: region-specific shapefile, used for occurrence dataset cleaning and cross validation
File: POWO_archDist.csv
Description: Plants of the World Online occurrence database, used for occurrence record cross-referencing and cleaning
File: Raw_dist.csv
Description: Sample raw distribution data, to be used in the "Massive Occurrence Dataset Management" pipeline
Code/software
All analyses were conducted in R (some were conducted using High Performance Computing resources, but most can be done on personal computers).
Access information
Other publicly accessible locations of the data:
- massive occurrence dataset manipulation pipeline and tutorial can also be found on my GitHub: https://github.com/lydMor/MassiveOccurrenceDataManipulation
