Data and code from: Diversity regulation in local communities: Colonization and extinction dynamics in North American birds
Data files
Jun 30, 2026 version files 2.42 MB
-
1_loading_subsampling_data.R
11.79 KB
-
10_corespecies_analyses.R
25.61 KB
-
2_variables_calculation.R
17.87 KB
-
3_correlations.R
18.52 KB
-
4_maps.R
3.30 KB
-
5_random_forest.R
7.69 KB
-
6_SEMs.R
4.48 KB
-
7_3yearsbins_variables.R
13.45 KB
-
8_3yearsbins_analyses.R
22.35 KB
-
9_corespecies_variables.R
22.40 KB
-
BBS_cores_final_averagedyears.RData
88.70 KB
-
BBS_for_3yearsbins_supplement_analysis.RData
80.30 KB
-
BBS_subsampled.RData
1.11 MB
-
BBS_variables_allyears.RData
686.25 KB
-
BBS_variables_averagedyears.RData
90.19 KB
-
README.md
11.03 KB
-
routes_environment.RData
204.71 KB
Abstract
The dataset can be reused to reproduce the analyses, figures, and supplementary results from the associated manuscript, and to support further studies of avian community diversity, colonization and extinction dynamics, species richness, and spatial or temporal patterns in North American bird communities. The original Breeding Bird Survey data must be downloaded separately to rerun the initial data-processing script; all subsequent scripts use the processed files provided here. The dataset contains derived ecological data from a public biodiversity monitoring program and does not include human-subject data or personal information. Users should cite this Dryad dataset and the original North American Breeding Bird Survey data release when reusing the data or code.
Dataset DOI: 10.5061/dryad.5dv41nshz
Dataset overview
This dataset contains R scripts and processed data supporting the manuscript Diversity regulation in local communities: Colonization and extinction dynamics in North American birds. The files are derived from the North American Breeding Bird Survey, 2022 release (https://doi.org/10.5066/P97WAZE5, Ziolkowski et al. 2022), and are organized as ten R scripts and six .RData files. The data files include temporally and spatially subsampled Breeding Bird Survey records, route-level environmental and metadata variables, calculated community variables for each route and year, variables averaged across years, and datasets used for supplementary analyses based on three-year bins and core species. The R scripts document the full analytical workflow, including data loading and subsampling, variable calculation, correlations and generalized linear models, mapping, random forest analyses, structural equation models, and supplementary analyses.
This archive contains R scripts and processed data supporting the manuscript Diversity regulation in local communities: Colonization and extinction dynamics in North American birds.
Uploaded: 30/11/2025
Authors: Eliska Bohdalkova, David Storch
Analyses are based on the North American Breeding Bird Survey (BBS) 2022 release (Ziolkowski et al. 2022; https://doi.org/10.5066/P97WAZE5).
The submission includes:
- 10 R scripts (
*.R) - 6 R binary data files (
*.RData)
File naming conventions
Script files use numeric prefixes to indicate execution order:
1_...Rto6_...R: main workflow7_...Rand8_...R: supplementary workflow using 3-year bins9_...Rand10_...R: supplementary workflow using core species only
Data file naming:
BBS_*: processed BBS-derived data objects used in analysesroutes_environment.RData: route-level metadata and environmental covariates
Software requirements
Required software:
- R (tested with R 4.5.2 (2025-10-31))
R packages used across scripts:
dplyrtidyversetidyrtibbleggplot2corrplotsfrnaturalearthviridisrandomForestlavaanraster
Optional installation command:
install.packages(c(
"dplyr", "tidyverse", "tidyr", "tibble", "ggplot2", "corrplot",
"sf", "rnaturalearth", "viridis", "randomForest", "lavaan", "raster"
))
External data dependency
Script 1_loading_subsampling_data.R requires the original BBS 2022 release files downloaded separately from:
The BBS source directory is expected as 2022BBSrelease/ under the project working directory.
Execution order and workflow
Main analysis:
1_loading_subsampling_data.R-> createsBBS_subsampled.RData2_variables_calculation.R-> createsBBS_variables_allyears.RDataandBBS_variables_averagedyears.RData3_correlations.R-> figures/correlations/GLMs (no file written)4_maps.R-> map figures (no file written)5_random_forest.R-> random forest analyses (no file written)6_SEMs.R-> SEM analyses (no file written)
Supplementary analysis A (3-year bins):
7_3yearsbins_variables.R-> createsBBS_for_3yearsbins_supplement_analysis.RData8_3yearsbins_analyses.R-> analyses and figures (no file written)
Supplementary analysis B (core species):
9_corespecies_variables.R-> createsBBS_cores_final_averagedyears.RData10_corespecies_analyses.R-> analyses and figures (no file written)
File-by-file description
Scripts (*.R)
1_loading_subsampling_data.R
Loads raw BBS files, filters to quality-approved runs (RunType == 1), passerines only, applies temporal and spatial subsampling, and saves filtered survey table.2_variables_calculation.R
Computes route-year biodiversity and turnover metrics, population variability, route-level means, environmental joins, species-pool metrics; saves main analysis tables.3_correlations.R
Produces scatterplots, correlation tests/matrices, and GLMs for main and supplementary datasets.4_maps.R
Produces geographic maps of extinction probability and species richness.5_random_forest.R
Fits random forest models for extinction probability and summarizes variable importance.6_SEMs.R
Fits structural equation models (SEM) for extinction probability variants.7_3yearsbins_variables.R
Aggregates data into 3-year bins, computes analogous metrics for supplementary analysis, and saves summary table.8_3yearsbins_analyses.R
Runs analyses/visualizations for the 3-year bin supplementary dataset.9_corespecies_variables.R
Classifies route-level species occupancy into core/transient groups, retains core species, recomputes analysis metrics, and saves summary table.10_corespecies_analyses.R
Runs analyses/visualizations for the core-species supplementary dataset.
Data files (*.RData)
BBS_subsampled.RData
Object:survey3(data.frame, 604,788 rows x 9 columns)
Description: temporally and spatially filtered survey records used as the analysis starting point.routes_environment.RData
Object:routes_environment(data.frame, 5,784 rows x 9 columns)
Description: route metadata and environmental covariates (ndvi,seasonality) keyed bySpecificID.BBS_variables_allyears.RData
Object:bbs(data.frame, 16,150 rows x 19 columns)
Description: route-year table (1995-2019) with extinction/colonization and community structure metrics.BBS_variables_averagedyears.RData
Object:bbs_summed(tbl_df, 646 rows x 26 columns)
Description: route-level means of main-analysis metrics with environmental and species-pool variables.BBS_for_3yearsbins_supplement_analysis.RData
Object:bbs_3ybins_summed(data.frame, 646 rows x 20 columns)
Description: route-level summary metrics for supplementary analysis using 3-year temporal bins.BBS_cores_final_averagedyears.RData
Object:bbs_cores_summed(data.frame, 646 rows x 26 columns)
Description: route-level summary metrics for supplementary analysis restricted to core species.
Data dictionary (variables and interpretation)
Variables below appear across one or more tabular objects in this archive.
Identifier and key variables
SpecificID: route identifier asCountryNum_StateNum_Route(character).route_year_code: composite keySpecificID_year(character).RouteDataID: BBS route-run identifier from source data (integer).CountryNum: BBS country code (integer).StateNum: BBS state/province code (integer).Route: BBS route number (integer).RouteName: route name/label (character).bcr: Bird Conservation Region code (integer).
Time variable
year: calendar year of survey/observation (integer; 1995-2019 in filtered tables).
Spatial/environmental variables
lat: latitude in decimal degrees (WGS84; north positive).lon: longitude in decimal degrees (WGS84; west negative).ndvi: normalized difference vegetation index (unitless index).seasonality: NDVI seasonality metric (unitless, provided inroutes_environment).
Species identity and abundance variables
aou: American Ornithological Union species code (integer).SpeciesTotal: total count of individuals of speciesaouon a route in a given year (count).tot_abun: total abundance across species for route-year (count).mean_abun: mean abundance per species for route-year (count per species).mean_logabun: mean of natural-log transformed species abundances for route-year (ln(count), unitless on log scale).sp_rich: species richness (number of species detected; count).sp_rich_cummul: cumulative species richness across a 3-year bin (count of unique species).spool: species pool size in the corresponding BCR (count of unique species).SrelativeToPool: ratio of richness to species pool (sp_rich / spool), unitless proportion.
Colonization/extinction variables
ext_count: number of species present at time t and absent at t+1 (count).ext_prob: extinction proportion,ext_count / species richness(unitless, 0-1).ext_count_nosingl: extinction count excluding singleton species (count).ext_prob_nosingl: extinction proportion excluding singleton species (unitless, 0-1).col_count: number of species present at time t and absent at t-1 (count).col_prob: colonization proportion,col_count / species richness(unitless, 0-1).col_count_nosingl: colonization count excluding singleton species (count).col_prob_nosingl: colonization proportion excluding singleton species (unitless, 0-1).
Community structure and dynamics variables
dominance_rel: relative dominance,max species abundance / total abundance(unitless, 0-1).rarity_singl: proportion of singleton species (species with abundance = 1), unitless (0-1).rarity_5: proportion of species with abundance below 5% of route total abundance, unitless (0-1).variability: mean absolute log population growth rate across species, based on|ln(N_t / N_t-1)|(unitless).residuals_S_NDVI: residuals from route-level modellog(species richness) ~ log(ndvi)(unitless residual on log scale).
Route filtering support variable
pair_years: number of consecutive year pairs available per route during filtering (count; higher values indicate more complete temporal coverage).
Missing values and notes
ndvi,seasonality, andresiduals_S_NDVIcontain missing values for a small subset of routes (8 routes in route-level analysis tables).- Some route-year metrics in
BBS_variables_allyears.RDataareNAwhere required consecutive years are unavailable. routes_environment.RDataincludes more routes (5,784) than the filtered analysis set (646 routes).
Minimal example to inspect included objects
load("BBS_variables_averagedyears.RData")
str(bbs_summed)
summary(bbs_summed$ext_prob)
Access information
Data derived from:
- North American Breeding Bird Survey, 2022 release
https://doi.org/10.5066/P97WAZE5
References
R Core Team (2025). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/.
Ziolkowski Jr., D.J., Lutmerding, M., Aponte, V.I., and Hudson, M-A.R., 2022, North American Breeding Bird Survey Dataset 1966-2021: U.S. Geological Survey data release, https://doi.org/10.5066/P97WAZE5.
