edgi-govdata-archiving / ECHO_modules

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
GNU General Public License v3.0
3 stars 6 forks source link

Update utilities.py with a point symbol mapper #24

Closed ericnost closed 3 years ago

ericnost commented 3 years ago

Adds a function to the utilities file to display a point symbol map of the Dataframe passed in. A point symbol map represents each facility as a point, with the size of the point scaled to the data value (e.g. inspections, violations) proportionally or through quartiles.

See example use here: https://colab.research.google.com/drive/1-cYD4Kpq5_BWp4AV1xiupZDiFNgggAI_#

CWA inspections in the HUC12 watersheds intersecting with zip code 14226 (boundaries not shown). Orange circles proportionally scaled to the number of inspections, black circles = CWA-regulated facilities not inspected.

Screen Shot 2021-04-21 at 6 51 32 PM

CWA penalties in the HUC12 watersheds intersecting with zip code 14226 (boundaries not shown). Orange circles scaled via quartiles to the total penalties levied, black circles = other CWA-regulated facilities not penalized.

Screen Shot 2021-04-21 at 6 53 29 PM