Closed TomUniBonn closed 2 years ago
If you try the whatNWISdata
function, you can get an idea of where the data is:
library(dataRetrieval)
startDate<-"1950-01-01"
endDate<-"2022-01-01"
siteid<-"09180500"
available <- whatNWISdata(siteNumber = siteid, parameterCd = "00010")
Looking at that "available" data frame:
You can see there is data available in the "dv", "uv", and "qw" services. Each of those are different, so you would need to do 3 separate calls:
uv <- readNWISuv(siteid, "00010")
dv <- readNWISdv(siteid, "00010")
qw <- readNWISqw(siteid, "00010")
(qw == discrete measurements, dv is daily - by default a daily mean, uv = "unit values" which is typically sensor data)
How you decide to merge those sets together, will depend on what you are doing.
The function readNWISqw
will give you a warning that the services are going to be retired. Usually I would switching to the readWQPqw
function. In this case, I'm not seeing the temperature results on the Water Quality Portal for this site. I'm not sure why that is, but I can ask around.
When downloading a parameter (in this case water temperature: "00010") only one of the available datasets within the parameter is retrievable via readNWISdv, even if there are are multiple. Since there aren't multiple parameter codes, how do you access different datasets within your set parameter?
The code:
The table then only contains the dataset which is starting in 2006 instead of the additional instantaneous water temperature dataset measured from 1949 onwards at this staion.
Session info:
Thanks in advance.