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

Query high and low observation within a period of record #538

Closed chopkins-usgs closed 3 years ago

chopkins-usgs commented 3 years ago

Users have requested the ability to query a site for a high and low observation for each pcode within a specified time frame.

Ideally, this would allow a user to query a site (or list of sites) and ask for the highest and lowest value associated with a pcode for a specified or custom period of record.

ldecicco-USGS commented 3 years ago

Is this for a particular type of data? I'm not familiar with a particular web service that will do that. However, if you pull the data from the site for the period of record that you are interested, you could get the max and min values with the range function (in R) - or other ways depending on what you are trying to do. The exact R script to pull that info out though depends on the type of data you are getting (mostly because some tables that come back are "wide" and others are "long").

chopkins-usgs commented 3 years ago

I like the idea of using the range function to do so. I recommend that Charles Schalk use this function in dataRetrieval to replace his current uses in Groundwater Watch. @