← Spainchartlink · choropleth
Spain by: autonomous communities · provinces
Map of Spain by autonomous community, one number per autonomous community
Also: Spain map by autonomous community · mapa de España por comunidades autónomas · mapa de comunidades autónomas · Spanish regions choropleth · map of Spain's 17 autonomous communities

Example: Population of Spain's autonomous communities, 2025 — Population on 1 January 2025 by autonomous community, from Eurostat's regional demography. NUTS 1 area borders are drawn on top.
About this template
Data: one row per autonomous community with its NUTS 2024 code (ES30 for Madrid, ES51 for Catalonia) or its name — in the local language or in English — and a number. A autonomous community with no row stays grey. The NUTS 1 area borders are drawn on top. The frame shows the peninsula and the Balearic Islands; the Canary Islands take their row but sit outside it. Same design as the other country maps.
A choropleth map of the regions of the "es-nuts2" geography, each region filled by one number from your data (the "population" column). The borders of the "es-nuts1" regions are drawn on top of the regions in dark navy blue, 1 units wide, so the finer regions read inside their larger units. The view is cropped to longitude -9.8–4.6 and latitude 35.7–44.1.
A sequential colour scale from pale blue for the smallest values to deep navy blue for the largest; pinned to 100000 to 10000000, so values beyond the ends take the end colour and the colour bar says ≤ and ≥; a gradient colour bar below the map, with its labels underneath; values formatted in compact form (1.2k, 3.4M), 1 decimal; on a white canvas (#ffffff) with near-black text — a light theme; 0.6-unit hairline outlines between regions.
The title and description are left-aligned above the chart. Font: Inter (the default); a source line with a link sits at the bottom, with the chartlink badge in the corner.
Data: 2 columns — autonomous_community (string, "Autonomous community (NUTS code or name)"), population (number, "Population, 1 January 2025") — and 19 rows in the example "Population of Spain's autonomous communities, 2025". Regions are named by ISO 3166-2 region codes or region names; a region with no row stays unfilled in grey, and an unknown code fails loudly with the nearest matches. Your data keeps the same column ids and every other setting comes from the template; an agent can change any of them.
Other looks of this template — dark (on a dark canvas): ast_24gt6jwEF4UMO1bnpVybu; buckets (with the values in classes and a swatch legend): ast_Aer9l8LFJTilxTf0VevqE; editorial (in the editorial house style — serif type on paper, a green ramp): ast_3n85R7JXp8VE56e94pNep; categories (with a text category per region and a swatch legend): ast_ZBubtetkczlDvAj4wA6jz; buckets-dark (with the values in classes and a swatch legend, on a dark canvas): ast_dFJiLGIhhQU28Nki65UpH; surroundings (with the land around the place drawn in grey): ast_cuzfSIcwPotgxarIdRtjH; categories-dark (with a text category per region and a swatch legend, on a dark canvas): ast_8KdNP6KHMUF9kBi0McLYC; buckets-editorial (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_4134C2TouAwr1zIUjPBbT; dark-surroundings (on a dark canvas, with the land around the place drawn in grey): ast_43aCuR5hag28fdfHmH7QU; buckets-surroundings (with the values in classes and a swatch legend, with the land around the place drawn in grey): ast_HhfS7dJDGXUQEBjANvanj; categories-editorial (with a text category per region and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_rNjsFGY1lswA1f3VnMC5M; editorial-surroundings (in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_U0T3qUHW0hzIyPbp0ZIZs; categories-surroundings (with a text category per region and a swatch legend, with the land around the place drawn in grey): ast_9p2Gvc54ZsDB4syMcICpw; buckets-dark-surroundings (with the values in classes and a swatch legend, on a dark canvas, with the land around the place drawn in grey): ast_alnyZcGAUZXB8tV5agRCj; categories-dark-surroundings (with a text category per region and a swatch legend, on a dark canvas, with the land around the place drawn in grey): ast_8dPVtcisuxuCI1GVDcfaX; buckets-editorial-surroundings (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_Bq3M6tex40r3V8yZKr15f; categories-editorial-surroundings (with a text category per region and a swatch legend, in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_IB4qpijedoyGeiHKaU6xR. On the page, switch with the toggles; an agent passes that id as the template instead.
Use it with your agent
Copy the prompt, paste it into Claude, ChatGPT, Cursor or any agent with the chartlink MCP server or API, and give it your numbers. It rebuilds this exact design with your data and hands back an embed, a PNG and a page.
The prompt in full
Data this template expects
| column id | type | in the example |
|---|---|---|
| autonomous_community | string | Autonomous community (NUTS code or name) |
| population | number | Population, 1 January 2025 |
19 rows in the example. Your data keeps these column ids; everything else about the chart comes from the template.
For agents: the API call
POST https://chartlink.app/api/assets
{
"template": "ast_tMuBAflusyoEFrNz89waG",
"knobs": {
"theme": "light",
"dataType": "gradient",
"title": {
"text": "Your title"
},
"source": {
"text": "Where the numbers come from"
}
},
"data": {
"columns": [
{
"id": "autonomous_community",
"type": "string"
},
{
"id": "population",
"type": "number"
}
],
"rows": [
[
"…"
]
]
},
"publish": true
}The recipe (the template's settings)
{
"chart": {
"bounds": [
-9.8,
35.7,
4.6,
44.1
],
"domain": [
100000,
10000000
],
"format": {
"kind": "number",
"compact": true,
"decimals": 1
},
"borders": {
"color": "#1f2937",
"width": 1,
"geography": "es-nuts1"
},
"outline": {
"width": 0.6
},
"geography": "es-nuts2"
},
"title": {
"text": "Population of Spain's autonomous communities, 2025"
},
"preset": "map-light",
"source": {
"url": "https://ec.europa.eu/eurostat/databrowser/view/demo_r_pjanaggr3/default/table",
"text": "Eurostat, population on 1 January by NUTS region (demo_r_pjanaggr3), 2025"
},
"encoding": {
"value": {
"column": "population"
},
"region": {
"column": "autonomous_community"
}
},
"description": {
"text": "Population on 1 January 2025 by autonomous community, from Eurostat's regional demography. NUTS 1 area borders are drawn on top."
}
}map · choropleth · spain · autonomous · europe · country-regions
Similar templates
- Map of Slovakia by municipality, one number per municipality
- Map of Switzerland by municipality, one number per municipality
- Map of Austria by municipality, one number per municipality
- Map of Romania by commune, one number per commune
- Map of Hungary by municipality, one number per municipality
- Map of Portugal by parish, one number per parish
- Map of Poland by municipality, one number per municipality
- Map of Bulgaria by municipality, one number per municipality
- All templates →