Skip to contents

Get URL(s) to query and get data on facilities from Envirofacts, in XML,JSON,CSV, or EXCEL format

Usage

url_envirofacts_data(regid, as_html = FALSE, linktext)

Arguments

regid

EPA-regulated facility registry identification (ID), vector

as_html

Whether to return as just the urls or as html hyperlinks to use in a DT::datatable() for example

linktext

used as text for hyperlinks, if supplied and as_html=TRUE

Value

URL(s)

Details

see https://www.epa.gov/enviro/web-services and

https://www.epa.gov/enviro/envirofacts-data-service-api

(https://data.epa.gov/efservice/multisystem/minLatitude/35.465158/maxLatitude/52.912225/minLongitude/-104.387994/maxLongitude/-69.231744/count) ???

WORK IN PROGRESS .... need to look at the documentation more closely but what it returns is not what is expected for some attempts

WEBPAGE URL (returns a webpage) e.g., https://enviro.epa.gov/enviro/efsystemquery.multisystem?fac_search=primary_name&fac_value=&fac_search_type=Beginning+With&postal_code=&location_address=&add_search_type=Beginning+With&city_name=&county_name=&state_code=&TribalLand=0&TribeType=selectTribeALL&selectTribe=noselect&tribedistance1=onLand&sic_type=Equal+to&sic_code_to=&naics_type=Beginning+with&naics_to=326&chem_name=&chem_search=Beginning+With&cas_num=&page_no=1&output_sql_switch=FALSE&report=1&database_type=Multisystem https://enviro.epa.gov/enviro/efsystemquery.multisystem?state_code=DE&naics_type=Beginning+with&naics_to=326&database_type=Multisystem

API URL (returns data) https://data.epa.gov/efservice/multisystem/minLatitude/35.465158/maxLatitude/52.912225/minLongitude/-104.387994/maxLongitude/-69.231744/naics_type/Beginning+with/naics_to/32611 https://data.epa.gov/efservice/multisystem/minLatitude/35.465158/maxLatitude/52.912225/minLongitude/-104.387994/maxLongitude/-69.231744/EXCEL