plotLTSA | R Documentation |
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
plotLTSA(
x,
bin = "1hour",
scale = c("log", "linear"),
title = NULL,
freqRange = NULL,
dbRange = NULL,
units = NULL,
facet = NULL,
cmap = viridis_pal()(25),
toTz = "UTC",
alpha = 1,
maxBins = 800,
returnData = FALSE
)
x |
a soundscape metric file that can be read in with
loadSoundscapeData, 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 |
facet |
optional column to facet by to create multiple LTSA plots in separate rows |
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 |
alpha |
alpha to use for the plot fill |
maxBins |
the maximum number of time bins to create for the plot. If
|
returnData |
if |
ggplot object of the LTSA plot
Taiki Sakai taiki.sakai@noaa.gov
hmd <- loadSoundscapeData(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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.