Import NWIS Sample Data for EGRET analysis

Description

Imports data from NWIS web service. This function gets the data from here: http://nwis.waterdata.usgs.gov/nwis/qwdata/ A list of parameter and statistic codes can be found here: http://help.waterdata.usgs.gov/codes-and-parameters For raw data, use readNWISqw from the dataRetrieval package. This function will retrieve the raw data, and compress it (summing constituents). See section 3.2.4 of the vignette for more details.

Usage

1
2
readNWISSample(siteNumber, parameterCd, startDate = "", endDate = "",
  interactive = TRUE)

Arguments

siteNumber

character USGS site number. This is usually an 8 digit number

parameterCd

character USGS parameter code. This is usually an 5 digit number.

startDate

character starting date for data retrieval in the form YYYY-MM-DD.

endDate

character ending date for data retrieval in the form YYYY-MM-DD.

interactive

logical Option for interactive mode. If true, there is user interaction for error handling and data checks.

Value

A data frame 'Sample' with the following columns:

Name Type Description
Date Date Date
ConcLow numeric Lower limit of concentration
ConcHigh numeric Upper limit of concentration
Uncen integer Uncensored data (1=TRUE, 0=FALSE)
ConcAve numeric Average concentration
Julian integer Number of days since Jan. 1, 1850
Month integer Month of the year [1-12]
Day integer Day of the year [1-366]
DecYear numeric Decimal year
MonthSeq integer Number of months since January 1, 1850
SinDY numeric Sine of the DecYear
CosDY numeric Cosine of the DecYear

See Also

compressData, populateSampleColumns, readNWISqw

Examples

1
2
3
4
5
6
7
8
## Not run: 
# These examples require an internet connection to run

Sample_01075 <- readNWISSample('01594440','01075', '1985-01-01', '1985-03-31')
Sample_All2 <- readNWISSample('05114000',c('00915','00931'), '1985-01-01', '1985-03-31')
Sample_Select <- readNWISSample('05114000',c('00915','00931'), '', '')

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.