Title: | Access EPA 'ECHO' Data |
---|---|
Description: | An R interface to United States Environmental Protection Agency (EPA) Environmental Compliance History Online ('ECHO') Application Program Interface (API). 'ECHO' provides information about EPA permitted facilities, discharges, and other reporting info associated with permitted entities. Data are obtained from <https://echo.epa.gov/>. |
Authors: | Michael Schramm [aut, cre, cph]
|
Maintainer: | Michael Schramm <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.9.9999 |
Built: | 2025-02-09 04:30:01 UTC |
Source: | https://github.com/mps9506/echor |
Returns DMRs in a nested list using echoGetEffluent()
. Uses a dataframe with a column of p_id numbers. Please note that p_id's are case sensitive.
downloadDMRs(df, idColumn, pBar = TRUE, verbose = FALSE, ...)
downloadDMRs(df, idColumn, pBar = TRUE, verbose = FALSE, ...)
df |
dataframe with column of id numbers |
idColumn |
unquoted string, name of column containing the p_id permit numbers |
pBar |
logical, display a progress bar? Defaults to TRUE |
verbose |
logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE. Suggest leaving this FALSE if |
... |
additional arguments passed to echoGetEffluent |
dataframe df, with a column containing the discharge monitoring reports downloaded with echoGetEffluentSummary
## This example requires an internet connection to run ## Retrieve multiple DMRs for flow df <- tibble::tibble("id" = c('TX0119407', 'TX0132187')) df <- downloadDMRs(df, id)
## This example requires an internet connection to run ## Retrieve multiple DMRs for flow df <- tibble::tibble("id" = c('TX0119407', 'TX0132187')) df <- downloadDMRs(df, id)
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-air#!/Facilities/get_air_rest_services_get_facility_info
echoAirGetFacilityInfo(output = "df", verbose = FALSE, ...)
echoAirGetFacilityInfo(output = "df", verbose = FALSE, ...)
output |
Character string specifying output format. |
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_air_rest_services_get_facility_info for a complete list of parameter options. Examples provided below. |
dataframe or sf dataframe suitable for plotting
## These examples require an internet connection to run ## Retrieve table of facilities by bounding box echoAirGetFacilityInfo(p_c1lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', output = 'df') ## Retrieve a simple features dataframe by bounding box spatialdata <- echoAirGetFacilityInfo(p_c1lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', output = 'sf')
## These examples require an internet connection to run ## Retrieve table of facilities by bounding box echoAirGetFacilityInfo(p_c1lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', output = 'df') ## Retrieve a simple features dataframe by bounding box spatialdata <- echoAirGetFacilityInfo(p_c1lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', output = 'sf')
Returns variable name and descriptions for parameters returned by echoAirGetFacilityInfo
echoAirGetMeta(verbose = FALSE)
echoAirGetMeta(verbose = FALSE)
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE |
returns a dataframe
## These examples require an internet connection to run # returns a dataframe of echoAirGetMeta()
## These examples require an internet connection to run # returns a dataframe of echoAirGetMeta()
Download EPA ECHO emissions inventory report data
echoGetCAAPR(p_id, verbose = FALSE, ...)
echoGetCAAPR(p_id, verbose = FALSE, ...)
p_id |
character string specify the identifier for the service. Required. |
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE |
... |
Additional arguments |
dataframe
## This example requires an internet connection to run echoGetCAAPR(p_id = '110000350174')
## This example requires an internet connection to run echoGetCAAPR(p_id = '110000350174')
Uses EPA ECHO API to download the Discharge Monitoring Record (DMR) of a single plant, identified with p_id. Please note that the p_id is case sensitive.
echoGetEffluent(p_id, verbose = FALSE, ...)
echoGetEffluent(p_id, verbose = FALSE, ...)
p_id |
Character string specify the identifier for the service. Required. Case sensitive. |
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE |
... |
Further arguments passed on as query parameters sent to EPA's ECHO API. For more options see: https://echo.epa.gov/tools/web-services/effluent-charts#!/Effluent_Charts/get_eff_rest_services_get_effluent_chart |
Returns a dataframe.
## This example requires an internet connection to run ## Retrieve single DMR for flow echoGetEffluent(p_id = 'tx0119407', parameter_code = '50050')
## This example requires an internet connection to run ## Retrieve single DMR for flow echoGetEffluent(p_id = 'tx0119407', parameter_code = '50050')
Provides interface for downloading facility information from Clean Air Act, Clean Water Act, and Safe Drinking Water Act permitted facilities.
echoGetFacilities(program, output = "df", verbose = FALSE, ...)
echoGetFacilities(program, output = "df", verbose = FALSE, ...)
program |
Character, either |
output |
Character string specifying output format. |
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. |
dataframe or sf dataframe suitable for plotting
Downloads self reported discharge and emissions data
echoGetReports(program, p_id, verbose = FALSE, ...)
echoGetReports(program, p_id, verbose = FALSE, ...)
program |
Character, either |
p_id |
Character string specify the identifier for the service. Required. |
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE. |
... |
Further arguments passed on as query parameters sent to EPA's ECHO API. |
Returns a dataframe
Downloads EPA ECHO Safe Drinking Water Facilities Metadata
echoSDWGetMeta(verbose = FALSE)
echoSDWGetMeta(verbose = FALSE)
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE |
returns a dataframe
## These examples require an internet connection to run # returns a dataframe of echoSDWGetMeta()
## These examples require an internet connection to run # returns a dataframe of echoSDWGetMeta()
Returns a dataframe of permitted public water systems returned by the query. Uses EPA's ECHO API: https://echo.epa.gov/tools/web-services/facility-search-drinking-water#!/Safe_Drinking_Water/get_sdw_rest_services_get_systems.
echoSDWGetSystems(verbose = FALSE, ...)
echoSDWGetSystems(verbose = FALSE, ...)
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-drinking-water#!/Safe_Drinking_Water/get_sdw_rest_services_get_systems for a complete list of parameter options. Examples provided below. |
returns a dataframe
## These examples require an internet connection to run echoSDWGetSystems(p_co = "Brazos", p_st = "tx")
## These examples require an internet connection to run echoSDWGetSystems(p_co = "Brazos", p_st = "tx")
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, ...)
echoWaterGetFacilityInfo(output = "df", verbose = FALSE, ...)
output |
Character string specifying output format. |
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. |
returns a dataframe or simple features dataframe
## These examples require an internet connection to run ## Retrieve table of facilities by bounding box echoWaterGetFacilityInfo(p_c1lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', p_pcomp = 'POT', output = 'df') ## Retrieve a simple features dataframe by bounding box spatialdata <- echoWaterGetFacilityInfo(p_c2lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', p_pcomp = 'POT', output = 'sf')
## These examples require an internet connection to run ## Retrieve table of facilities by bounding box echoWaterGetFacilityInfo(p_c1lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', p_pcomp = 'POT', output = 'df') ## Retrieve a simple features dataframe by bounding box spatialdata <- echoWaterGetFacilityInfo(p_c2lon = '-96.407563', p_c1lat = '30.554395', p_c2lon = '-96.25947', p_c2lat = '30.751984', p_pcomp = 'POT', output = 'sf')
Returns variable name and descriptions for parameters returned by echoWaterGetFacilityInfo
echoWaterGetMeta(verbose = FALSE)
echoWaterGetMeta(verbose = FALSE)
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE |
returns a dataframe
## These examples require an internet connection to run # returns a dataframe of echoWaterGetMeta()
## These examples require an internet connection to run # returns a dataframe of echoWaterGetMeta()
Returns a dataframe of parameter codes and descriptions.
echoWaterGetParams(term = NULL, code = NULL, verbose = FALSE)
echoWaterGetParams(term = NULL, code = NULL, verbose = FALSE)
term |
Character string specifying the parameter search term. Partial or complete search phrase or word. |
code |
Character string specifying the parameter search code value. |
verbose |
Logical, indicating whether to provide processing and retrieval messages. Defaults to FALSE |
Returns a dataframe.
## These examples require an internet connection to run ## Retrieve parameter codes for dissolved oxygen echoWaterGetParams(term = "Oxygen, dissolved") echoWaterGetParams(code = "00300")
## These examples require an internet connection to run ## Retrieve parameter codes for dissolved oxygen echoWaterGetParams(term = "Oxygen, dissolved") echoWaterGetParams(code = "00300")