EPATADA icon indicating copy to clipboard operation
EPATADA copied to clipboard

Advanced data retrieval

Open cristinamullin opened this issue 2 years ago • 5 comments

Users would like to retrieve WQP data and OPTIONALLY any additional USGS continuous data that in the specific area of interest and possible also nearby data (within additional buffer zone) or upstream/downstream as well (not just within the bounding box).

We can bring in USGS continuous data via dataRetrieval. We can also leverage NLDI to query by lat/long (e.g. all sites within 500m). Only problem is that for the continuous data, USGS uses p-codes and not Characteristic Names, so it may be best to wait until after this year (they are working on moving away from p-codes).

Example code: advancedqueries.zip

Which is best - NLDI or nhdplusTools to retrieve catchment geometries in R/ discover nearby data from other data sources?

cristinamullin avatar Mar 01 '23 19:03 cristinamullin

Yes on continuous data. For NLDI could you leverage existing R tools, like nhdplusTools in more of a couple short demo?

jbousquin avatar Jun 05 '23 20:06 jbousquin

Note from Shelly: Consider how the NLDI use case would be done with WATERS. NLDI and WATERS both use a manual process to index WQP location to NHDPlus reach codes. NLDI is stored at USGS and WATERS is stored at EPA. NLDI and WATERS both index WQP locations to NHDPlus V2. WQP indexed locations to the WBD (HUC12s) not NHD or NHDPlus. If we wanted to bring in the USGS continuous data we may want to consider writing a TADA R function that leverages WATERS APIs and USGS continuous data APIs rather than leveraging dataRetreival (which includes the NLDI integration: https://github.com/DOI-USGS/dataRetrieval/blob/main/R/findNLDI.R). Needs more discussion!

cristinamullin avatar Sep 11 '23 16:09 cristinamullin

OP_Mapping_forEPA.txt Note that USGS migration from p-codes to observed properties may fix that compatibility issue between their cont data and their discrete data. Not sure if this migration to observed properties will cover NWIS cont data or only their discrete WQ data that already goes to WQP.

cristinamullin avatar Sep 11 '23 16:09 cristinamullin

  1. For new TADA_listNWIS() and TADA_getNWIS() functions, explore editing the search 'parameters' argument to instead be observed properties.
  2. Modify the returned results of TADA_listNWIS() and TADA_getNWIS() to be compatible with WQX continuous data call results.

kathryn-willi avatar May 01 '25 16:05 kathryn-willi