Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style map markers by variable of interest #42

Open
ericnost opened this issue Jun 13, 2020 · 6 comments
Open

Style map markers by variable of interest #42

ericnost opened this issue Jun 13, 2020 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@ericnost
Copy link
Member

ericnost commented Jun 13, 2020

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 ericnost added enhancement New feature or request good first issue Good for newcomers labels Jun 13, 2020
@ericnost
Copy link
Member Author

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
Copy link
Member Author

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

@ericnost
Copy link
Member Author

Related to edgi-govdata-archiving/ECHO_modules#24

@ericnost
Copy link
Member Author

ericnost commented Nov 4, 2021

Currently addressing this here: edgi-govdata-archiving/ECHO_modules#33

@ericnost
Copy link
Member Author

ericnost commented Nov 4, 2021

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
Copy link
Member Author

ericnost commented Nov 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants