Overview

The R package LTabundR offers tools that facilitate and standardize design-based line-transect abundance estimation of cetaceans, based on the typical workflow used following NOAA Fisheries ship surveys in the central and eastern Pacific (e.g., Barlow 2006, Barlow and Forney 2007, Bradford et al. 2017, Bradford et al. 2021).

That workflow typically involves four stages:

(1) Data processing

  • This step involves reading in and processing raw DAS files (the files produced by the software Wincruz commonly used during NOAA Fisheries line-transect surveys in the Pacific), breaking effort into discrete segments for variance estimation, correcting group size estimates according to calibration models, and then averaging together group size estimates for each sighting.

  • Most importantly, this step standardizes the data structure in a way that all downstream analyses depend upon. The name we will use for this standardized data object is a cruz object.

  • The key LTabundR functions you will use in this stage are load_settings() and process_surveys().

(2) Data exploration

  • This step involves summarizing effort and sightings totals, determining the appropriate truncation distances for each species – or pool of species – based on sample sizes, and producing maps.

  • The key LTabundR functions in this stage are cruz_explorer() (a Shiny dashboard for data exploration) and the summarize... functions, such as summarize_species() and summarize_effort().

(3) Data analysis

  • This step involves estimating Beaufort-specific “relative” trackline detection probabilities – i.e., g(0) estimates; estimating density/abundance with detection functions and determining the CV of that estimate; handling stratified analyses; and evaluating if random variation in the encounter rate of a species may be driving differences in abundance estimates over time.

  • The key LTabundR functions in this stage are g0_table() and lta().

  • Most analyses are group-based analyses, but false killer whales (Pseudorca crassidens) are analyzed differently using a subgroup-based approach. For this exception, the function lta_subgroup() will be used.

(4) Reports & plots

  • This step produces summary tables of the processed data and line-transect estimates; plots the best-fitting detection function model(s); and plots species-specific abundance estimates (and their CV).

  • They key LTabundR functions in this stage are lta_report(), df_plot(), and lta_plot().

This user’s guide is structured around these four workflow stages. Those pages are followed by a case study with full-fledged example code. The guide concludes with appendices that offer further details and minutiae on certain aspects of the package.

Throughout this user’s guide, we will primarily be using example data from the winter Hawaiian Islands Cetacean Ecosystem and Assessment Survey (WHICEAS) of 2020, along with the summer-fall HICEAS 2017 data collected within the WHICEAS study area.

Installation

Note: BETA testing only. This package is currently in beta testing and is not yet ready for widespread use.

The LTabundR package is available on GitHub here. To install directly within R, use the following code:

# Install support packages, if needed
if (!require('devtools')) install.packages('devtools')

# Increase timeout for download, since there are datasets
options(timeout=9999999)

# Install LTabundR remotely from GitHub
devtools::install_github('PIFSC-Protected-Species-Division/LTabundR')

LTabundR depends upon R versions 2.10 or later. It was developed and published with R 4.3.1 on a 64-bit Mac OS.

You may need to download “Rtools” if it is not already installed on your computer. You can do so here.

# Load into session
library(LTabundR)

# Check package version
utils::packageVersion('LTabundR')
[1] '1.40'

A few notes:

  • The LTabundR package contains large built-in datasets and may take several minutes to install.

  • The LTabundR package depends upon many other R packages within its functions. Any of those that you don’t yet have will be installed as part of the LTabundR installation process.

  • In this vignette we rely upon dplyr pipes, ggplot2 plots, and other conventions from the tidyverse. These packages will be installed, if needed, when you install LTabundR.

Credits

This R package is a consolidation of code developed over many years by many NOAA Fisheries scientists, primarily Jay Barlow, Tim Gerrodette, Jeff Laake, Karin Forney, Amanda Bradford, and Jeff Moore. This package was developed by Eric Keen and Amanda Bradford with support from the NOAA Fisheries National Protected Species Toolbox Initiative.