getHydro: Retrieve R-friendly hydrology data from DBHYDRO using DB keys

View source: R/getHydro.R

getHydroR Documentation

Retrieve R-friendly hydrology data from DBHYDRO using DB keys

Description

Downloads and lightly processes DBHYDRO data. This function uses DB keys to download datasets and is therefore more versatile than getDBHYDRO.

Usage

getHydro(dbkey = "03638", startDate = "19600101",
endDate = Sys.Date())

Arguments

dbkey

DBkey for station and parameter of interest. Use 'getDBkey()' to find DBkeys associated with a station.

startDate

beginning of period of record, in form YYYYMMDD or YYYY-MM-DD

endDate

end of period of record, in form YYYYMMDD or YYYY-MM-DD

Value

dataframe getHydro returns a dataframe of data

Examples

## Not run: 
### example workflow:
getDBkey(stn = "S333", type = "FLOW") # find DBkey for station/parameter of interest
s333.daily <- getHydro(dbkey = "15042") # download data for DBkey
tail(s333.daily)

### check that instantaneous data is also loaded properly
### downloading large datasets may take a very long time
s333.inst <- getHydro(dbkey = "65086", 
   startDate = Sys.Date())
tail(s333.inst)

## End(Not run)


troyhill/SFNRC documentation built on Dec. 30, 2024, 4:32 p.m.