DOI-USGS / dataRetrieval

This R package is designed to obtain USGS or EPA water quality sample data, streamflow data, and metadata directly from web services.
https://doi-usgs.github.io/dataRetrieval/
Other
263 stars 86 forks source link

readNWISuv not recognizing p-code 95202 #452

Closed ostoken closed 5 years ago

ostoken commented 5 years ago

I've tried to run the readNWISuv command for p-code 95202 (cyanobacteria/blue green algae), but I'm getting zero data returned for time periods that I know have data in Aquarius. I can pull in other p-codes but for some reason the dataRetrieval package does not seem to recognize 95202. Is this happening for a reason?

ldecicco-USGS commented 5 years ago

Can you give me an example readNWISuv call? (ie..a site/time that you know exists)

ostoken commented 5 years ago

This is the code I was running. It works for other parameters at the site such as dissolved oxygen (00300).

siteNumber <- '422305121553803'
parameterCd <- '95202'
startDate <- "2015-05-20"
endDate <- "2015-10-20"
tz <- "America/Los_Angeles"

Data <- readNWISuv(siteNumber,parameterCd,startDate,endDate,tz)
Data <- renameNWISColumns(Data)
ldecicco-USGS commented 5 years ago

Apparently the data in Aquarius is set to Provisional... and the "uv" service won't publish provisional data that is older than 3 years. The data before 2015 is set to Approved and the data after 2015 is also provisional but within the 3 year window.

So....that's the reason. If you know who manages that data, you could ask them if there's any chance that data will be tagged as "Approved"...but off-hand I don't know that process for that particular type of data.

ostoken commented 5 years ago

I didn't realize there was a time limit for the uv data. Thanks for catching that for me!

ldecicco-USGS commented 5 years ago

only a time limit for provisional data!