dive_acoustic_summary: Dive-level acoustic and tag data, for one or more tags

View source: R/dive_acoustic_summary.R

dive_acoustic_summaryR Documentation

Dive-level acoustic and tag data, for one or more tags

Description

Summarize SMRT (and/or Lander2) tag data from .nc files for each foraging dive cycle. Note: Currently for only SMRT tags; function and help will be updated to allow inclusion of Lander2 data as well when possible.

Usage

dive_acoustic_summary(
  tag_id = zc_smrt_tag_list,
  nc_path = getwd(),
  ae_path = getwd(),
  bathy_path,
  ETOP01_bathy = FALSE,
  rl_file = c("RLs_3obank.csv", "RLs_3obank_2022.csv"),
  ping_log_file = c("qPing_log_corr_times_master",
    "Zica-20220112-195994_Individual_MFA_Pings.csv",
    "Zica-20211113-195993_Individual_MFA_Pings.csv",
    "Zica-20211112-94819_Individual_MFA_Pings.csv"),
  email,
  save_csv = TRUE,
  csv_name = "dive_acoustic_summary.csv"
)

Arguments

tag_id

Character string or vector with tag IDs (without "-cal.nc"). Default: all SMRT ziphius tags.

nc_path

Directory (quoted string) where .nc files are stored. Can be one string, or a list the same length as tag_ids. Note: to download latest versions from Google drive, try function: download_drive_nc. Default: current working directory. Note: use "/" and not "\" to avoid headaches.

ae_path

Directory (quoted string) where text files with info about acoustic events are stored. If needed, you can use download_drive_acoustic_events to get these. Default is the current working directory.

bathy_path

A directory path to the folder containing all bathymetry data. Use download_bathy if you don't have this data already. If not provided, the bathymetry data will not be included in the output dataset.

ETOP01_bathy

whether to try to fill-in bathymetry info for locations outside NEPAC dataset bounds using NOAA online ETOP01 database. Default is FALSE. This is slow and no animals have gone out-of-bounds yet as of July 2021.

rl_file

name(s) (with path, if needed) of locally-stored .csv file(s) with raw RL data. If not provided, the default is to use download_drive_rls to obtain it from the FB Google Drive.

ping_log_file

name(s) (with path, if needed) of locally-stored .csv file(s) with ping log (acoustic audit) data. If not provided, the default is to use download_drive_rls to obtain it from the FB Google Drive.

email

Email address (required for FB Google Drive authentication; optional if rl_file is provided). You may also be asked to sign in or verify your Google identity as this function runs.

save_csv

Logical; whether or not to save a csv file with the results. Default: TRUE (and will overwrite any existing file)

csv_name

File name (with path, if desired) in which to save results in csv format. Default is dive_acoustic_summary.csv.

Value

A data.frame() with one row per dive, per whale

Examples

# Examples will go here

stacyderuiter/FBtagtools documentation built on June 1, 2025, 6:26 p.m.