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
256 stars 85 forks source link

WaterML1.1 Depreciated? #671

Closed rayfludwig closed 1 year ago

rayfludwig commented 1 year ago

What is your question? Hi Laura - I have been using the USGS IV Test Tool https://waterservices.usgs.gov/rest/IV-Test-Tool.html to better understand the parameters included in the generated service URLs.

Under Optional Arguments -> Output Format -> ? it states that "WaterML2.0 is now defaulted. WaterML1.1 is deprecated"

However, when I use the dataRetrieval package to query NWIS the output url uses the format WaterML1.1 (see example below).

Do you know how long the USGS will support the WaterML1.1 format? Will a future version of the dataRetrieval package allow for the parsing of WaterML2.0 formatted data or transition to only returning data from this format?

To Reproduce

library(dataRetrieval)

df <- readNWISdata(sites = "14170000",
                   service = "iv",
                   parameterCd = c("00065","00060"),
                   startDate = "2022-10-10",
                   endDate = "2022-10-20")

attr(df,"url")

[1] "https://nwis.waterservices.usgs.gov/nwis/iv/?sites=14170000&parameterCd=00065,00060&startDT=2022-10-10&endDT=2022-10-20&format=waterml,1.1&"

Additional context I am writing a simple RShiny interface to visualize real-time gage data - I want to understand if a data schema change puts my interface at risk of breaking in the future.

Thanks for the help! Ray

ldecicco-USGS commented 1 year ago

The last time I brought this up with our internal developers, I was assured that both WaterML 1.1 and RDB formats would remain available for the foreseeable future. If/when they decide to actually turn those services off, we'd have plenty of time/resources to update the dataRetrieval package. I assume our expectations would be fully backwards compatibility if we switched from these original formats to something newer.

So, if you use the dataRetrieval package, I think you should feel comfortable that your Shiny app should work as expected going forward as long as you are able to update your packages (if/when the ultimate change to the services happens...which again I don't expect to see anytime soon).

If that still makes you nervous, I'd probably recommend using the JSON format instead of WaterML2 with the jsonlite package.

rayfludwig commented 1 year ago

Understood! Thanks for the quick response and all of the work on this!