View source: R/plotHab_inwat.R
plotHab_InWat | R Documentation |
Plot PAWMAP Habitat Data within a selected watershed.
plotHab_InWat(dfm, vbl, wat, metric_code = NULL)
dfm |
The data frame containing the habitat data |
vbl |
The field containing the numeric habitat values to plot |
wat |
The watershed to plot |
metric_code |
The function assumes the field name is the metric code. If not, (e.g., habitat data are in a field named "result") supply the metric code to allow conversions and benchmarks |
A ggplot dot plot of the variable within a watershed
library(ggplot2)
d <- data.frame(site_identifier=unique(stationInfo$site_identifier), metric_code='xcl',
result=rnorm(length(stationInfo$site_identifier)))
d <- mergeStatInfo(d)
p <- plotHab_InWat(d, 'result', 'Willamette Streams')
p + ggtitle('Riparian Canopy - Generated Data for Example\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.