Data and code from: A framework for investigating fish population density responses to habitat fragmentation
Data files
Jul 27, 2026 version files 108.46 KB
-
h_pop_dy_pois_2_habitat_onePeriod.stan
3.13 KB
-
h_pop_dy_pois_2_habitat.stan
3.34 KB
-
h_pop_dy_pois_3_habitat_onePeriod.stan
2.54 KB
-
h_pop_dy_pois_3_habitat.stan
2.68 KB
-
h_pop_dy_pois_4_habitat_onePeriod.stan
2.22 KB
-
h_pop_dy_pois_4_habitat.stan
2.35 KB
-
hab_variables.rds
22.74 KB
-
oikos_data_anlaysis.R
17.86 KB
-
pooled_catch_effort_by_species.rds
47.09 KB
-
README.md
4.53 KB
Abstract
Dataset DOI: 10.5061/dryad.gb5mkkx5s
Description of the data and file structure
Fish and habitat were sampled at six sites in most streams, three sample sites above and three below the barrier, or at corresponding locations in the reference stream (in some cases 3 samples below were not possible due to proximity to the lake). Site location within streams was determined primarily by access, with each site separated by at least five to seven times the stream width. Sampling was not conducted immediately upstream and downstream of the barriers due to unwadeable conditions. The length of each site was five to seven times the stream width. A single upstream pass within the site, using backpack electrofisher, was conducted and all fish were collected. Most fish were identified and measured for total length in the field. Fish that could not be identified in the field were preserved and later identified in a lab. Within each sampling site, habitat measures were taken at three evenly spaced transects (upstream limit, middle, and downstream limit). At each transect, stream width, maximum depth, and a pebble count of 50 stream bed particles were measured to determine in-stream habitat characteristics. Substrate was classified according to the Wentworth scale. In addition to physical habitat measurements, temperature and conductivity were measured.
Files and variables
File: pooled_catch_effort_by_species.rds
Description: Catch and effort data of fish captured using backpack electrofishing.
- pair_id: ID number for a barrier-stream reference-stream pair (references original stream numbers from datasheets)
- pair_id_num: unique ID for each stream pair, ensured to be sequential without gaps
- Year: year of sampling
- Stream.Name: Name of the stream
- stream_id: ID number for the stream
- barrier: dummy variable indicating if a barrier was present at survey year
- position: location of survey (upstream or downstream of barrier)
- segment: survey transect (numbered with 1 being closest to the barrier)
- survey_length: length of the survey transect (meters)
- species: species name
- total_caught: number of fish captured
- yearBuilt: year the barrier was built (NA if no barrier)
- barrierAgeAtSample: age in years of the barrier at time of sampling (NA if no barrier)
- period: indicates if data are from 1996/1997 ('90s') or 2023
File: hab_variables.rds
Description: Habitat survey data
- period: indicates if data are from 1996/97 or 2023
- pair_id: unique pair ID for reference/barrier stream pairings
- Stream.Name: stream name
- barrier: dummy variable indicating if a barrier was present in stream at time of sample
- position: survey location relative to barrier (upstream or downstream)
- segment: transect number
- width: stream width (meters)
- max_depth: maximum transect water depth (meters)
- prop_clay: proportion clay
- prop_silt: proportion silt
- prop_sand: proportion sand
- prop_gravel: proportion gravel
- prop_boulder: proportion boulder
Code/software
R version 4.6.0 (2026-04-24 ucrt) -- "Because it was There"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64
library(plyr)
library(ggplot2)
library(gridExtra)
library(ggrepel)
library(dplyr)
library(rstan)
library(scico)
library(DHARMa)
File: oikos_data_anlaysis.R
Description: R Code for running analysis (calls data files and Stan models)
File: h_pop_dy_pois_2_habitat.stan
Description: Stan model for running analysis with barrier impact modeled using logistic population growth dynamics
File: h_pop_dy_pois_2_habitat_onePeriod.stan
Description: Stan model for running analysis with barrier impact modeled using logistic population growth dynamics (for round goby only)
File: h_pop_dy_pois_3_habitat.stan
Description: Stan model for running analysis with barrier impact modeled as stepwise function
File: h_pop_dy_pois_3_habitat_onePeriod.stan
Description: Stan model for running analysis with barrier impact modeled as stepwise function (for round goby only)
File: h_pop_dy_pois_4_habitat.stan
Description: Stan model for running analysis with no barrier effect
File: h_pop_dy_pois_4_habitat_onePeriod.stan
Description: Stan model for running analysis with no barrier effect (for round goby only)
