waterheat: waterheat

waterheatR Documentation

waterheat

Description

Produces heat maps from water data.

Usage

waterheat(
  object,
  charname = NA,
  category = NA,
  by = "sitem",
  yname = NA,
  xname = NA,
  labels = NA,
  title = NULL,
  ltitle = NA,
  stat = "mean",
  siteorder = NA,
  webplot = FALSE,
  ...
)

Arguments

object

Required. Either a data.frame that is the output of getWData, a Characteristic object a Site object, a Park object or a list of such objects.

charname

Required if object is not a data.frame and category is not specified. Name, in quotes, of a single Characteristic whose data should be graphed.

category

Required if object is not a data.frame and charname is not specified. Name, in quotes, of a single category of Characteristics whose data should be graphed.

by

Indicates how the data for the heatmap should be grouped. A text variable in quotes. Choices are:

"month"

Will produce a heatmap where each row is a month and each column a year.

"sitey

Will provide a heatmap where each row corresponds to a site, and each column is a year.

'sites

will provide a heatmap where each row corresponds to a site and each column is a season-year combination such as Win-11. For this graph Winter is Dec-Feb, Spring is Mar-May, Summer is Jun-Aug and Fall is Sept-Nov

"sitem

Will provide a heatmap where each row corresponds to a site and each column is month X year combination - such as Jan-11, Feb-11 etc.

yname

Text, defaults to NA. A label for the y-axis. The y-label will default to whatever is chosen in by. unless overwritten by the yname argument.

xname

Text, defaults to NA. A label for the x-axis. If left as NA and by is "month" then xname defaults to "year", if by is "Site" then xname will be "Date".

labels

A character vector indicating the labels for the ticks on the y-axis. If left as NA, and by is "month", the tick labels will be the three letter abbreviation for the month, if by is "site", and object is a Site or Park object, then the tick labels will be the site names.

title

A title in the graph in quotes. Defaults to NULL, which indicates no title should be used.

ltitle

The title for the legend in quotes. Defaults to NA. If left as NA and object is a Park, Site, or Characteristic object, the title will be the characteristic or category name and units.

stat

Used to determine cell values when more than one observation corresponds to a single cell. One of four options:"mean", "median",min" or "max", corresponding to the mean (the default), the median, the minimum or the maximum of all values for that cell.

siteorder

The order in which sites should be displayed when by is "sitem" or "sitey". If left as NA then the order will be determined by the order in which Park objects are in object, and/or the order of the Site objects in each park.

webplot

If TRUE plot will be an interactive html plot by passing it to ggplotly? in the plotly package.

...

Additional arguments used to select and filter data passed to getWData

Value

Creates a heatmap


NCRN/NCRNWater documentation built on May 15, 2023, 9:50 p.m.