Learn R Programming

⚠️There's a newer version (3.0.11) of this package.Take me there.

EGRET

Exploration and Graphics for RivEr Trends (EGRET): An R-package for the analysis of long-term changes in water quality and streamflow, including the water-quality method Weighted Regressions on Time, Discharge, and Season (WRTDS).

The link for the official USGS publication user guide is here:

https://pubs.usgs.gov/tm/04/a10/

A companion package EGRETci implements a set of approaches to the analysis of uncertainty associated with WRTDS trend analysis.

If you are familiar with the traditional EGRET workflow, check out the Overview and Updates to see how all the latest updates relate.

Recent introduction to WRTDS and the EGRET package at the 12th National Monitoring Conference April 19, 2021:

Introduction

New capabilities

Package Installation

To install the EGRET package, you must be using R 3.0 or greater and run the following command:

install.packages("EGRET")

Background:

Evaluating long-term changes in river conditions (water quality and discharge) is an important use of hydrologic data. To carry out such evaluations, the hydrologist needs tools to facilitate several key steps in the process: acquiring the data records from a variety of sources, structuring it in ways that facilitate the analysis, routines that will process the data to extract information about changes that may be happening, and graphical techniques that can display findings about change. The R package EGRET (Exploration and Graphics for RivEr Trends) was developed for carrying out each of these steps in an integrated manner. It is designed to accept easily data from three sources: U.S. Geological Survey hydrologic data, Water Quality Portal Data (currently including U.S. Environmental Protection Agency (EPA) STORET data, and USDA STEWARDS data), and user-supplied flat files. The EGRET package has components oriented towards the description of long-term changes in streamflow statistics (high flow, average flow, and low flow) as well as changes in water quality. For the water-quality analysis, it uses Weighted Regressions on Time, Discharge and Season (WRTDS) to describe long-term trends in both concentration and flux. EGRET also creates a wide range of graphical presentations of the water-quality data and of the WRTDS results. The following report serves as a user guide, providing detailed guidance on installation and use of the software, documentation of the analysis methods used, as well as guidance on some of the kinds of questions and approaches that the software can facilitate.

EGRET includes statistics and graphics for streamflow history, water quality trends, and the statistical modeling algorithm Weighted Regressions on Time, Discharge, and Season (WRTDS). Please see the official EGRET User Guide for more information on the EGRET package:

https://doi.org/10.3133/tm4A10 The best ways to learn about the WRTDS approach is to read the User Guide and two journal articles. These articles are available, for free, from the journals in which they were published. The first relates to nitrate and total phosphorus data for 9 rivers draining to Chesapeake Bay. The URL is:

https://onlinelibrary.wiley.com/doi/full/10.1111/j.1752-1688.2010.00482.x.

The second is an application to nitrate data for 8 monitoring sites on the Mississippi River or its major tributaries. The URL is:

https://pubs.acs.org/doi/abs/10.1021/es201221s

For a thorough discussion of the generalized flow normalization method implemented in the EGRET enhancements, see the paper: “Tracking changes in nutrient delivery to western Lake Erie: Approaches to compensate for variability and trends in streamflow”:

