Open dmvianna opened 6 years ago
MarkerClusters...
m = folium.Map([37.7556, -122.4399], zoom_start = 12)
cluster = folium.MarkerCluster(name='assaults')
assaults.marker.apply(lambda x: cluster.add_child(x))
m.add_child(cluster)
folium.LayerControl().add_to(m)
print(m)
@dmvianna glad you found it useful. This is great! I definitely agree with your approach and the smaller functions using pandas. It certainly makes it more readable and flexible. Definitely let me know if you change the rest of the code in this style.
Thanks for your tutorial, I'm finding it extremely useful.
However, the huge monolythic functions bother me. What's the point of doing one big hard to understand function and not just using global variables? It would be easier to read and refactor. Anyway, there's a third alternative: using pandas and composable small functions.
I favour a more functional style, and pandas really helps it.
If I succeed with changing the rest of the code with this, I might write a pull request. Maybe as a branch, so you get to keep both styles?