INFOdataframe | R Documentation |
Populates INFO data frame from either NWIS (readNWISInfo
),
Water Quality Portal (readWQPInfo
), or user-supplied files (readUserInfo
).
readNWISInfo(siteNumber, parameterCd, interactive = TRUE)
readWQPInfo(siteNumber, parameterCd, interactive = TRUE)
readUserInfo(filePath, fileName, hasHeader = TRUE, separator = ",",
interactive = TRUE)
siteNumber |
character site number. For |
parameterCd |
character USGS parameter code (a 5 digit number) or characteristic name (if using |
interactive |
logical Option for interactive mode. If true, there is user interaction for error handling and data checks. |
filePath |
character specifying the path to the file (used in |
fileName |
character name of file to open (used in |
hasHeader |
logical true if the first row of data is the column headers (used in |
separator |
character that separates data cells (used in |
INFO data frame. Any metadata can be stored in INFO. However, there are 8 columns that EGRET uses by name in some functions:
Required column | Used in function | Description |
param.units*** | All concentration plotting functions | The units as listed in this field are used to create the concentration axis labels |
shortName | All plotting functions | Station short name, used to label plots |
paramShortName | All plotting functions | Parameter short name, used to label plots |
drainSqKm | plotFlowSingle , printSeries | Calculate runoff |
constitAbbrev | saveResults | Parameter abbrieviation, used to auto-name workspace |
staAbbrev | saveResults | Station abbrieviation, used to auto-name workspace |
paStart | Most EGRET functions | Starting month of period of analysis. Defaults to 10 |
paLong | Most EGRET functions | Length in number of months of period of analysis. Defaults to 12 |
*** Additionally, EGRET assumes that all concentrations are saved in mg/l. If some variation of 'mg/l' is not found in INFO$param.units, functions that calculate flux will issue a warning. This is because the conversion from mg/l to the user-specified flux unit (e.g., kg/day) uses hard-coded conversion factors.
readNWISsite
, readNWISpCode
whatWQPsites
# These examples require an internet connection to run
# Automatically gets information about site 05114000 and temperature
INFO <- readNWISInfo('05114000','00010',interactive = FALSE)
# These examples require an internet connection to run
# Automatically gets information about site 01594440 and temperature, no interaction with user
nameToUse <- 'Specific conductance'
pcodeToUse <- '00095'
# INFO <- readWQPInfo('USGS-04024315',pcodeToUse, interactive = FALSE)
# INFO2 <- readWQPInfo('WIDNR_WQX-10032762',nameToUse, interactive = FALSE)
# To adjust the label names:
# INFO$shortName <- "Little"
# INFO$paramShortName <- "SC"
filePath <- system.file("extdata", package="EGRET")
fileName <- 'infoTest.csv'
INFO <- readUserInfo(filePath,fileName, separator=",",interactive=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.