readECHO_ec: Read effluent chart data from EPA ECHO webservices

View source: R/readECHO_ec.r

readECHO_ecR Documentation

Read effluent chart data from EPA ECHO webservices

Description

This function extracts effluent chart data from EPA ECHO for multiple stations & combinations of parameters. All arguments are optional except p_id. At least one p_id must be specified.

Usage

readECHO_ec(
  ...,
  print = TRUE,
  stringsAsFactors = default.stringsAsFactors(),
  progress = TRUE
)

Arguments

...

additional arguments to be passed to ECHO query path. See optional arguments for effluent chart data reads.

print

Logical. If TRUE (default), print summary table of facilities & parameters returned.

stringsAsFactors

Logical. Passed to read.csv. See ?read.csv for more information.

p_id

Permitted facility ID. Either a single text value (in quotes) or a vector of text values.

parameter_code

Parameter code. Either a single text value (in quotes) or a vector of text values.

start_date

Query start date in "mm/dd/yyyy" format.

end_date

Query end date in "mm/dd/yyyy" format.

Value

A flat data frame of EPA ECHO effluent chart data

Examples

#Extract effluent chart data for facility UT0025241, all outfalls
UT0025241_ec=readECHO_ec(p_id="UT0025241", start_date="01/01/2010", end_date="01/15/2019")
head(UT0025241_ec)

# Extract effluent total phosphorus data from outfall 001 for facility UT0025241 
UT0025241_tp_001=readECHO_ec(p_id="UT0025241", parameter_code="00665", outfall="001")
UT0025241_tp_001_effluent=UT0025241_tp_001[UT0025241_tp_001$monitoring_location_desc=="Effluent Gross",]
head(UT0025241_tp_001_effluent)

# Extract flow through facility from UT0021717
UT0021717_flow=readECHO_ec(p_id="UT0021717", parameter_code="50050")

# Extract flow & TP from UT0025241 & UT0021717
tp_flow=readECHO_ec(p_id=c("UT0025241","UT0021717"), parameter_code=c("50050","00665"))

utah-dwq/udwqTools documentation built on July 17, 2024, 10:21 p.m.