header_tag.html

Skip to contents

The information from this request is only available for a limited time after the original query from the WQP. In the readWQPdata and readWQPqw functions, the results from this function will be attached as an attribute to the data.

Usage

wqp_check_status(wqp_request_id)

Arguments

wqp_request_id

A character returned from the header of a WQP request.

Value

a list generated from the WQP describing what data was returned.

Examples

# \donttest{
rawPcode <- readWQPqw("USGS-01594440", "01075", 
                      ignore_attributes = TRUE, legacy = FALSE)
#> GET: https://www.waterqualitydata.us/wqx3/Result/search?siteid=USGS-01594440&pCode=01075&mimeType=csv&dataProfile=basicPhysChem
#> WQX3 services are in-development, use with caution.
headerInfo <- attr(rawPcode, "headerInfo")
wqp_request_id <- headerInfo$`wqp-request-id`
count_info <- wqp_check_status(wqp_request_id)
count_info[["dataProviders"]]
#>   name completedOk failed canceled sourceRowCount outputRowCount
#> 1 usgs        TRUE  FALSE    FALSE             66             65
#> 2  epa        TRUE  FALSE    FALSE              1              0
#>   firstResponseMillis longestLatencyMillis completionSeconds
#> 1                1229                 1219                 1
#> 2                 529                   NA                 0
# }