Package: EGRET 3.0.10

Laura DeCicco

EGRET: Exploration and Graphics for RivEr Trends

Statistics and graphics for streamflow history, water quality trends, and the statistical modeling algorithm: Weighted Regressions on Time, Discharge, and Season (WRTDS).

Authors:Robert Hirsch [aut], Laura DeCicco [aut, cre], Tim Cohn [ctb], David Watkins [ctb], Lindsay Carr [ctb], Jennifer Murphy [aut]

EGRET_3.0.10.tar.gz
EGRET_3.0.10.tar.gz(r-4.5-noble)EGRET_3.0.10.tar.gz(r-4.4-noble)
EGRET_3.0.10.tgz(r-4.4-emscripten)EGRET_3.0.10.tgz(r-4.3-emscripten)
EGRET.pdf |EGRET.html
EGRET/json (API)
NEWS

# Install 'EGRET' in R:
install.packages('EGRET', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/doi-usgs/egret/issues

Datasets:

6.19 score 1 packages 256 scripts 599 downloads 20 mentions 127 exports 51 dependencies

Last updated 15 hours agofrom:797e4a58f9. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-linuxOKNov 21 2024

Exports:as.egretbin_QsblankTimeboxConcMonthboxConcThreeboxQTwiceboxResidMonthcalculateMonthlyResultscensoredSegmentscheckStartEndDatecheckSurfaceSpancleanUpcompressDataconcConstcumQdatedataOverviewdateFormatCheckdecimalDatedecimalHighLowerrorStatsestCrossValestDailyFromSurfacesestSurfacesfixSampleFrameflexFNflexPlotAddOnflowDurationfluxBiasMultifluxBiasStatfluxConstgeneralAxisgenericEGRETDotPlotgetConcFluxFromSurfacegetDailygetInfogetSamplegetSample.defaultgetSurfaceEstimatesgetSurfacesis.egretjitterSamlogPretty1logPretty3makeAnnualSeriesmakeAugmentedSamplemakeDateInfomergeReportmodelEstimationmonthInfomultiPlotDataOverviewnCensoredValsnDischargenObservationsplot15plot1of15plotConcHistplotConcPredplotConcQplotConcQSmoothplotConcTimeplotConcTimeDailyplotConcTimeSmoothplotContoursplotDiffContoursplotFlowSingleplotFluxHistplotFluxPredplotFluxQplotFluxTimeDailyplotFourplotFourStatsplotMonthTrendplotQTimeDailyplotResidPredplotResidQplotResidTimeplotSDLogQplotTimeSliceplotWRTDSKalmanpopulateConcentrationspopulateDailypopulateDailySamppopulateDateColumnspopulateParameterINFOpopulateSampleColumnspopulateSiteINFOprintFluxUnitCheatSheetprintGroupsprintPairsprintqUnitCheatSheetprintSeriesprocessQWDataqConstrandomSubsetreadDataFromFilereadNWISDailyreadNWISInforeadNWISSamplereadUserDailyreadUserInforeadUserSamplereadWQPInforeadWQPSampleremoveDuplicatesrun_WRTDSrunGroupsrunPairsrunSeriesrunSurvRegsaveResultsselectDayssetPAsetSeasonLabelsetSeasonLabelByUsersetUpEstimationsetupYearsstartEndstitchsurfaceIndexsurfaceStartEndtableChangetableChangeSingletableFlowChangetableResultstriCubeWRTDSKalmanyPretty

Dependencies:askpassbitbit64clicliprcodetoolscpp11crayoncurldataRetrievaldotCall64fansifieldsforeachgenericsgluehmshttriteratorsjsonlitelatticelifecyclelubridatemagrittrmapsMASSMatrixmimeopensslpillarpkgconfigprettyunitsprogressR6Rcppreadrrlangspamsurvivalsystibbletidyselecttimechangetruncnormtzdbutf8vctrsviridisLitevroomwithrxml2

Custom Axis Labels

Rendered fromunits.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2023-04-18
Started: 2023-04-18

EGRET Overview and Update

Rendered fromOverview.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2024-11-20
Started: 2021-04-09

Introduction to the EGRET package

Rendered fromEGRET.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2024-11-20
Started: 2021-04-09

Running WRTDS in parallel

Rendered fromparallel.Rmdusingknitr::rmarkdownon Nov 21 2024.

Last update: 2019-02-08
Started: 2018-08-16

Readme and manuals

Help Manual

Help pageTopics
Create named list for EGRET analysisas.egret
Deletes the computed values during periods of time when there are no sample datablankTime
Box plot of the water quality data by monthboxConcMonth
Three box plots side-by-sideboxConcThree
Two box plots side-by-side, discharge on sample days, and discharge on all daysboxQTwice
A box plot of WRTDS residuals by monthboxResidMonth
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.calculateMonthlyResults
Generic plotting function to create censored line segmentscensoredSegments
checkStartEndDatecheckStartEndDate
checkSurfaceSpancheckSurfaceSpan
Example eListArkansas_eList Choptank_eList
cleanUp eListcleanUp
Compress sample data framecompressData
concUnit classconcUnit-class
Constants included with EGRETconcConst Constants fluxConst monthInfo qConst
Cumulative flow calculationcumQdate
Data Overview for WRTDSdataOverview
Check date formatdateFormatCheck
decimalDatedecimalDate
decimalHighLowdecimalHighLow
Error statisticserrorStats
Jack-Knife cross validation of the WRTDS (Weighted Regressions on Time, Discharge, and Season)estCrossVal
Estimates all daily values of Concentration, Flux, Flow-Normalized Concentration, and Flow Normalized Fluxbin_Qs estDailyFromSurfaces getConcFluxFromSurface getSurfaceEstimates
Estimate the three surfaces (for yHat, SE and ConcHat) as a function of DecYear and logQ and store in the three-dimensional object called surfacesestSurfaces
Update Sample dataframefixSampleFrame
Flexible Flow NormalizationflexFN
Flexible Flow Normalization Plot Add OnflexPlotAddOn
Computes several values of the flow duration curve for streamflow centered on a specific date of the yearflowDuration
Produces 8-panel plot that is useful for determining if there is a flux bias problemfluxBiasMulti
Compute the flux bias statistic: (mean of estimated flux - mean of observed flux) / mean of estimated fluxfluxBiasStat
fluxUnit classfluxUnit-class
Axis generation for log dischargegeneralAxis
Generic EGRET plotting functiongenericEGRETDotPlot
Get Daily dataframe from EGRET objectgetDaily getDaily.default getDaily.egret
Get INFO dataframe from EGRET objectgetInfo getInfo.default getInfo.egret
Get Sample dataframe from EGRET objectgetSample getSample.default
Get surfaces matrix from EGRET objectgetSurfaces getSurfaces.default getSurfaces.egret
Import metadata to create INFO data frameINFOdataframe readNWISInfo readUserInfo readWQPInfo
Check for EGRET objectis.egret
jitter SamplejitterSam
Sets up tick marks for an axis with a log scale, where the graph is smalllogPretty1
Sets up tick marks for an axis with a log scalelogPretty3
Produces annual series of 8 streamflow statistics (and a lowess smooth of them) from daily streamflow datamakeAnnualSeries
Create randomized residuals and observations for data sets that have some censored datamakeAugmentedSample
makeDateInfomakeDateInfo
mergeReportmergeReport
Estimation process for the WRTDS (Weighted Regressions on Time, Discharge, and Season)modelEstimation
monthLabel classmonthLabel-class
Produces a 4 panel plot that gives an overview of the data set prior to any processingmultiPlotDataOverview
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.plot15
plots 1 of the 15 graphs of streamflow statistics on a single pageplot1of15
Graph of annual concentration and flow normalized concentration versus yearplotConcHist
Plot of Observed Concentration versus Estimated ConcentrationplotConcPred
Plot of Observed Concentration versus DischargeplotConcQ
Plot up to three curves representing the concentration versus discharge relationship. Each curve is a different point in time.plotConcQSmooth
Plot of Observed Concentration versus TimeplotConcTime
Plot of the time series of daily concentration estimates and the sample values for the days that were sampledplotConcTimeDaily
Plot up to three curves representing the concentration versus time relationship, each curve representing a different flow.plotConcTimeSmooth
Color contour plot of the estimated surfaces as a function of discharge and time (surfaces include log concentration, standard error, and concentration)plotContours
Plots the difference between two years from a contour plot created by plotContoursplotDiffContours
Creates a plot of a time series of a particular flow statistic and a loess smooth of that flow statisticplotFlowSingle
Graph of annual flux and flow normalized flux versus yearplotFluxHist
Graph of observed versus estimated fluxplotFluxPred
Sample data plot: observed log flux vs log dischargeplotFluxQ
Plot of the time series of daily flux estimates and the sample values for the days that were sampledplotFluxTimeDaily
Makes four graphs of streamflow statistics on a single pageplotFour
Makes four graphs of annual streamflow statistics on a single pageplotFourStats
Plot monthly trend result from runPairsplotMonthTrend
Plot of the discharge time seriesplotQTimeDaily
Plot of the residuals from WRTDS versus the estimated values (all in log concentration units)plotResidPred
Plot of the residuals from WRTDS (in log concentration units) versus the dischargeplotResidQ
Plot of the residuals from WRTDS (in log concentration units) versus timeplotResidTime
Graph of the standard deviation of the log of daily discharge versus yearplotSDLogQ
plotTimeSliceplotTimeSlice
plotWRTDSKalmanplotWRTDSKalman
Populate Concentration ColumnspopulateConcentrations
Populate Daily data framepopulateDaily
Merge concentration to DailypopulateDailySamp
Populate Date ColumnspopulateDateColumns
Populate Parameter Information ColumnspopulateParameterINFO
Populate Sample ColumnspopulateSampleColumns
Populate Site Information ColumnspopulateSiteINFO
EGRET helper functionsnCensoredVals nDischarge nObservations plot.egret print.egret
Reminder to user of flux unit properties (such as kg/day, tons/year, etc).printFluxUnitCheatSheet
Print information about group analysisprintGroups
Print information about pairs analysisprintPairs
Reminder to user of flow Unit properties such as cubic meters per second or thousands of cubic feet per second.printqUnitCheatSheet
Print annual results for a given streamflow statisticprintSeries
Processing of Water Quality DataprocessQWData
qUnit classqUnit-class
randomSubsetrandomSubset
Basic Data Import for Water Flow DatareadDataFromFile
Import NWIS Daily Data for EGRET analysisreadNWISDaily
Import NWIS Sample Data for EGRET analysisreadNWISSample
Import user daily data for EGRET analysisreadUserDaily
Import user-supplied sample data for EGRET analysisreadUserSample
Import Sample Data from the Water Quality Portal for WRTDSreadWQPSample
Remove duplicates values from Sample data frame.removeDuplicates
Runs a comparison of any group of years in the record.runGroups
Runs a comparison of any two years in the record.runPairs
Annual series of flow-normalized concentration and flow-normalized fluxrunSeries
Run the weighted survival regression for a set of estimation points (defined by DecYear and Log(Q))runSurvReg run_WRTDS
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.saveResults
Creates a subset Daily data frame that only contains daily estimates for the specified period of analysisselectDays
Sets up the period of analysis (the portion of the year being evaluated).setPA
Create a character variable that describes the period of analysis, when period of analysis has already been set in AnnualResultssetSeasonLabel
Creates a character variable that describes the period of analysis, when the period of analysis is being set by the user and not from AnnualResultssetSeasonLabelByUser
setUpEstimationsetUpEstimation
Creates the AnnualResults data frame from the Daily data framesetupYears
startEndstartEnd
stitch surfacesstitch
Compute the 6 parameters needed to lay out the grid for the surfaces computed in estSurfacessurfaceIndex
Surface date limitssurfaceStartEnd
Create a table of the changes in flow-normalized values between various points in time in the recordtableChange tableChangeSingle
Prints table of change metrics for a given streamflow statistictableFlowChange
Table of annual results for discharge, concentration and fluxtableResults
Tricube weight functiontriCube
WRTDS-KalmanWRTDSKalman
Sets up tick marks for an axis for a graph with an arithmetic scale which starts at zeroyPretty