plotTimeseries {PAMscapes}R Documentation

Plot Timeseries

Description

Plot simple timeseries of values

Usage

plotTimeseries(
  x,
  bin = "1hour",
  column,
  title = NULL,
  units = NULL,
  style = c("line", "heatmap"),
  q = 0,
  by = NULL,
  cmap = viridis_pal()(25),
  toTz = "UTC"
)

Arguments

x

a dataframe with column UTC

bin

time bin for summarising data. The median of values within the same time bin will be plotted

column

the name of the column to plot

title

title for the plot, if left as default NULL it will use the column name

units

name of units for plot labeling, default is taken from common soundscape units

style

one of 'line' or 'heatmap'. 'line' will create a simple line time series plot, 'heatmap' will create a grid plot with hour of day as X-axis and Date as y-axis where the value of column is the color

q

only valid for style='line', quantile level for plotting, between 0 and 1. If left as 0, none will be plotted. If a single value, then levels q and 1-q will be plotted. Users can also specify both values for non-symmettric intervals.

by

only valid for style='line', optional categorical column to plot separate lines for

cmap

only valid for style='heatmap', the color palette to use for plotting values

toTz

timezone to use for the time axis (input data must be UTC). Specification must be from OlsonNames

Value

a ggplot object

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

manta <- checkSoundscapeInput(system.file('extdata/MANTAExampleSmall2.csv', package='PAMscapes'))
plotTimeseries(manta, bin='1minute', column='HMD_150')


[Package PAMscapes version 0.6.0 Index]