load_precip_from_usgs: Load precipitation from USGS Web Services

View source: R/precip.R

load_precip_from_usgsR Documentation

Load precipitation from USGS Web Services

Description

Fetches and returns precipitation timeseries from USGS web services. Timeseries is automatically aggregated to hourly timesteps.

Usage

load_precip_from_usgs(start_date, end_date = NULL, station_id = "01102500",
  tz = "EST", as.type = c("dataframe", "zoo"), datetime.name = "Datetime",
  value.name = "Precip")

Arguments

start_date

Start date of timeseries as string

end_date

End date of timeseries as string (default=NULL meaning use today's date)

station_id

USGS station ID as string (default="01102500" for Aberjona River)

tz

Timezone assigned to resulting dataframe (default="EST")

as.type

Return type as 'dataframe' (default) or 'zoo'

datetime.name

Name of datetime column (default="Datetime")

value.name

Name of precipitation column (default="Precip")

Value

dataframe or zoo object of hourly precipitation timeseries in inches/hour

Examples

pcp_usgs <- load_precip_from_usgs(start_date="2015-05-01",
                                  end_date="2015-05-10")

walkerjeffd/myrwaR documentation built on Nov. 14, 2024, 1:25 p.m.