Cluster Effect - 'You cannot render this Element ' 'if it is not in a Figure.'
See original GitHub issueProblem description
Mapping markers for charter schools across the United States has worked. I’m now trying to apply a cluster method to this. The code below runs without an error. When I add a cell and run ‘mappo’ to see if the cluster effect has worked. I get the error mentioned in the last part of this post.
#MAIN METHOD THAT RETURNS CHOROPLETH MAP WITH POINTS
charterdropped.crs = sdshape.crs
charterdropped = charterdropped.to_crs(epsg='4326')
cjson = charterdropped.to_json()
mappo = folium.Map([37.7556, -122.4399], zoom_start = 7)
mappo.choropleth(
geo_data=districtchanged,
data=districtchanged,
columns=['FIPS', '% Total Population: White Alone'],
key_on='feature.properties.FIPS',
legend_name='White people',
fill_color='YlGn',
fill_opacity=0.4,
highlight=True)
points = folium.features.GeoJson(cjson)
mappo.add_child(points)
#Cluster Method
marker_cluster = MarkerCluster().add_to(mappo)
for each in charterdropped[0:len(charterdropped)].iterrows():
folium.Marker(
location=[each[1]['latitude'], each[1]['longitude']],
popup=folium.Popup(
folium.IFrame(
html=each[1]['SCH_NAME'])
).add_to(marker_cluster))
Output of ``folium.version
assert isinstance(figure, Figure), ('You cannot render this Element ' 'if it is not in a Figure.')
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Assertion error in Folium - "cannot render this Element if it's ...
However, when I try to save the map as an HTML file, I get an Assertion Error: "You cannot render this Element if...
Read more >python-visualization/folium - Gitter
json()['features'] ), I get the following error. ValueError: Cannot render objects with any missing geometries: and the error continues to return entries from ......
Read more >Graph visualization in the Neptune workbench
This diagram identifies user-interface elements present in the Graph tab: ... Once the Neptune workbench opens, running Jupyter, you will see a Neptune ......
Read more >Fix common cluster issues | Elasticsearch Guide [8.5] | Elastic
A red or yellow cluster status indicates one or more shards are missing or unallocated. These unassigned shards increase your risk of data...
Read more >FAQ - Graphviz
If you cannot find the answer to your question here, ask it in the ... How can I set a graph or cluster...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good to hear your problem is solved!
Thanks for your suggestions @Conengmo. I figured out a solution. Something that was important for me to do was switch the ordering of latitude and longitude. (x,y) --> (y,x). I believe perhaps maybe they were mislabeled in data handling.