get_flow_data: Retrieve discharge data at specified gages

Description Usage Arguments Value See Also Examples

View source: R/get_data.R

Description

Pulls all discharge data for the specified gage numbers and date range.

Usage

1
get_flow_data(gages_df, start_date, end_date)

Arguments

gages_df

A dataframe that includes the column site_no, a character vector with USGS gage IDs of stream gage sites to pull.

start_date

Character string with the starting date, using "YYYY-MM-DD" notation.

end_date

Character string with the end date, using "YYYY-MM-DD" notation.

Value

A dataframe with discharge data for each of the specified monitors. This is a dataframe that includes columns for the gage site number, date of each observation, and observed mean daily discharge (cubic feet per second).

See Also

readNWISdv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
miami_gages <- get_gages("12086", start_date = "2000-01-01",
                            end_date = "2009-12-31")
miami_flow_data <- get_flow_data(gages_df = miami_gages,
                                 start_date = "2000-01-01",
                                 end_date = "2000-01-31")
# Example using piping
library(dplyr)
miami_flow_data <- get_gages("12086", start_date = "2000-01-01",
                                end_date = "2009-12-31") %>%
                   get_flow_data(start_date = "2000-01-01",
                                 end_date = "2000-01-31")

## End(Not run)

rodlammers/countyfloods documentation built on Sept. 21, 2019, 6:14 a.m.