Hi everyone,
I’m trying to create an interactive map of the Alpes-Maritimes department (France, code 06) using Python and Folium.
I want to:
- Display all communes of the department
- Highlight 4 specific urban areas (Nice, Antibes, Saint-Laurent-du-Var, Le Cannet)
- Assign a distinct color to each of these areas
- Group nearby specific communes under those 4 cities (like a sector)
I’ve tried using a .geojson
file with all communes and custom properties like "nom"
, "Secteur"
and "Couleur"
, but I keep getting errors in Folium when applying the style function or tooltips (e.g., KeyError: 'Couleur'
or missing fields).
I’m also working on macOS with Python 3.8, and had some compatibility issues with Fiona
and geopandas
, so I switched to using plain folium
with simplified geometries.
Could anyone please help me to confirm the best way to build a sector-based map with Folium
Thanks in advance
Angely