Replies: 1 comment
-
Sorry, I can't understand your questions. You can check out the ipyleaflet choropleth example. https://ipyleaflet.readthedocs.io/en/latest/api_reference/choropleth.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I'm trying to make a choropleth map based on a feature description name e.g. R2. But I'm having trouble identifying the proper key. I'm using the following code. Is there a way to print the geojson features to identify the proper calling string?
def getColor(d):
return {d == "\nR1\n" : '#800026' ,
d == "\nR2\n" : '#BD0026' ,
}
def style(feature):
return {
"stroke": True,
"color": "#0000ff",
"fill": True,
"fillColor": getColor(feature),
"weight": 2,
"opacity": 1,
"color": 'white',
"dashArray": '3',
"fillOpacity": 0.7,
"stroke": True,
}
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions