loadMultiscapeData: Load Multiple Folders of Soundscape Data

View source: R/loadMultiscapeData.R

loadMultiscapeDataR Documentation

Load Multiple Folders of Soundscape Data

Description

Loads soundscape data just like loadSoundscapeData, but is designed to load multiple soundscape datasets from multiple folders. This is identical to loading each folder of data individually with the same bin and label parameters.

Usage

loadMultiscapeData(
  x,
  timeBin = NULL,
  binFunction = "median",
  binCount = FALSE,
  octave = c("original", "tol", "ol"),
  label = NULL,
  keepQuals = c(1),
  keepEffort = TRUE,
  dropNonHmd = TRUE,
  tz = "UTC",
  extension = c("nc", "csv")
)

Arguments

x

a vector of folder names to load

timeBin

amount of time to bin data by, format can be "#Unit" e.g. '2hour' or '1day'. Unlike loadSoundscapeData this argument is now mandatory to reduce data size

binFunction

summary function to apply to data in each time bin, default is "median"

binCount

logical flag to return the number of times in each time bin as column "binCount"

octave

one of "original", "tol", or "ol". If "original" then nothing happens, otherwise data are converted to Octave-leve ("ol") or Third-Octave-Level ("tol") measurements using createOctaveLevel

label

if not NUL, then must be of equal length to x

keepQuals

quality flag values to keep. Accepts vector of integers from (1, 2, 3, 4) corresponding to flag labels "Good", "Not evaluated/Unknown", "Compromised/Questionable", and "Unusable/Bad". HMD levels for points with data quality flags outside of keepQuals will be marked as NA.

keepEffort

if TRUE or FALSE, a logical flag whether or not to keep the effort information with the outputs (number of seconds per minute). If a numeric value, then any minutes with an effort value less than keepEffort will be removed (e.g. 50 will remove minutes with less than 50 seconds of effort)

dropNonHmd

logical flag to drop non-standard hybrid millidecade bands, only applies to HMD type data. Some datasets have frequency values that are not part of the standard HMD bands (e.g. at exactly the Nyquist rate), if TRUE these will be removed.

tz

timezone of the data being loaded, will be converted to UTC after load

extension

only required if both netCDF and CSV files exist in the folders to load, in which case only one type will be loaded. Must be one of "nc" or "csv"

Details

This function is equivalent to loading each folder of data separately with the same time and octave-level aggregation options applied, and is meant as a convenient wrapper for loading multiple years or sites of data for comparison person. The expectation is that this function will be primarily used for large scale comparisons, hence why timeBin is a required argument to reduce data resolution.

The only other difference is that if no labels are supplied for the folders, then one will be generated either from the names of x if it is a named vector, or the name of the folder using basename. This is to ensure that each separate folder can be identified once read in.

Value

a dataframe

Author(s)

Taiki Sakai taiki.sakai@noaa.gov


PAMscapes documentation built on April 4, 2025, 2:17 a.m.