DOI: 10.5878/mjhw-wp21
title: Data and code for: Estimating pike (Esox lucius) population dynamics and capture probability by recreational angling using spatial capture-recapture models in a Baltic Sea spawning area
title: Data och kod för: Estimating pike (Esox lucius) population dynamics and capture probability by recreational angling using spatial capture-recapture models in a Baltic Sea spawning area

description: The dataset contains both data and code associated with the following manuscript: "Estimating pike (Esox lucius) population dynamics and capture probability by recreational angling using spatial capture-recapture models in a Baltic Sea spawning area".

This study aimed to estimate the population size, capture probability, and movement patterns of pike in Byviken, a shallow bay in the Stockholm Baltic Sea archipelago. We applied spatial capture-recapture (SCR) methods during the spring season each year from 2017 to 2022. The pike where caught by rod and reel and marked with T-bar tags in order to identify the individuals during subsequent captures. The dataset was created in a collaborative project between the Swedish University of Agricultural Sciences and the County Administrative Board of Stockholm.

The following data files are loaded in the "run SCR models.R" script to run all model combinations:

## pike_cost_ssdf.Rdata ##

Contains a list of 6 elements (one per year, 2017–2022). Each element includes the cost surface at 20 x 20 meter pixel resolution, with the variables X and Y—that is, the longitude and latitude in SWEREF 99TM. The variables include "Depth" (approximate depth in meters – not used in this analysis), "Shelter" (whether or not the pixel is in a sheltered area – not used in this analysis), and "Vegetation", which is the z-score distance to vegetation and was used as input in the asymmetric space use model.

## pike_scrFrame.Rdata ##

Contains a list of 11 elements.
1 caphist: A list of 6 elements (one per year from 2017 to 2022). Each contains an individual-by-trap-by-occasion matrix.
2 traps: A list of 6 elements (one per year from 2017 to 2022). Each contains the names of traps (1 to 155) along with their X and Y coordinates in SWEREF 99TM.
3 trapCovs: A list of 6 elements (one per year from 2017 to 2022). Each contains a list of data frames, one per sampling occasion, with the following variables. Temperature is the degrees Celsius measured by the anglers during each fishing occasion. TEAM is 1 or 0 depending on which team was fishing. SEAL indicates whether seals or signs of seals were detected. This variable was not used in the analysis.
4 indCovs: A list of 6 elements (one per year from 2017 to 2022). Each contains a data frame where each row represents an individual. The data frames include the variable sex, which is explained in the description of sigCovs below, and removed, which shows the number of sampling occasions the individual was present during the session (year).
5 sigCovs: Contains a data frame with session-level covariates for sigma (one per year from 2017 to 2022) and the binary covariate sex. This covariate is used to distinguish between two size classes of pike: greater than or equal to 42 and less than 60 centimeters, and greater than or equal to 60 centimeters.
6 trapOperation: A list of 6 elements (one per year from 2017 to 2022). It indicates whether each trap (1 to 155) was operational during each occasion.
7 occasions: An integer for each session (one per year from 2017 to 2022) representing the number of sampling occasions.
8 type: Not relevant for this description.
9 mmdm: The mean maximum distance moved.
10 mdm: The maximum distance moved.
11 telemetry: Not relevant and was not included in the models.

## pike_ssdf.Rdata ##

Includes the state space at 30 x 30 meter pixel resolution. The format is identical to that of pike_cost_ssdf.Rdata, described above.
(For a more detailed description on the structure of the files going into the oSCR.fit() function please consult: Sutherland, C., Royle, J. A., & Linden, D. W. (2019). oSCR: a spatial capture–recapture R package for inference about spatial ecological processes. Ecography, 42(9), 1459-1469.)

## run_SCR_models.R ##

Runs all SCR model combinations (these will likely take a very long time to run) and saves the models to:

PIKE_MODELS_ECOLOGICAL.Rdata
PIKE_MODELS_EUCLIDEAN.Rdata

The models are loaded in some of but not all of the following scripts:
"AIC_table1.R", "table2_variable_importance_and_p_values.R", and "table_3_sensitivity_table.R" → Used to generate Table 1, Table 2, and Table 3
"Fig2_histograms.R" → Produces Figure 2
"Fig3_cap_prob_figures.R" → Produces Figure 3
"Fig4_and_6_density_figures.R" → Produces Figures 4 and 6
"Fig5_observed_captures_and_observed_captured_percentage_of_population.R" → Produces Figure 5
"Fig7_predicted_home_ranges.R" → Produces Figure 7
"Fig1S_simulate_capture_data_under_model_M0.R" → Simulates data (also available in "results_df_N_1000.txt" and "results_df_N_2500.txt") under different population size and capture probability, produces Figure 1S (supplemental figure)

"model_averaged_intercepts_with_95_CI.R" → Produces model-averaged intercepts for density, capture probability, and sigma

Script for Figure 1 is not included in this dataset.

## "byviken_edf.txt" ##

The file "byviken_edf.txt" contains individual capture data, where each row represents a capture event. The columns are as follows:

"Session" — 1 to 6, one for each year from 2017 to 2022.
"ID" — the ID of the individual.
"Occasion" — the sampling occasion within the session when the capture occurred.
"Detector" — the trap (1 to 155) where the capture was made.
"Sex" — Male, Female, or Unknown.
"Length" — the length of the fish in centimeters.
"Weight" — the weight of the fish in grams.
"Spawn" — indicates if the pike had spawned: UTLEKT = spawned, OLEKT = not spawned, ODEF = undefined.
"Date" — the date of the capture.