Jun-29-2018, 08:36 PM
Hi,
I'm trying to have a choropleth map of reach departments with folium.
I downloaded the 'departements-2.geojson' file on https://www.france-geojson.fr and created a csv file with some data (to test, I took just as data the number of the department).
Here is the code
Thanks !
I'm trying to have a choropleth map of reach departments with folium.
I downloaded the 'departements-2.geojson' file on https://www.france-geojson.fr and created a csv file with some data (to test, I took just as data the number of the department).
Here is the code
iw_map = folium.Map(location=[50.666, -1.37], zoom_start=11) iw_map.choropleth( geo_str='departements-2.geojson', data=state_data, columns=['code', 'donnee'], key_on='features.code', fill_color='YlGn', fill_opacity=0.7, line_opacity=0.2 ) folium.LayerControl().add_to(iw_map) iw_mapIt shows the map but not the departments, does anyone see where I'm wrong ?
Thanks !