Learn R Programming

dataRetrieval (version 2.0.0)

constructWQPURL: Construct WQP url for data retrieval

Description

Imports data from WQP web service. This function gets the data from here: http://nwis.waterdata.usgs.gov/nwis/qwdata A list of parameter codes can be found here: http://nwis.waterdata.usgs.gov/nwis/pmcodes/ A list of statistic codes can be found here: http://nwis.waterdata.usgs.gov/nwis/help/?read_file=stat&format=table

Usage

constructWQPURL(siteNumber, parameterCd, startDate, endDate)

Arguments

siteNumber

string or vector of strings USGS site number. This is usually an 8 digit number

parameterCd

string or vector of USGS parameter code. This is usually an 5 digit number.

startDate

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

endDate

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

Value

url string

Examples

Run this code
# NOT RUN {
siteNumber <- '01594440'
startDate <- '1985-01-01'
endDate <- ''
pCode <- c("00060","00010")
url_wqp <- constructWQPURL(paste("USGS",siteNumber,sep="-"),
           c('01075','00029','00453'),
           startDate,endDate)
# }

Run the code above in your browser using DataLab