watersite_comps | R Documentation |
Produces a plot that compares multiple sites for a given year and parameter, with each site having a different color and shape.
watersite_comps(
object,
parkcode = NA,
sitecode = NA,
charname = NA,
category = NA,
year = NA,
months = c(5:10),
param_name = NA,
unit = NA,
yname = NA,
legend = "bottom",
layers = c("points", "line"),
assessment = TRUE,
...
)
object |
Either a |
parkcode |
One or more parkcodes, in quotes. If |
sitecode |
One or more sitecodes, in quotes. If |
charname |
Required if |
category |
One or more categories of characteristics, in quotes. Only those categories of characteristics will be returned. |
year |
Year of data that will be plotted for all sites. Must be numeric and 4 digits. |
months |
A numeric vector corresponding to months of the year. Only data from those months will be returned. Ranges from 1 to 12. Default is c(5:10) for May to October. |
param_name |
Text, defaults to |
unit |
Text, defaults to |
yname |
Text, defaults to |
legend |
a vector indicating where the legend position. Can be: "none","left","right","top","bottom" or a two element numeric vector. |
layers |
Defaults to c("points","line") Indicates which layers you wish to see on the plot. |
assessment |
Vector indicating if assessment lines will be marked on the graph. If multiple thresholds exist among the sites plotted, all will be plotted. See details below. |
... |
Additional arguments used to select and filter data passed to |
The assessment
argument determines if lines representing the assessment values should be drawn on the graph.
If FALSE
then no lines will be drawn. If TRUE
, the default, then the upper and lower points indicated in
object
's Character
objects will be used to draw the lines. Note that if there are multiple assessment points,
for example if different parks have different points, or if there is both an upper and lower point, they will all be drawn.
If a vector
of numbers is passed to assessemnt
instead then those will serve as the assessment values and lines will
be drawn accordingly. Note that if object
is a data.frame
then the only way to draw assessment lines is by passing a
numeric vector
to assessment
.
Creates a plot that compares multiple sites for a given year.
netnwd <- importNCRNWater(Dir = "~/Data/NETN",
Data = "Water Data.csv", MetaData = "VizMetaData.csv")
parkcode = "MABI"
charname = "pH"
site_list <- getSiteInfo(netnwd, parkcode = parkcode, info = "SiteCode")
watersite_comps(netnwd, parkcode = parkcode, sitecode = site_list, charname = charname,
year = 2019, months = c(5:10), legend = "none",
layers = c("points", "line"), assessment = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.