You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It occurs to me that to do this we'll need to bring in mapping code that allows users to draw.
In the example I shared, we do this with ipyleaflet. I don't recall there being a specific reason for using that library vs. the one we use for everything else, folium.
Either way, we'd probably want to back-end the code that enables drawing.
That means adding something like this to utilities.py:
def draw():
from folium.plugins import Draw # see https://python-visualization.github.io/folium/latest/user_guide/plugins/draw.html
...
m = folium.Map()
Draw(export=True).add_to(m)
return m
Then in the notebook:
from ECHO_modules.utilities import draw
m = draw()
m
Next cell:
coords = m.shapes.pop() # something like that
program.store_results( region_type="Neighborhood",
region_value=coords )
I think it's more complicated than that because of the need to "handle" the shapes users draw (this may be why I was testing with ipyleaflet rather than folium).
Let the user select a polygon "neighborhood" from a map, and use that as the region of analysis.
The text was updated successfully, but these errors were encountered: