Skip to content

A fork of Futia et al. (2024), extended with the patter algorithms

License

Notifications You must be signed in to change notification settings

edwardlavender/patter-trout

 
 

Repository files navigation

Estimating residency in acoustic telemetry systems

Edward Lavender*

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

*This repository is maintained by Edward Lavender (edward.lavender@eawag.ch).

Introduction

This repository contains methods, written in R and organised as an RStudio Project, supporting Lavender et al. (in prep). Improving residency estimates in acoustic telemetry systems with state-space models. This work is an extension of Futia et al.’s (2024) analysis of heuristic residency metrics in acoustic telemetry systems that includes state-space models fitted using the patter R package (and the Julia backend Patter.jl).

Description

Dependencies

The project forks Futia et al.’s (2024) repository. The project was built in R (version 4.4.1) in RStudio and implements local dependency management using renv.

Directories

The main project directories in this forked project are as follows:

  1. dev/ contains project-management scripts.

    • 01-dev.R and 02-clone.R are standard dv scripts:
      • 01-dev.R records project set up and development;
      • 02-clone.R is used to clone the project (see ‘Instructions’);
  2. data/ contains datasets. This includes the datasets provided by Futia et al. (2024) as well as:

    • patter contains input/output datasets for patter*;
    • inst/ contains RStudio Project-management files generated by dv:
      • dependencies.rds is a list of dependencies;
      • session-info.rds is a record of information about the R Session;
      • tree.rds is a record of the project directory tree (as generated by dv::use_template_tree() in dev/01-dev.R, see below);
  3. R/ contains R scripts (formerly analyses/). Alongside Futia et al.’s (2024) code, this includes:

    • patter_01_setup.R which sets up datasets for analysis with patter;
    • patter_02_exploration.R which explores simulated datasets;
    • patter_03_algorithms.R which analyses simulated datasets using particle algorithms;
    • patter_04_residency.R which provides ‘quick’ residency metrics;
  4. src/ contains R source code.

  5. Julia/ is the Julia project directory.

  6. renv/ implements local dependency management for R.

  • This directory is not currently available in the online version of this repository.

Instructions

Follow the steps described below to clone the project and reproduce the workflow.

  1. Clone the project via GitHub. Follow the instructions in dev/02-clone.R to install packages and directories:

    • Packages. Work through dev/02-clone.R to use renv to regenerate the local project library. Packages can also be manually reinstalled via 02-clone.R.
    • Directories. Rebuild the project directory tree, via dv::use_template_proj() and dv::use_template_tree().
  2. Source (raw) data from the authors.

  3. Implement analysis via relevant scripts (e.g., patter_*.R).

Citations

Futia, M. et al. (2024). Modeling regional occupancy of fishes using acoustic telemetry: a model comparison framework applied to lake trout. Animal Biotelemetry, 12:25. https://doi.org/10.1186/s40317-024-00380-3

Lavender, E. et al. (in prep). Improving residency estimates in acoustic telemetry systems with state-space models.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.