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
260 stars 84 forks source link

Adapting NLDI client to changes in the NLDI service #624

Closed mikejohnson51 closed 2 years ago

mikejohnson51 commented 2 years ago

Hi @ldecicco-USGS,

This PR modifies the findNLDI function to handle two changes in the NLDI response.

The first was raised in #623 and relates to requests that return no data. The behavior now is a more clear warning message that no data was found rather then the crypitc jsonlite/sf error message.

The second was a change in the NLDI that defaulted to HTML landing pages (raised in internetofwater/nldi-services#315). The behavior now is that a JSON object is explicitly requested in the URLs constructed in findNLDI (opposed to relying on a default).

All tests pass locally as well. Please let me know if anything else needs changing!

Mike

ldecicco-USGS commented 2 years ago

Awesome, looks great!