waterbands | R Documentation |
Produces a plot that summarizes the range of historic data and compares with current measurements.
waterbands(
object,
parkcode = NA,
sitecode = NA,
charname = NA,
category = NA,
year_current = NA,
year_historic = NA,
months = c(5:10),
assessment = TRUE,
param_name = NA,
unit = NA,
yname = NA,
legend = "bottom",
...
)
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_current |
Year that will be plotted separately. Must be numeric and 4 digits. |
year_historic |
First year to include in historic range calculations. Last year will be the year prior to year_current. 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. |
assessment |
Vector indicating if assessment lines will be marked on the graph. See details below. |
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. |
... |
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 current with historic ranges. If the minimum or maximum values return a tie, the most recent year is returned.
netnwd <- importNCRNWater(Dir = "~/Data/NETN",
Data = "Water Data.csv", MetaData = "VizMetaData.csv")
parkcode = "MABI"
sitecode = "NETN_MABI_PA00"
charname = "pH"
waterbands(netnwd, parkcode = parkcode, sitecode = sitecode, charname = charname,
year_historic = 2006, year_current = 2019, months = c(5:10),
assessment = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.