Data and code for: Leveraging long-term data to improve biodiversity monitoring with species distribution models
Data files
Sep 12, 2025 version files 6.12 MB
-
data_and_code.zip
6.10 MB
-
README.md
15.35 KB
Abstract
This dataset contains 10 years (2010–2019) of bird occurrence records and associated environmental predictors from the H.J. Andrews Experimental Forest (Oregon, USA). Bird distributions were monitored during the breeding season at 184 sites, resulting in presence–absence data for 37 species. These observations are paired with fine-scale environmental data, including hourly under-canopy temperature records from 184 microclimate sensors and LiDAR-derived vegetation structure metrics at 25-m resolution. The dataset also includes derived predictor variables (e.g., growing degree days, canopy cover) and R code used for model calibration, validation, and spatial prediction.
The data were assembled to support the development and evaluation of dynamic species distribution models (SDMs) that account for interannual variability and microclimatic heterogeneity. However, the resources have reuse potential for biodiversity monitoring, ecological forecasting, habitat management, and methodological studies of spatial and temporal model transferability.
Bird and microclimate data were collected as part of long-term monitoring programs at the H.J. Andrews Experimental Forest and do not involve animal capture or manipulation. All species are free-ranging and no additional ethical approvals were required.
When using this dataset, please cite the associated article:
Anselmetto N, Garbarino M, Weldy MJ, Bell D, Daly C, Epps CW, Ferrari N, Kim H, LaManna JA, Lesmeister D, Penaluna BE, Schulze M, Sutton M, Tosa MI, & Betts MG. (2025). Leveraging long-term data to improve biodiversity monitoring with species distribution models. Journal of Applied Ecology.
This repository contains data and R code associated with the manuscript.
The dataset provides a .csv dataframe with bird occurrence data (3 focal species) across 182 sampling locations for 10 years and associated microclimate and vegetation predictors, and R code to reproduce model calibration, validation, and spatial predictions.
Folder Structure
data_and_code.zip/open_data/
├── open_data.Rproj # R Project file
├── .Rhistory # R session history
├── README.txt # Short internal readme
│
├── data/
│ └── data_raw/
│ ├── df/
│ │ ├── birds_microclimate_year-by-year.csv # Main dataset
│ │ └── birds_traits.csv # Functional traits of bird species
│ │
│ ├── raster/
│ │ └── biomass_mg_ha.tif # Biomass raster (25 m resolution)
│ │
│ └── shp/
│ ├── HJA_aoi.shp/.dbf/.prj/.shx/.cpg # Shapefile of study area boundary
│
├── data_output/ # Stores model outputs and figures (user-generated after running scripts)
│
├── pred_maps/
│ ├── HAWO_*_prediction_*.tif # Prediction rasters for Hairy woodpecker
│ ├── RECR_*_prediction_*.tif # Prediction rasters for Red crossbill
│ ├── WIWA_*_prediction_*.tif # Prediction rasters for Wilson’s warbler
│ └── legend_predictions.txt # Legend information for maps
│
└── scripts/
├── 00_define_packages_variables.R # Package loading and global settings
├── 01_calibrate_models.R # Calls calibration functions
├── 02_validate_models.R # Calls validation functions
├── 03_lmem_valid_movement.R # Mixed-effects model: performance ~ framework * movement
├── 04_lmem_valid_body_size.R # Mixed-effects model: performance ~ framework * body size
│
└── functions/
├── 11_calibration_functions.R # Functions for calibrating SDMs
└── 12_validation_functions.R # Functions for validating SDMs
Recommended execution order:
00_define_packages_variables.R → 01_calibrate_models.R → 02_validate_models.R → 03_lmem_valid_movement.R → 04_lmem_valid_body_size.R
Main Dataset: birds_microclimate_year-by-year.csv
This file contains year-by-year data for 184 sites (2010–2019) for three focal species:
- HAWO = Hairy woodpecker (Dryobates villosus)
- RECR = Red crossbill (Loxia curvirostra)
- WIWA = Wilson’s warbler (Cardellina pusilla)
Columns and Definitions
| Column | Description | Units |
|---|---|---|
| ID | Unique record ID (site + year) | - |
| SITE_ID | Sampling site code | - |
| YEAR | Survey year (2010–2019) | - |
| HAWO, RECR, WIWA | Presence/absence of species | 1 = present, 0 = absent |
| Apr_Jun_mean_max | Mean maximum temperature, April–June | °C |
| Jul_Sep_mean_max | Mean maximum temperature, July–September | °C |
| GDD_winter_5 | Growing degree days (>5 °C threshold) during winter | °C·days |
| CDD_0_1_3, CDD_0_4_6, CDD_10_4_6 | Cooling degree days over specified months and thresholds | °C·days |
| m_X_max/mean/min | Monthly max/mean/min temperature for month X (1 = Jan, …, 12 = Dec) | °C |
| max_1_3, max_10_12 | Mean of monthly maximum temperatures (Jan–Mar; Oct–Dec) | °C |
| mean_1_3 | Mean of monthly mean temperatures (Jan–Mar) | °C |
| SD_1_3, SD_4_6 | Standard deviation of monthly mean temperatures (Jan–Mar; Apr–Jun) | °C |
| biomass_mg_ha | Aboveground biomass | Mg/ha |
| closure_2, closure_10, closure_40 | Canopy closure at 2, 10, and 40 m height | % |
| density_0_2, density_2_10 | Vegetation point density in height bins (0–2 m, 2–10 m) | % |
| height_mean | Mean canopy height | m |
| height_sd | Standard deviation of canopy height | m |
| veg_height_DEM | Vegetation height above DEM | m |
| x, y | UTM coordinates (EPSG:32610, WGS84 / UTM zone 10N) | meters |
Additional Datasets
birds_traits.csv
Contains functional trait information for the 37 bird species monitored at H.J. Andrews Experimental Forest derived from AVONET available on https://figshare.com/articles/dataset/AVONET_morphological_ecological_and_geographical_data_for_all_birds_Tobias_et_al_2021_Ecology_Letters_/16586228.
| Column | Description | Type / Units |
|---|---|---|
| species | 4-letter species code | Text |
| common_name | English common name | Text |
| scientific_name | Scientific name | Text |
| sn_spec_code | 6-letter species code | Text |
| family | Taxonomic family | Text |
| order | Taxonomic order | Text |
| cluster_group | Modeling cluster group ID | Integer (unitless) |
| migratory | Qualitative migratory status | {resident, part_migratory, migratory} |
| migration | Encoded migratory status | Integer (1=resident, 2=part_migratory, 3=migratory) |
| habitat | Broad habitat | Text (e.g., Forest) |
| habitat_density | Ordinal habitat density code | Integer (unitless; ordinal) |
| trophic_level | Trophic level | {Herbivore, Carnivore, …} |
| trophic_niche | Diet niche | {Granivore, Invertivore, …} |
| lifestyle | Ecological lifestyle | Text (e.g., Insessorial) |
| Inference | Whether trait values were inferred/imputed | {NO, YES} |
| Beak.Length_Culmen | Bill length from culmen base to tip | mm |
| Beak.Length_Nares | Bill length from anterior edge of nares to tip | mm |
| Beak.Width | Bill width at nares | mm |
| Beak.Depth | Bill depth at nares | mm |
| Tarsus.Length | Tarsus length | mm |
| Wing.Length | Flattened wing chord | mm |
| Kipps.Distance | Kipp’s distance (wing tip to first secondary) | mm |
| Secondary1 | Length of first secondary | mm |
| Hand-Wing.Index | Hand-wing index = 100·(Wing.Length − Secondary1)/Wing.Length | % |
| Tail.Length | Tail length | mm |
| Mass | Body mass | g |
| body_size | Standardized body-size index (higher = larger) | - |
biomass_mg_ha.tif
A raster map of aboveground biomass at 25 m resolution, used to construct spatiotemporal modeling blocks. Units: Mg/ha.
HJA_aoi shapefile
Boundary polygon of the study area (H.J. Andrews Experimental Forest, Oregon, USA).
Projection: UTM zone 10N (EPSG:32610). NB: keep the .shp, .shx, .prj, .dbf, .cpg in the same folder and load the .shp file in QGis or R to inspect it!
Prediction rasters (.tif)
Raster outputs of spatial predictions from boosted regression tree (BRT) models for each of the 3 focal species under different modeling frameworks.
Files are named according to:
Species_Year_Framework_prediction.tif
(e.g., HAWO_2015_BRT_prediction_RY.tif).
Units: probability of occurrence (0–1).
legend_predictions.txt
Provides classification legend and metadata for interpreting prediction rasters.
External Data Sources
- Bird response data (full set of 37 species): Available at
- Environmental Data Initiative: https://doi.org/10.6073/pasta/161101744422c412802e8287dbd8b663
- H.J. Andrews LTER database (code SA024): https://andlter.forestry.oregonstate.edu/data/
- Microclimate predictors: H.J. Andrews LTER database (code MS045): https://andrewsforest.oregonstate.edu/data
- LiDAR data: Oregon Department of Geology and Mineral Industries (Oregon Lidar Consortium): https://www.oregongeology.org/lidar
Software
- R (≥4.2.3) – statistical computing (https://cran.r-project.org)
- Required R packages are listed in 00_define_packages_variables.R
- Raster data and shapefiles can be opened with QGIS (https://qgis.org)
__________________________________________________________________________________________________________________
Usage Notes (formats & how to open them)
CSV files (*.csv)
- Open with R (e.g., data.table::fread()), Python (e.g., pandas.read_csv()), or spreadsheet software (e.g., Microsoft Excel, LibreOffice Calc).
- Text encoding is UTF-8; field delimiter is comma.
GeoTIFF rasters (*.tif)
-
Open with QGIS, SAGA, or other GIS softwares.
-
In R:
terra::rast("path/to/file.tif") -
In Python:
import rasterio with rasterio.open("path/to/file.tif") as src: arr = src.read(1); print(src.crs, src.transform)
Shapefiles (*.shp)
-
A shapefile consists of multiple files: at minimum .shp, .shx, .dbf, .prj, .cpg. Keep all together in the same directory; do not rename only one component.
-
Open with QGIS (Layer → Add Layer → Add Vector Layer).
-
In R:
library(sf) aoi <- sf::st_read("data/data_raw/shp/HJA_aoi.shp") -
In Python:
import geopandas as gpd aoi = gpd.read_file("data/data_raw/shp/HJA_aoi.shp")
Coordinate Reference System (CRS)
- Unless otherwise noted, spatial files use WGS84 / UTM zone 10N (EPSG:32610).
- When overlaying rasters/vectors, reproject layers as needed in QGIS, R, or Python.
Reproducibility tips
- Run scripts in the provided order from the project root (
open_data.Rproj). - Results and figures are written to
data_output/andpred_maps/. - Large rasters may require ≥8 GB RAM; see
00_define_packages_variables.Rfor package versions.
Notes and Limitations
- Only three species are included in this dataset as an example; full response data must be obtained from the references above (bird occurrences + microclimate conditions).
- Predictor preprocessing (microclimate downscaling, LiDAR extraction) is not included; this dataset starts from ready-to-use predictor values as it is focused on the different temporal modeling approaches.
- Prediction functions are not provided here but are available upon request - as other chunks of code.
- Presence/absence is based on at least one detection during the breeding season.
Citation
When reusing this dataset, please cite:
Anselmetto N, Garbarino M, Weldy MJ, Bell D, Daly C, Epps CW, Ferrari N, Kim H, LaManna JA, Lesmeister D, Penaluna BE, Schulze M, Sutton M, Tosa MI, & Betts MG. (2025). Leveraging long-term data to improve biodiversity monitoring with species distribution models. Journal of Applied Ecology.
