View source: R/plotIbi_InWat.R
plotIbi_InWat | R Documentation |
Plot PAWMAP Fish Data within a selected watershed.
plotIbi_InWat(
dfm,
wat,
ibiField = "fish.ibi",
dateField = "collection_start_date",
onlySummer = FALSE
)
dfm |
The data frame containing the variable |
wat |
the watershed to plot |
ibiField |
string supplying the name of the IBI field |
dateField |
string supplying the name of the date field |
onlySummer |
Should the IBI be based only on summer surveys (as per protocol), or use all surveys? |
A ggplot dot plot of Fish Index of Biotic Integrity scores within a watershed
library(ggplot2)
stations <- unique(stationInfo$site_identifier[stationInfo$duration=='P'])
random.dates <- sample(seq(as.Date('2010/07/01'),
as.Date('2020/07/01'), by="day"), length(stations))
d <- data.frame(site_identifier=unique(stations), metric_name='oep5',
collection_start_date=random.dates,
fish.ibi=rnorm(length(stations)))
d <- mergeStatInfo(d)
p <- plotIbi_InWat(d, 'Johnson Creek')
p + ggtitle('Fish Index of Biotic Integrity - Generated Data for Example\n')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.