Use this skill when the user wants to create a map of the Netherlands showing data by gemeente, wijk, or buurt — a choropleth map. Trigger on 'map', 'choropleth', 'kaart', 'geographical visualization', 'show on a map', or any request to visualize data spatially across Dutch regions. Covers merging statistical data with PDOK geodata, CRS conversion, and rendering with geopandas, folium, and plotly. For fetching CBS data, use cbs-statline-skill first. For non-map charts, use data-viz-journalism instead.
Create choropleth maps of Dutch statistical data at gemeente, wijk, or buurt level. This skill handles the full pipeline: from a DataFrame with region codes to a rendered map.
User wants to show data spatially on a map of the Netherlands — by gemeente, wijk, or buurt. Keywords: "kaart", "map", "choropleth", "geografisch", "per gemeente op de kaart", "show on a map".
cbs-statline-skill first to get a DataFrame with region codes, then return here.data-viz-journalism for bar charts, line charts, etc.The user should have a pandas DataFrame with a column containing CBS region codes (GM, WK, or BU codes). If they don't, tell them to use cbs-statline-skill first.
uv pip install geopandas folium matplotlib plotly requests
# of: pip install geopandas folium matplotlib plotly requests
Follow these steps in order.
Auto-detect from the region codes in the data:
# Detecteer geografisch niveau op basis van regiocodes
voorbeeld_code = df['regio_code'].dropna().iloc[0].strip()
if voorbeeld_code.startswith('BU'):
niveau, pdok_laag = 'buurt', 'buurt_gegeneraliseerd'
elif voorbeeld_code.startswith('WK'):
niveau, pdok_laag = 'wijk', 'wijk_gegeneraliseerd'
elif voorbeeld_code.startswith('GM'):
niveau, pdok_laag = 'gemeente', 'gemeente_gegeneraliseerd'