Open ericnost opened 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
Instead of df_to_map
we could use my_prog_data
and style markers using this data...
Currently addressing this here: https://github.com/edgi-govdata-archiving/ECHO_modules/pull/33
Previously, we just showed clusters of markers in Step 8:
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.
Zoom:
This replicates some of the functionality of the watershed notebook, here in Cross-Programs
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.
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.