plotIbi_InWat: Plot PAWMAP Fish Data within a selected watershed.

View source: R/plotIbi_InWat.R

plotIbi_InWatR Documentation

Plot PAWMAP Fish Data within a selected watershed.

Description

Plot PAWMAP Fish Data within a selected watershed.

Usage

plotIbi_InWat(
  dfm,
  wat,
  ibiField = "fish.ibi",
  dateField = "collection_start_date",
  onlySummer = FALSE
)

Arguments

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?

Value

A ggplot dot plot of Fish Index of Biotic Integrity scores within a watershed

Examples

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')

PDXChris/pmtools documentation built on March 26, 2024, 8:13 a.m.