Learn R Programming

EcoHydRology (version 0.4.7)

get_usgs_gage: A function to grab daily stream flow measurements from the USGS waterdata.usgs.gov server.

Description

A function to grab daily stream flow measurements from the USGS waterdata.usgs.gov server.

Usage

get_usgs_gage(flowgage_id,begin_date="1979-01-01",end_date="2013-01-01")

Arguments

flowgage_id
flowgage_id Gage is a TEXT/String rather than numeric or the query will fail on gages with leading 0s
begin_date
begin_date begin_date is a TEXT/String for the start date for the data you want. Default is the beginning of the cfsr dataset.
end_date
end_date end_date is a TEXT/String for the end date for the data you want. Default is in the future sometime

Value

  • areaIs the area above the gage
  • declatDecimal Lat
  • declonDecimal Lon
  • flowdataDataframe with the historical flow data - flow is in cubic meters per day

Examples

Run this code
flowgage_id="04216500"
flowgage=get_usgs_gage(flowgage_id)

## The function is currently defined as

Run the code above in your browser using DataLab