Description Usage Arguments Value Note Author(s) References See Also Examples
Retrieve U.S. Geological Survey (USGS) daily mean-streamflow values for a streamgage identification number. This function is a wrapper on dataRetrieval::
readNWISstat()
to provide an abstraction layer to the dataRetrieval package. The mnget
function adds some additional information for purpose of the akqdecay package. The function creates the canonical daily-mean streamflow table (an R data.frame
) to be picked up in turn by the akqdecay
function of this package. The function fill_mnenv
is a wrapper that can be used to fill an R environment
with the output of the akqdecay
function. Users interested in monthly values might be especially interested in the monthly computations based on the daily streamflows but with the inclusion of separated streamflow in dvpart
and fill_dvpartenv
(see Examples in dvpart
for a demonstration).
1 2 3 |
siteNumber |
USGS streamgage identification number and nomenclature matches that of the dataRetrieval package. Multiple site numbers can be provided because the underlying |
sdate |
Start date (default is earliest) and nomenclature matches that of the dataRetrieval package with string format of “YYYY-MM” for year (YYYY) and month (MM) respectively padded by zeros as needed; |
edate |
Ending date (default is earliest) and nomenclature matches that of the dataRetrieval package with string format of “YYYY-MM” for year (YYYY) and month (MM) padded by zeros as needed; |
flowlo |
Optional lower streamflow threshold on which to convert to |
flowhi |
Optional upper streamflow threshold on which to convert to |
silent |
Suppress informative calls to |
drsilent |
The argument though converted to “silent” that is passed to |
drget |
If set, the retrieval from |
pCode |
Parameter code (default is discharge [streamflow]) and nomenclature almost matches that of the dataRetrieval package; |
message |
An optional string that if populated will trigger a |
... |
Additional arguments to pass to function |
An R data.frame
is returned with these expected columns. Some streamgages can have multiple discharges descriptors typed as monthly values—Is this actually true for monthly flows? Only the Flow
column is handled by akqdecay.
agency_cd |
The agency code for the data; |
site_no |
The streamgage identification number; |
site |
The streamgage identification number; |
year |
The calendar year of the date; |
month |
The month; |
decade |
The decade of the daily value. The decade is assign by taking the year and the trailing digit has been stripped and replaced with zero. This is not a technique in which a “decade” is centered on an even step of 10—meaning, say that 1996–2005 is not the “2000 decade” but simply 01/*/2000–12/*/2009 is the “2000 decade”; and |
Flow |
The streamflow in cubic feet per second, note that the capitalization is from the dataRetrieval package, elsewhere in akqdecay this will become lower case or an alternative name for streamflow. |
For the greater purposes of the akqdecay package, the argument pCode
for the defaults is expected to be left untouched. The capitalization inconsistency in the returned R data.frame
is left intact as it is consistent with the operation of the dataRetrieval::
renameNWISColumns()
function that is called internally. But at the time of this development (July 2018), the renaming has no effect.
W.H. Asquith
Hirsch, R.M., and De Cicco, L.A., 2015, User guide to Exploration and Graphics for RivEr Trends (EGRET) and dataRetrieval: R packages for hydrologic data (version 2.0, February 2015): U.S. Geological Survey Techniques and Methods book 4, chap. A10, 93 p., https://doi.org/10.3133/tm4A10.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.