get_data: Query SDWIS by PSID

Description Usage Arguments Value Examples

View source: R/get_data.R

Description

Query the SDWIS database by a public water system ID (PSID), start and end date, and storet.

Usage

1
get_data(psid = NULL, storet = NULL, start_date = NULL, end_date = NULL)

Arguments

psid

The public water system ID to be queried.

storet

A single storet to return.

start_date

The starting date for queried results.

end_date

The end date for queried results.

Value

A data.table of storet results for the input PSID and date range.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
d <- get_data("0105009")
head(d)

# Alameda Country Water District (psid = 110001)
# nitrate data (storet = A-029)
d <- get_data(
  psid   = "0110001",
  storet = "A-029")
ggplot(d, aes(SAMP_DATE, FINDING)) +
  geom_point() +
  geom_smooth()

thesadie/sdwisard documentation built on Jan. 27, 2021, 8:38 a.m.