This repository provides the R code used in the following research paper:
Jessica Harvey-Carroll, Javier Menéndez-Blázquez, Jose Luis Crespo-Picazo, Ricardo Sagarminaga and David March (2025). Unlocking sea turtle diving behaviour from low-temporal resolution time-depth recorders, Scientific reports.
- Edit
config.Rwith your computer parameters - Folder
/funcontains custom functions - Folder
/Rcontains R scripts, which are organized by processing workflow
- Porcessing tracking data (individual level)
- 1.1. Preprocessing
- 1.2. Filtering
- 1.3. State-space-model (SSM)
- Processing TTDR data (individual level)
- 2.1. QC of depth and temperature
- 2.2. Zero-offset correction
- 2.3. Dive segmentation
- 2.4. Validation of segmentation with 1-minute data (Supplementary)
- 2.5. Diving metrics
- 2.6. Incorporate sensor data: SSM and SST
- Diving behaviour (all turtles)
- 3.1. Hidden-markov model
- Metadata table
- Map with tracking data, color coded with SSM behaviour
- Segmentation method
- Diving profiles by state
- Diving behaviour budgets per turtle