Learn R Programming

EGRET (version 3.0.2)

readWQPSample: Import Sample Data from the Water Quality Portal for WRTDS

Description

Imports data from the Water Quality Portal, so it could be STORET, USGS, or USDA data. This function gets the data from: https://www.waterqualitydata.us For raw data, use readWQPdata. This function will retrieve the raw data, and compress it (summing constituents). See chapter 7 of the EGRET user guide for more details, then converts it to the Sample dataframe structure.

Usage

readWQPSample(siteNumber, characteristicName, startDate, endDate,
  verbose = TRUE, interactive = NULL)

Arguments

siteNumber

character site number. If USGS, it should be in the form :'USGS-XXXXXXXXX...'

characteristicName

character

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.

verbose

logical specifying whether or not to display progress message

interactive

logical deprecated. Use 'verbose' instead

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

See Also

readWQPdata, whatWQPsites, readWQPqw, compressData, populateSampleColumns

Examples

Run this code
# NOT RUN {
# These examples require an internet connection to run
# }
# NOT RUN {
Sample_All <- readWQPSample('WIDNR_WQX-10032762','Specific conductance', '', '')
# }

Run the code above in your browser using DataLab