(https://www.sciencedirect.com/science/article/pii/S0380133018302235).

Sample Workflow

WRTDS on the Choptank River at Greensboro MD, for Nitrate:

library(EGRET)

############################
# Gather discharge data:
siteID <- "01491000" #Choptank River at Greensboro, MD
startDate <- "" #Gets earliest date
endDate <- "2011-09-30"
# Gather sample data:
parameter_cd<-"00631" #5 digit USGS code
Sample <- readNWISSample(siteID,parameter_cd,startDate,endDate)
#Gets earliest date from Sample record:
#This is just one of many ways to assure the Daily record
#spans the Sample record
startDate <- min(as.character(Sample$Date)) 
# Gather discharge data:
Daily <- readNWISDaily(siteID,"00060",startDate,endDate)
# Gather site and parameter information:

# Here user must input some values for
# the default (interactive=TRUE)
INFO<- readNWISInfo(siteID,parameter_cd)
INFO$shortName <- "Choptank River at Greensboro, MD"

# Merge discharge with sample data:
eList <- mergeReport(INFO, Daily, Sample)
library(EGRET)
# Sample data included in package:
eList <- Choptank_eList

boxConcMonth(eList)

boxQTwice(eList)

plotConcTime(eList)

plotConcQ(eList)

multiPlotDataOverview(eList)

# Run WRTDS model:
eList <- modelEstimation(eList)
#> 
#>  first step running estCrossVal may take about 1 minute
#>  estCrossVal % complete:
#> 0    1   2   3   4   5   6   7   8   9   10  
#> 11   12  13  14  15  16  17  18  19  20  
#> 21   22  23  24  25  26  27  28  29  30  
#> 31   32  33  34  35  36  37  38  39  40  
#> 41   42  43  44  45  46  47  48  49  50  
#> 51   52  53  54  55  56  57  58  59  60  
#> 61   62  63  64  65  66  67  68  69  70  
#> 71   72  73  74  75  76  77  78  79  80  
#> 81   82  83  84  85  86  87  88  89  90  
#> 91   92  93  94  95  96  97  98  99  
#> Next step running  estSurfaces with survival regression:
#> Survival regression (% complete):
#> 0    1   2   3   4   5   6   7   8   9   10  
#> 11   12  13  14  15  16  17  18  19  20  
#> 21   22  23  24  25  26  27  28  29  30  
#> 31   32  33  34  35  36  37  38  39  40  
#> 41   42  43  44  45  46  47  48  49  50  
#> 51   52  53  54  55  56  57  58  59  60  
#> 61   62  63  64  65  66  67  68  69  70  
#> 71   72  73  74  75  76  77  78  79  80  
#> 81   82  83  84  85  86  87  88  89  90  
#> 91   92  93  94  95  96  97  98  99  
#> Survival regression: Done

#eList:
plotConcTimeDaily(eList)

plotFluxTimeDaily(eList)

plotConcPred(eList)

plotFluxPred(eList)

plotResidPred(eList)

plotResidQ(eList)

plotResidTime(eList)

boxResidMonth(eList)

boxConcThree(eList)

plotConcHist(eList)

plotFluxHist(eList)

# Multi-line plots:
date1 <- "1985-09-01"
date2 <- "1997-09-01"
date3 <- "2010-09-01"
qBottom<-0.2
qTop<-10
plotConcQSmooth(eList, date1, date2, date3, qBottom, qTop, 
                   concMax=2,legendTop = 0.85)

q1 <- 2
q2 <- 10
q3 <- 20
centerDate <- "07-01"
yearEnd <- 1980
yearStart <- 2010
plotConcTimeSmooth(eList, q1, q2, q3, centerDate, yearStart, yearEnd, legendTop = 0.55, legendLeft = 1990)

# Multi-plots:
fluxBiasMulti(eList)

#Contour plots:
clevel<-seq(0,2,0.5)
yearStart <- 1980
yearEnd <- 2010

plotContours(eList, yearStart,yearEnd,qBottom=0.5,
             qTop=20, contourLevels = clevel)

plotDiffContours(eList, year0 = 1990,
                 year1 = 2010,
                 qBottom=0.5,
                 qTop=20,
                 maxDiff=0.6)

Sample workflow for a flowHistory application for the entire record

library(EGRET)

# Flow history analysis
# Gather discharge data:
siteID <- "01491000" #Choptank River at Greensboro, MD
startDate <- "" # Get earliest date
endDate <- "" # Get latest date
Daily <- readNWISDaily(siteID,"00060",startDate,endDate)
#> There are 27046 data points, and 27046 days.
# Gather site and parameter information:
# Here user must input some values for
# the default (interactive=TRUE)
INFO<- readNWISInfo(siteID,"00060")
#> Your site for streamflow data is:
#>  01491000 .
#> Your site name is CHOPTANK RIVER NEAR GREENSBORO, MD 
#> but you can modify this to a short name in a style you prefer. 
#> This name will be used to label graphs and tables. 
#> If you want the program to use the name given above, just do a carriage return,
#> otherwise enter the preferred short name(no quotes):
#> 
#> The latitude and longitude of the site are:  38.99719 ,  -75.78581 (degrees north and west).
#> 
#> The drainage area at this site is  113 square miles
#>  which is being stored as 292.6687 square kilometers.
#> 
#> It is helpful to set up a station abbreviation when doing multi-site studies,
#> enter a unique id (three or four characters should work). It is case sensitive.  
#> Even if you don't feel you need an abbreviation for your site you need to enter something(no quotes):
#> 
#> Your water quality data are for parameter number:
#> 00060 
#> which has the name:' Discharge, cubic feet per second '.
#> Typically you will want a shorter name to be used in graphs and tables.
#> The suggested short name is:' Stream flow, mean. daily '.
#> If you would like to change the short name, enter it here, 
#> otherwise just hit enter (no quotes):
#> The units for the water quality data are:  ft3/s .
#> It is helpful to set up a constiuent abbreviation, enter a unique id 
#> three or four characters should work something like tn or tp or NO3).
#> Even if you don't feel you need an abbreviation you need to enter something (no quotes):
#> 
#> Required concentration units are mg/l. 
#> The INFO dataframe indicates: ft3/s 
#> Flux calculations will be wrong if units are not consistent.
INFO$shortName <- "Choptank River at Greensboro, MD"
eList <- as.egret(INFO, Daily, NA, NA)

# Check flow history data:
plotFlowSingle(eList, istat=7,qUnit="thousandCfs")

plotSDLogQ(eList)

plotQTimeDaily(eList, qLower=1,qUnit=3)

plotFour(eList, qUnit=3)

plotFourStats(eList, qUnit=3)

Model Archive

When using the WRTDS model, it is important to be able to reproduce the results in the future. The following version of R and package dependencies were used most recently to pass the embedded tests within this package. There is no guarantee of reproducible results using future versions of R or updated versions of package dependencies; however, we will make diligent efforts to test and update future modeling environments.

sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value
#>  version  R version 4.1.1 (2021-08-10)
#>  os       Windows 10 x64 (build 19042)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  English_United States.1252
#>  ctype    English_United States.1252
#>  tz       America/Chicago
#>  date     2022-01-18
#>  pandoc   2.16.2 @ C:/Program Files/RStudio/bin/quarto/bin/ (via rmarkdown)
#> 
#> - Packages -------------------------------------------------------------------
#>  package       * version  date (UTC) lib source
#>  assertthat      0.2.1    2019-03-21 [2] CRAN (R 4.1.0)
#>  bit             4.0.4    2020-08-04 [2] CRAN (R 4.1.0)
#>  bit64           4.0.5    2020-08-30 [2] CRAN (R 4.1.0)
#>  class           7.3-19   2021-05-03 [3] CRAN (R 4.1.1)
#>  classInt        0.4-3    2020-04-07 [2] CRAN (R 4.1.0)
#>  cli             3.1.0    2021-10-27 [2] CRAN (R 4.1.1)
#>  colorspace      2.0-2    2021-06-24 [2] CRAN (R 4.1.0)
#>  crayon          1.4.2    2021-10-29 [2] CRAN (R 4.1.1)
#>  curl            4.3.2    2021-06-23 [2] CRAN (R 4.1.0)
#>  dataRetrieval   2.7.10.1 2021-12-22 [2] local
#>  DBI             1.1.2    2021-12-20 [2] CRAN (R 4.1.1)
#>  digest          0.6.29   2021-12-01 [2] CRAN (R 4.1.1)
#>  dotCall64       1.0-1    2021-02-11 [2] CRAN (R 4.1.0)
#>  dplyr           1.0.7    2021-06-18 [2] CRAN (R 4.1.0)
#>  e1071           1.7-9    2021-09-16 [2] CRAN (R 4.1.1)
#>  EGRET         * 3.0.7    2022-01-19 [2] local
#>  ellipsis        0.3.2    2021-04-29 [2] CRAN (R 4.1.0)
#>  evaluate        0.14     2019-05-28 [2] CRAN (R 4.1.0)
#>  fansi           1.0.0    2022-01-10 [2] CRAN (R 4.1.1)
#>  fastmap         1.1.0    2021-01-25 [2] CRAN (R 4.1.0)
#>  fields          13.3     2021-10-30 [2] CRAN (R 4.1.1)
#>  generics        0.1.1    2021-10-25 [2] CRAN (R 4.1.1)
#>  ggplot2         3.3.5    2021-06-25 [2] CRAN (R 4.1.0)
#>  glue            1.6.0    2021-12-17 [2] CRAN (R 4.1.2)
#>  gridExtra       2.3      2017-09-09 [2] CRAN (R 4.1.0)
#>  gtable          0.3.0    2019-03-25 [2] CRAN (R 4.1.0)
#>  highr           0.9      2021-04-16 [2] CRAN (R 4.1.0)
#>  hms             1.1.1    2021-09-26 [2] CRAN (R 4.1.1)
#>  htmltools       0.5.2    2021-08-25 [2] CRAN (R 4.1.1)
#>  httr            1.4.2    2020-07-20 [2] CRAN (R 4.1.0)
#>  jsonlite        1.7.2    2020-12-09 [2] CRAN (R 4.1.0)
#>  KernSmooth      2.23-20  2021-05-03 [3] CRAN (R 4.1.1)
#>  knitr           1.37     2021-12-16 [2] CRAN (R 4.1.2)
#>  lattice         0.20-44  2021-05-02 [3] CRAN (R 4.1.1)
#>  lifecycle       1.0.1    2021-09-24 [2] CRAN (R 4.1.1)
#>  magrittr        2.0.1    2020-11-17 [2] CRAN (R 4.1.0)
#>  maps            3.4.0    2021-09-25 [2] CRAN (R 4.1.1)
#>  Matrix          1.3-4    2021-06-01 [3] CRAN (R 4.1.1)
#>  munsell         0.5.0    2018-06-12 [2] CRAN (R 4.1.0)
#>  pillar          1.6.4    2021-10-18 [2] CRAN (R 4.1.1)
#>  pkgconfig       2.0.3    2019-09-22 [2] CRAN (R 4.1.0)
#>  proxy           0.4-26   2021-06-07 [2] CRAN (R 4.1.0)
#>  purrr           0.3.4    2020-04-17 [2] CRAN (R 4.1.0)
#>  R6              2.5.1    2021-08-19 [2] CRAN (R 4.1.1)
#>  Rcpp            1.0.8    2022-01-13 [2] CRAN (R 4.1.1)
#>  readr           2.1.1    2021-11-30 [2] CRAN (R 4.1.1)
#>  rlang           0.4.12   2021-10-18 [2] CRAN (R 4.1.1)
#>  rmarkdown       2.11     2021-09-14 [2] CRAN (R 4.1.1)
#>  rstudioapi      0.13     2020-11-12 [2] CRAN (R 4.1.0)
#>  scales          1.1.1    2020-05-11 [2] CRAN (R 4.1.0)
#>  sessioninfo     1.2.2    2021-12-06 [2] CRAN (R 4.1.1)
#>  sf              1.0-5    2021-12-17 [2] CRAN (R 4.1.2)
#>  spam            2.8-0    2022-01-06 [2] CRAN (R 4.1.1)
#>  stringi         1.7.6    2021-11-29 [2] CRAN (R 4.1.1)
#>  stringr         1.4.0    2019-02-10 [2] CRAN (R 4.1.0)
#>  survival        3.2-11   2021-04-26 [3] CRAN (R 4.1.1)
#>  tibble          3.1.6    2021-11-07 [2] CRAN (R 4.1.1)
#>  tidyselect      1.1.1    2021-04-30 [2] CRAN (R 4.1.0)
#>  tzdb            0.2.0    2021-10-27 [2] CRAN (R 4.1.1)
#>  units           0.7-2    2021-06-08 [2] CRAN (R 4.1.0)
#>  utf8            1.2.2    2021-07-24 [2] CRAN (R 4.1.0)
#>  vctrs           0.3.8    2021-04-29 [2] CRAN (R 4.1.0)
#>  viridis         0.6.2    2021-10-13 [2] CRAN (R 4.1.1)
#>  viridisLite     0.4.0    2021-04-13 [2] CRAN (R 4.1.0)
#>  vroom           1.5.7    2021-11-30 [2] CRAN (R 4.1.1)
#>  xfun            0.29     2021-12-14 [2] CRAN (R 4.1.2)
#>  xml2            1.3.3    2021-11-30 [2] CRAN (R 4.1.1)
#>  yaml            2.2.1    2020-02-01 [2] CRAN (R 4.1.0)
#> 
#>  [1] C:/Users/ldecicco/AppData/Local/Temp/7/RtmpG636p2/temp_libpath69e8d597e00
#>  [2] C:/Users/ldecicco/Documents/R/win-library/4.1
#>  [3] C:/Program Files/R/R-4.1.1/library
#> 
#> ------------------------------------------------------------------------------

Reporting bugs

Please consider reporting bugs and asking questions on the Issues page: https://github.com/USGS-R/EGRET/issues

Follow @USGS_DataSci on Twitter for updates on USGS R packages:

Subscribe

Please email questions, comments, and feedback to: egret_comments@usgs.gov

Additionally, to subscribe to an email list concerning updates to these R packages, please send a request to egret_comments@usgs.gov.

Code of Conduct

We want to encourage a warm, welcoming, and safe environment for contributing to this project. See the code of conduct for more information.

Package Support

The Water Mission Area of the USGS has supported the development and maintenance of the EGRET R-package. Further maintenance is expected to be stable through October 2022. Resources are available primarily for maintenance and responding to user questions. Priorities on the development of new features are determined by the EGRET development team.

Sunset date

Funding for EGRET currently expires fall 2022. Expectations are that maintenance and customer service will continue to be supported past that date.

How to cite EGRET:

citation(package = "EGRET")
#> 
#> To cite EGRET in publications, please use:
#> 
#>   Hirsch, R.M., and De Cicco, L.A., 2015, User guide to Exploration and
#>   Graphics for RivEr Trends (EGRET) and dataRetrieval: R packages for
#>   hydrologic data (version 2.0, February 2015): U.S. Geological Survey
#>   Techniques and Methods book 4, chap. A10, 93 p., doi:10.3133/tm4A10
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @InBook{,
#>     author = {Robert M. Hirsch and Laura A. {De Cicco}},
#>     title = {User guide to Exploration and Graphics for RivEr Trends (EGRET) and dataRetrieval: R packages for hydrologic data},
#>     publisher = {U.S. Geological Survey},
#>     address = {Reston, VA},
#>     booktitle = {Techniques and Methods},
#>     institution = {U.S. Geological Survey},
#>     year = {2015},
#>     chapter = {A10},
#>     url = {https://pubs.usgs.gov/tm/04/a10/},
#>   }

References

See this list for WRTDS applications in print:

http://usgs-r.github.io/EGRET/articles/References_WRTDS.html

Disclaimer

This software has been approved for release by the U.S. Geological Survey (USGS). Although the software has been subjected to rigorous review, the USGS reserves the right to update the software as needed pursuant to further analysis and review. No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. Furthermore, the software is released on condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from its authorized or unauthorized use.

Copy Link

Version

Install

install.packages('EGRET')

Monthly Downloads

964

Version

3.0.7

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Laura DeCicco

Last Published

January 25th, 2022

Functions in EGRET (3.0.7)

Constants

Constants included with EGRET
censoredSegments

Generic plotting function to create censored line segments
blankTime

Deletes the computed values during periods of time when there are no sample data
checkStartEndDate

checkStartEndDate
boxConcMonth

Box plot of the water quality data by month
boxQTwice

Two box plots side-by-side, discharge on sample days, and discharge on all days
boxResidMonth

A box plot of WRTDS residuals by month
EGRET-package

EGRET package includes WRTDS and flowHistory
boxConcThree

Three box plots side-by-side
calculateMonthlyResults

Calculates monthly mean values of Q, Conc, FNConc, Flux, and FNFlux for the entire record. If WRTDSKalman has been run it also includes the monthly mean values of GenConc and GenFlux.
INFOdataframe

Import metadata to create INFO data frame
decimalDate

decimalDate
fluxBiasMulti

Produces 8-panel plot that is useful for determining if there is a flux bias problem
decimalHighLow

decimalHighLow
print.egret

EGRET helper functions
fluxBiasStat

Compute the flux bias statistic: (mean of estimated flux - mean of observed flux) / mean of estimated flux
flexPlotAddOn

Flexible Flow Normalization Plot Add On
is.egret

Check for EGRET object
estSurfaces

Estimate the three surfaces (for yHat, SE and ConcHat) as a function of DecYear and logQ and store in the three-dimensional object called surfaces
estDailyFromSurfaces

Estimates all daily values of Concentration, Flux, Flow-Normalized Concentration, and Flow Normalized Flux
flowDuration

Computes several values of the flow duration curve for streamflow centered on a specific date of the year
getDaily

Get Daily dataframe from EGRET object
cleanUp

cleanUp eList
checkSurfaceSpan

checkSurfaceSpan
makeDateInfo

makeDateInfo
makeAugmentedSample

Create randomized residuals and observations for data sets that have some censored data
plotConcHist

Graph of annual concentration and flow normalized concentration versus year
compressData

Compress sample data frame
as.egret

Create named list for EGRET analysis
dataOverview

Data Overview for WRTDS
plotConcPred

Plot of Observed Concentration versus Estimated Concentration
getInfo

Get INFO dataframe from EGRET object
dateFormatCheck

Check date format
generalAxis

Axis generation for log discharge
fluxUnit-class

fluxUnit class
cumQdate

Cumulative flow calculation
monthLabel-class

monthLabel class
getSample

Get Sample dataframe from EGRET object
getSurfaces

Get surfaces matrix from EGRET object
plotConcQSmooth

Plot up to three curves representing the concentration versus discharge relationship. Each curve is a different point in time.
multiPlotDataOverview

Produces a 4 panel plot that gives an overview of the data set prior to any processing
plotConcQ

Plot of Observed Concentration versus Discharge
jitterSam

jitter Sample
plotFluxHist

Graph of annual flux and flow normalized flux versus year
plotQTimeDaily

Plot of the discharge time series
flexFN

Flexible Flow Normalization
plotSDLogQ

Graph of the standard deviation of the log of daily discharge versus year
plotConcTimeDaily

Plot of the time series of daily concentration estimates and the sample values for the days that were sampled
plotConcTime

Plot of Observed Concentration versus Time
plotFluxPred

Graph of observed versus estimated flux
fixSampleFrame

Update Sample dataframe
errorStats

Error statistics
genericEGRETDotPlot

Generic EGRET plotting function
estCrossVal

Jack-Knife cross validation of the WRTDS (Weighted Regressions on Time, Discharge, and Season)
logPretty1

Sets up tick marks for an axis with a log scale, where the graph is small
plotFluxTimeDaily

Plot of the time series of daily flux estimates and the sample values for the days that were sampled
populateDailySamp

Merge concentration to Daily
plotTimeSlice

plotTimeSlice
removeDuplicates

Remove duplicates values from Sample data frame.
plotFluxQ

Sample data plot: observed log flux vs log discharge
populateDaily

Populate Daily data frame
printSeries

Print annual results for a given streamflow statistic
modelEstimation

Estimation process for the WRTDS (Weighted Regressions on Time, Discharge, and Season)
mergeReport

mergeReport
printFluxUnitCheatSheet

Reminder to user of flux unit properties (such as kg/day, tons/year, etc).
genmissing

genmissing
plot1of15

plots 1 of the 15 graphs of streamflow statistics on a single page
runGroups

Runs a comparison of any group of years in the record.
plot15

Makes 15 graphs of streamflow statistics on a single page. These encompass the 7-day minimum, mean, and 1-day maximum for each of the following 5 Periods of Analysis: Annual, Fall, Winter, Spring and Summer.
makeAnnualSeries

Produces annual series of 8 streamflow statistics (and a lowess smooth of them) from daily streamflow data
plotFour

Makes four graphs of streamflow statistics on a single page
plotDiffContours

Plots the difference between two years from a contour plot created by plotContours
logPretty3

Sets up tick marks for an axis with a log scale
plotFourStats

Makes four graphs of annual streamflow statistics on a single page
setPA

Sets up the period of analysis (the portion of the year being evaluated).
plotFlowSingle

Creates a plot of a time series of a particular flow statistic and a loess smooth of that flow statistic
setSeasonLabel

Create a character variable that describes the period of analysis, when period of analysis has already been set in AnnualResults
populateParameterINFO

Populate Parameter Information Columns
populateDateColumns

Populate Date Columns
qUnit-class

qUnit class
printqUnitCheatSheet

Reminder to user of flow Unit properties such as cubic meters per second or thousands of cubic feet per second.
readUserSample

Import user-supplied sample data for EGRET analysis
plotResidTime

Plot of the residuals from WRTDS (in log concentration units) versus time
processQWData

Processing of Water Quality Data
plotResidQ

Plot of the residuals from WRTDS (in log concentration units) versus the discharge
plotConcTimeSmooth

Plot up to three curves representing the concentration versus time relationship, each curve representing a different flow.
plotResidPred

Plot of the residuals from WRTDS versus the estimated values (all in log concentration units)
plotWRTDSKalman

plotWRTDSKalman
readNWISDaily

Import NWIS Daily Data for EGRET analysis
populateConcentrations

Populate Concentration Columns
readDataFromFile

Basic Data Import for Water Flow Data
randomSubset

randomSubset
readNWISSample

Import NWIS Sample Data for EGRET analysis
runSurvReg

Run the weighted survival regression for a set of estimation points (defined by DecYear and Log(Q))
plotContours

Color contour plot of the estimated surfaces as a function of discharge and time (surfaces include log concentration, standard error, and concentration)
populateSampleColumns

Populate Sample Columns
readWQPSample

Import Sample Data from the Water Quality Portal for WRTDS
setupYears

Creates the AnnualResults data frame from the Daily data frame
populateSiteINFO

Populate Site Information Columns
startEnd

startEnd
saveResults

A utility program for saving the contents of the workspace This function saves the workspace. Future versions of EGRET will not include this function, use saveRDS to save individual eList objects. It assigns the file a name using the abbreviations for station and constituent.
readUserDaily

Import user daily data for EGRET analysis
runPairs

Runs a comparison of any two years in the record.
stitch

stitch surfaces
Choptank_eList

Example eList
selectDays

Creates a subset Daily data frame that only contains daily estimates for the specified period of analysis
WRTDSKalman

WRTDS-Kalman
triCube

Tricube weight function
runSeries

Annual series of flow-normalized concentration and flow-normalized flux
tableResults

Table of annual results for discharge, concentration and flux
tableFlowChange

Prints table of change metrics for a given streamflow statistic
setSeasonLabelByUser

Creates a character variable that describes the period of analysis, when the period of analysis is being set by the user and not from AnnualResults
surfaceIndex

Compute the 6 parameters needed to lay out the grid for the surfaces computed in estSurfaces
yPretty

Sets up tick marks for an axis for a graph with an arithmetic scale which starts at zero
surfaceStartEnd

Surface date limits
tableChange

Create a table of the changes in flow-normalized values between various points in time in the record
setUpEstimation

setUpEstimation