plotHYSEPOverview: Plot 3 baseflow/event plots from hysep output

View source: R/plotHYSEPOverview.R

plotHYSEPOverviewR Documentation

Plot 3 baseflow/event plots from hysep output

Description

Plot sliding, fixed, and local_min output of flow, with daily and instantaneous flow (when available).

Usage

plotHYSEPOverview(
  sampleDates,
  Daily,
  INFO,
  site,
  HYSEPReturn,
  baseflowColumns = c("flowConditionHYSEP_localMin", "flowConditionHYSEP_Fixed",
    "flowConditionHYSEP_Sliding"),
  HYSEPcolNames = c("LocalMin", "Fixed", "Sliding")
)

Arguments

sampleDates

dataframe with two columns "Discharge_cubic_feet_per_second" and "maxSampleTime"

Daily

dataframe from getNWISDaily function in the dataRetrieval package

INFO

dataframe from getNWISSiteInfo function in dataRetrieval package. Alternatively, a dataframe with a column "station.nm"

site

string USGS site identification

HYSEPReturn

dataframe with one column Dates, and 3 columns of baseflow as defined by HYSEPcolNames

baseflowColumns

sting vector length of 3. Names of columns with "Baseflow" or "Event" indicators.

HYSEPcolNames

sting vector length of 3. Names of columns in HYSEPReturn

Value

sampleDates dataframe

Examples

site <- "04085427"
sampleDates <- sampleDates
Start_extend <- as.character(as.Date(min(sampleDates$ActivityStartDateGiven, na.rm=TRUE))-60)
End_extend <- as.character(as.Date(max(sampleDates$ActivityStartDateGiven, na.rm=TRUE))+60)
Daily <- dataRetrieval::readNWISdv(site,'00060', Start_extend, End_extend)
Daily <- dataRetrieval::renameNWISColumns(Daily)
sampleDates <- findSampleQ(site, sampleDates, Daily)
startEnd <- getMaxStartEnd(Daily)
Start <- startEnd$Start
End <- startEnd$End
naFreeDaily <- Daily[!is.na(Daily$Flow),]
INFO <- dataRetrieval::readNWISsite(siteNumber = site)
DA_mi <- as.numeric(INFO$drain_area_va)
HYSEPReturn <- exampleHYSEP
sampleDates <- determineHYSEPEvents(HYSEPReturn, sampleDates,0.8)
plotHYSEPOverview(sampleDates,Daily,INFO,site,HYSEPReturn)

USGS-R/USGSHydroTools documentation built on April 17, 2023, 8:09 p.m.