ECHO_modules is a Python package for analyzing a copy of the US Environmental Protection Agency's (EPA) Enforcement and Compliance History Online (ECHO) database
Generally, there are two ways to select a geography of interest:
manually writing it out in code
from ECHO_modules.make_data_sets import make_data_sets # Import relevant module
ds = make_data_sets(["RCRA Violations"]) # Create a DataSet for handling the data
erie_rcra_violations = ds["RCRA Violations"].store_results(region_type="County", region_value=["ERIE"], state="NY")
using the region widgets
Ultimately, our functions expect different geographies to be formatted differently. For instance, counties must be in lists in order for the get_facs_in_counties function to work. Because of the region input widget, zip codes and watersheds must be formatted as strings like '52358,53703' although passing that string to get_spatial_data won't work because it expects a list.
Generally, there are two ways to select a geography of interest:
Ultimately, our functions expect different geographies to be formatted differently. For instance, counties must be in lists in order for the
get_facs_in_counties
function to work. Because of the region input widget, zip codes and watersheds must be formatted as strings like'52358,53703'
although passing that string toget_spatial_data
won't work because it expects a list.