Deprecated function. USGS NWIS QW services will be discontinued, when that happens
this function will be removed from dataRetrieval. Please usereadWQPqw
or
readWQPdata
instead.
Usage
readNWISqw(
siteNumbers,
parameterCd,
startDate = "",
endDate = "",
expanded = TRUE,
reshape = FALSE,
tz = "UTC"
)
Arguments
- siteNumbers
character of USGS site numbers. This is usually an 8 digit number
- parameterCd
character that contains the code for a parameter group, or a character vector of 5-digit parameter codes. See Details.
- startDate
character starting date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates retrieval for the earliest possible record. Date arguments are always specified in local time.
- endDate
character ending date for data retrieval in the form YYYY-MM-DD. Default is "" which indicates retrieval for the latest possible record. Date arguments are always specified in local time.
- expanded
logical defaults to
TRUE
. IfTRUE
, retrieves additional information. Expanded data includes remark_cd (remark code), result_va (result value), val_qual_tx (result value qualifier code), meth_cd (method code), dqi_cd (data-quality indicator code), rpt_lev_va (reporting level), and rpt_lev_cd (reporting level type). IfFALSE
, only returns remark_cd (remark code) and result_va (result value). Expanded =FALSE
will not give sufficient information for unbiased statistical analysis.- reshape
logical, reshape the expanded data. If
TRUE
, then return a wide data frame with all water-quality in a single row for each sample. IfFALSE
(default), then return a long data frame with each water-quality result in a single row. This argument is only applicable to expanded data. Data requested usingexpanded=FALSE
is always returned in the wide format.- tz
character to set timezone attribute of dateTime. Default is "UTC", and converts the date times to UTC, properly accounting for daylight savings times based on the data's provided tz_cd column. Possible values to provide are "America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Anchorage", as well as the following which do not use daylight savings time: "America/Honolulu", "America/Jamaica", "America/Managua", "America/Phoenix", and "America/Metlakatla". See also
OlsonNames()
for more information on time zones.
Details
As of March 11, 2024, NWIS discrete water quality services are "frozen": any public data retrieval will not include any new data.
Contact CompTools@usgs.gov with additional questions!