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.
Arguments
- output
Character string specifying output format.
output = 'df'
for a dataframe oroutput = '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.
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',
p_pcomp = 'POW',
output = 'df')
#> # A tibble: 0 × 26
#> # ℹ 26 variables: CWPName <chr>, SourceID <chr>, CWPStreet <chr>,
#> # CWPCity <chr>, CWPState <chr>, CWPStateDistrict <chr>, CWPZip <chr>,
#> # MasterExternalPermitNmbr <chr>, RegistryID <chr>, CWPCounty <chr>,
#> # CWPEPARegion <chr>, FacDerivedHuc <chr>, CWPNAICSCodes <chr>, FacLat <dbl>,
#> # FacLong <dbl>, CWPTotalDesignFlowNmbr <dbl>, DschToMs4 <chr>,
#> # ExposedActivity <chr>, NPDESDataGroupsDescs <chr>,
#> # MsgpFacilityInspctnSmmry <chr>, MsgpCorrectiveActionSmmry <chr>, …
## Retrieve a simple features dataframe by bounding box
spatialdata <- echoWaterGetFacilityInfo(xmin = '-96.407563',
ymin = '30.554395',
xmax = '-96.25947',
ymax = '30.751984',
p_pcomp = 'POW',
output = 'sf')
#> No records returned in your request
# }