Closed tlroot closed 1 month ago
Yeah, there's a change in underlying services coming to the groundwater services. The github version of dataRetrieval should now use:
periodicGWLevelData <- readNWISdata(site_no = "282341081040101",
begin_date = "1900-01-01",
end_date = "2024-07-26",
service = "gwlevels")
The service we need to switch to doesn't have a specific parameter code query.
If you are always asking for a site or list of sites, you can also use:
periodicGWLevelData <- readNWISgwl("282341081040101",
parameterCd = "62611")
We baked in a parameter code filter to the function.
I'll think about adding some simple logic to this PR: https://github.com/DOI-USGS/dataRetrieval/pull/717 to get those arguments to be more backwards compatible (specifically site, startDT, endDT).
What is your question? I ran into an issue with retrieving discrete groundwater levels after installing dataRertrieval from GitHub rather than CRAN. I am wondering if this is a bug or if I need to use different script with the newer version of dataRetrieval.
To Reproduce
Expected behavior When run using dataRetrieval downloaded from Cran on 7/26/24, the above code results in a data frame with 477 observations and 18 variables. When run using dataRetrieval downloaded from GitHub on 7/26/24, the above code returns a data frame with 1 column and hundreds of rows of .html code (see screenshot below). It is not a site-specific problem - the script cycles through 492 groundwater sites and the issue occurs with all of them.
Screenshots
Session Info R-4.4.0patched RStudio 2024.04.2 Build 764