Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map with folium
#1
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


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_map
It shows the map but not the departments, does anyone see where I'm wrong ?
Thanks !
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Folium: Conflict with Font Awesome Kit jgomes_eu 0 1,182 Apr-23-2022, 03:18 PM
Last Post: jgomes_eu
  Folium import error kashif_flavio 2 3,568 Dec-07-2020, 08:58 AM
Last Post: bowlofred
  Showing only one country in Folium tantony 3 5,629 Nov-01-2019, 03:32 PM
Last Post: nilamo
  Folium map from another website tantony 8 3,116 Oct-15-2019, 07:33 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020