View source: R/plotHYSEPOverview.R
plotHYSEPOverview | R Documentation |
Plot sliding, fixed, and local_min output of flow, with daily and instantaneous flow (when available).
plotHYSEPOverview(
sampleDates,
Daily,
INFO,
site,
HYSEPReturn,
baseflowColumns = c("flowConditionHYSEP_localMin", "flowConditionHYSEP_Fixed",
"flowConditionHYSEP_Sliding"),
HYSEPcolNames = c("LocalMin", "Fixed", "Sliding")
)
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 |
sampleDates dataframe
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.