edgi-govdata-archiving / ECHO-Cross-Program

Jupyter Notebooks for ECHO that use data from multiple EPA programs
https://colab.research.google.com/github/edgi-govdata-archiving/ECHO-Cross-Program/blob/master/ECHO-Cross-Programs.ipynb
GNU General Public License v3.0
8 stars 5 forks source link

Style map markers by variable of interest #42

Open ericnost opened 4 years ago

ericnost commented 4 years ago

In line with:

For showing all facilities in the area of interest (the first map, using ECHO_EXPORTER), we might style the markers by overall compliance (two colors).

For mapping facilities in a specific program (e.g. Air Violations, the second map), we might style the markers by # of violations (marker size)

This will help users decide which facility to focus on in the third part of the notebook.

ericnost commented 4 years ago

We should also warn users that we are only showing them at most 400 facilities.

print("Below are just 400 facilities out of XXXXX") or something like that.

A better solution would be to use marker clustering. See: https://python-visualization.github.io/folium/plugins.html#folium.plugins.FastMarkerCluster and an example: https://medium.com/@bobhaffner/folium-markerclusters-and-fastmarkerclusters-1e03b01cb7b1

ericnost commented 4 years ago

Instead of df_to_map we could use my_prog_data and style markers using this data...

ericnost commented 3 years ago

Related to https://github.com/edgi-govdata-archiving/ECHO_modules/pull/24

ericnost commented 2 years ago

Currently addressing this here: https://github.com/edgi-govdata-archiving/ECHO_modules/pull/33

ericnost commented 2 years ago

Previously, we just showed clusters of markers in Step 8:

Screen Shot 2021-11-04 at 4 50 00 PM

Now, we can show the boundaries of whatever regions (zips, counties, etc.) we selected, plus facilities based on the program data (i.e. size / color the facilities based on their # of CWA inspections). Orange circles are facilities with, in this case, RCRA inspections, and black dots are all other RCRA-flagged facilities in the selected regions. The size of the orange circles corresponds to the number of RCRA inspections since 2001.

Screen Shot 2021-11-04 at 6 05 57 PM

Zoom:

Screen Shot 2021-11-04 at 6 06 05 PM

This replicates some of the functionality of the watershed notebook, here in Cross-Programs

ericnost commented 2 years ago

This can be examined here: https://colab.research.google.com/drive/1FFzyAGGWtMpI4S99Y8TH6tByu8aemaox#scrollTo=mKie04Bit-lv

Currently it's only working for counties, because of the way that the spatial data is structured. Shouldn't be too hard to work around, but we need a plan.