Code from: Scrutinizing the Wallacean shortfall: Global gaps in snake occurrence data across space and environment
Data files
May 06, 2026 version files 41.58 MB
-
AA.R
17.52 KB
-
AT.R
17.44 KB
-
Chelsa.zip
4.97 MB
-
EP.R
17.76 KB
-
Geo_and_env_distances.R
19.78 KB
-
Grids.zip
36.30 MB
-
Histograms_and_Cumulative_number.R
29.38 KB
-
IM.R
17.48 KB
-
Inventory_completeness_analysis.R
8.94 KB
-
NA.R
17.37 KB
-
NT.R
17.45 KB
-
Organizing_raster_files.R
16.56 KB
-
Rarity.R
7.99 KB
-
README.md
3.21 KB
-
well_sampled_1.csv
76.68 KB
-
well_sampled_2.csv
20.23 KB
-
WP.R
17.76 KB
Abstract
Occurrence records are fundamental for ecological and evolutionary research, providing key information on species’ geographic ranges. However, these records are often taxonomically, spatially, and temporally biased, requiring caution in their use. Here, we analysed the spatial coverage of occurrence records for over 3,500 snake species worldwide to identify geographical gaps, biases, and priority areas for surveys. To do this, we first compiled occurrence records for all continental snake species worldwide and assigned them to an equal-area grid. Recognizing that biogeographic realms differ in evolutionary histories, environmental conditions, and sampling efforts, we conducted all analyses separately for each realm. Using this global dataset, we then calculated inventory completeness metrics to identify well-sampled grid cells. We then used high-resolution climate data to describe the environmental space of each realm and evaluate the extent to which its climatic gradients are represented by well-sampled cells. Finally, we calculated geographic and environmental distances from each cell to the nearest well-sampled cell within each realm, thereby identifying priority areas for future surveys.
This repository contains the code necessary to perform the analyses presented in the paper 'Scrutinizing the Wallacean shortfall: Global gaps in snake occurrence data across space and environment'
well_sampled_1.csv: This file contains the well-sampled cells identified through the Inventory completeness analyses for the Nearctic, Western Palearctic, and Australasia realms.
- id: Identifier of the well-sampled grid cell.
- Longitude: Longitude of the well-sampled grid cell in decimal degrees.
- Latitude: Latitude of the well-sampled grid cell in decimal degrees.
- Realm: Biogeographic realm in which the well-sampled grid cell is located.
well_sampled_2.csv: This file contains the well-sampled cells identified through the Inventory completeness analyses for the Neotropical, Afrotropical, Eastern Palearctic, and Indomalayan realms.
- id: Identifier of the well-sampled grid cell.
- Longitude: Longitude of the well-sampled grid cell in decimal degrees.
- Latitude: Latitude of the well-sampled grid cell in decimal degrees.
- Realm: Biogeographic realm in which the well-sampled grid cell is located.
Chelsa.zip: This file contains the 19 bioclimatic variables obtained from CHELSA, aggregated at a 1° resolution, used to perform the environmental analyses.
Grids.zip: This file contains the vector data used in the analyses:
- global_grid.gpkg: Global grid with 1° cells used in the inventory completeness analyses.
- AA_realm.gpkg, AT_realm.gpkg, EP_realm.gpkg, IM_realm.gpkg, NA_realm.gpkg, NT_realm.gpkg, WP_realm.gpkg: Individual 1° grids for each biogeographic realm. These files are used to separate well-sampled cells in each realm, organize raster files, and calculate geographic and environmental distances.
- bioRealms.gpkg: The seven biogeographic realms cropped to include only regions of snake occurrence. Used to crop bioclimatic variables and separate occurrence records by realm.
- realms.gpkg: The seven biogeographic realms used as silhouettes in the cumulative number and histogram figures.
Histograms_and_Cumulative_number.R: Contains the code necessary to produce Figures 1 and 2 of the manuscript and Figure S1 of the Supporting Information.
Inventory_completeness_analysis.R: Contains the code used to calculate inventory completeness and to produce Figure S2 of the Supporting Information.
Organizing_raster_files.R: Contains the code necessary to organize bioclimatic variables before they are used in the environmental analyses.
AA.R, AT.R, EP.R, IM.R, NA.R, NT.R, WP.R: These scripts contain the code necessary to perform environmental analyses for each biogeographic realm and to produce Figure S3 of the Supporting Information, as well as Figures S4–S10 (panels A–E).
Rarity.R: Contains the code necessary to produce Figure 3 of the manuscript and Figures S4–S10 (panel F).
Geo_and_env_distances.R: Contains the code necessary to calculate geographic and environmental distances and to produce Figure 4 of the manuscript and Figures S4–S10 (panels G–I) of the Supporting Information.
The list of accepted snakes and all their synonyms was used to search for occurrence records in the Global Biodiversity Information Facility. The inventory completeness analysis was performed for all grid cells of 110 x 110 km and, for each biogeographic realm, the well-sampled cells were selected based on four parameters: slope, number of records, completeness, and record-to-richness ratio. After that, the 19 bioclimatic variables were downloaded and cropped for each realm. To reduce the dimensionality of bioclimatic variables and synthetically describe the environmental space, we performed a Principal Component Analysis (PCA) for each terrestrial realm. The first and second principal components were used to represent the variation in the bioclimatic variables within each realm. For each biogeographic realm, we quantified the number of climate types and the proportion of these that are covered by well-sampled cells. To define the number of climatic types, we classified the PCA axes into intervals of equal size, where environmentally similar regions are grouped into climatic bins, so that one climatic bin can represent several cells in the geographic space. Finally, we calculated the geographic distance between each grid cell and all well-sampled cells for each biogeographic realm. This distance can be interpreted as a proxy for how isolated a cell is from well-sampled cells.
