Returns a dataframe or simplefeature dataframe of permitted facilities returned by the query. Uses EPA's ECHO API: https://echo.epa.gov/tools/web-services/facility-search-water.

echoWaterGetFacilityInfo(output = "df", verbose = FALSE, ...)

Arguments

output

Character string specifying output format. output = 'df' for a dataframe or output = 'sf' for a simple features spatial dataframe. See (https://CRAN.R-project.org/package=sf) for more information about simple features.

verbose

Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE

...

Further arguments passed as query parameters in request sent to EPA ECHO's API. For more options see: https://echo.epa.gov/tools/web-services/facility-search-water#!/Facility_Information/get_cwa_rest_services_get_facility_info for a complete list of parameter options. Examples provided below.

Value

returns a dataframe or simple features dataframe

Examples

# \donttest{ ## These examples require an internet connection to run ## Retrieve table of facilities by bounding box echoWaterGetFacilityInfo(xmin = '-96.407563', ymin = '30.554395', xmax = '-96.25947', ymax = '30.751984', output = 'df')
#> # A tibble: 272 x 26 #> CWPName SourceID CWPStreet CWPCity CWPState CWPStateDistrict CWPZip #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 777 GR~ TXR1578~ 777 GRAH~ COLLEG~ TX "" 77845 #> 2 ACE TO~ TXR1566~ 2136 CHE~ COLLEG~ TX "" 77845~ #> 3 AGGIE ~ TX01321~ 800 FT S~ COLLEG~ TX "09" 77845 #> 4 AGRILI~ TXR1582~ 950 AGRO~ COLLEG~ TX "" 77845 #> 5 AGRIVE~ TX01212~ SWISHER ~ BRYAN TX "01" 00000 #> 6 ALENCO~ TXR05U8~ 615 W CA~ BRYAN TX "" 77801~ #> 7 ANDREW~ TXR1519~ 1098 ARR~ COLLEG~ TX "" 77845 #> 8 ASTIN ~ TXR05CE~ 1770 GEO~ COLLEG~ TX "" 77845~ #> 9 AT HOM~ TXR1559~ 2301 EAR~ COLLEG~ TX "" 77845~ #> 10 ATKINS~ TX00279~ 601 ATKI~ BRYAN TX "09" 77801 #> # ... with 262 more rows, and 19 more variables: #> # MasterExternalPermitNmbr <chr>, RegistryID <chr>, CWPCounty <chr>, #> # CWPEPARegion <chr>, FacDerivedHuc <chr>, FacLat <dbl>, FacLong <dbl>, #> # CWPTotalDesignFlowNmbr <dbl>, CWPActualAverageFlowNmbr <dbl>, #> # DschToMs4 <chr>, ExposedActivity <chr>, Subsector <chr>, #> # CWPVersionNmbr <dbl>, SubmittedDate <date>, CWPPermitTypeDesc <chr>, #> # CWPIssueDate <date>, CWPTerminationDate <date>, CWPSNCStatus <chr>, #> # CWPCsoOutfalls <dbl>
## Retrieve a simple features dataframe by bounding box spatialdata <- echoWaterGetFacilityInfo(xmin = '-96.407563', ymin = '30.554395', xmax = '-96.25947', ymax = '30.751984', output = 'sf') # }