plotLTSA {PAMscapes} | R Documentation |
Plot Long-Term Spectral Average (LTSA)
Description
Creates a long-term spectral average (LTSA) style plot of the data, a plot where the x-axis is time and the y-axis is frequency. Color represents the magnitude of sound. In order to compress the time axis, data are binned into time chunks and the median value within that time bin is displayed
Usage
plotLTSA(
x,
bin = "1hour",
scale = c("log", "linear"),
title = NULL,
freqRange = NULL,
dbRange = NULL,
units = NULL,
cmap = viridis_pal()(25),
toTz = "UTC"
)
Arguments
x |
a soundscape metric file that can be read in with
checkSoundscapeInput, or a dataframe with |
bin |
amount of time to bin for each LTSA slice, format can
be "#Unit" e.g. |
scale |
scaling for frequency axis, one of |
title |
optional title for plot |
freqRange |
if not |
dbRange |
if not |
units |
units for plot labeling, will attempt to read them from the input |
cmap |
color palette map to use for plot, default is viridis_pal |
toTz |
timezone to use for the time axis (input data must be UTC). Specification must be from OlsonNames |
Value
ggplot object of the LTSA plot
Author(s)
Taiki Sakai taiki.sakai@noaa.gov
Examples
hmd <- checkSoundscapeInput(system.file('extdata/MANTAExampleSmall1.csv', package='PAMscapes'))
# time range is too small for nice plots
plotLTSA(hmd, bin='1min', title='Every Minute')
plotLTSA(hmd, bin='2min', title='2 Minute Bins')