← Spainchartlink · choropleth
Spain by: provinces · autonomous communities
Map of Spain by province, one number per province
Also: Spain map by province · mapa de España por provincias · mapa provincial de España · Spanish provinces choropleth · map of Spain's 50 provinces

Example: Population of Spain's provinces, 2025 — Population on 1 January 2025 by province. Madrid, Barcelona and Valencia lead; Soria, Teruel and the two autonomous cities are the smallest.
About this template
Data: one row per province with its ISO 3166-2 code (ES-M for Madrid, ES-B for Barcelona) or its name, and a number. A province with no row stays grey. The frame shows the peninsula and the Balearic Islands; the two Canary provinces take their rows but sit outside it. Same design as the other country maps, so they sit side by side.
A choropleth map of the states, provinces or regions of Spain (ISO 3166-2 codes), each region filled by one number from your data (the "population" column). 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 6000000, 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.5-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 — province (string, "Province (ISO 3166-2 code or name)"), population (number, "Population, 1 January 2025") — and 52 rows in the example "Population of Spain's provinces, 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_hH9D3PsTM3FWccVzJMnO7; buckets (with the values in classes and a swatch legend): ast_bsAbHu9OCgMIXJePmANg0; editorial (in the editorial house style — serif type on paper, a green ramp): ast_FZP4PSMPj0vY0R0zPAcyt; categories (with a text category per region and a swatch legend): ast_tB1ub9lMa38HmZAABhzTJ; buckets-dark (with the values in classes and a swatch legend, on a dark canvas): ast_EXmq9BcUYSR9XeIObUFh8; surroundings (with the land around the place drawn in grey): ast_NRk0ZZVJUrkyDmX2SNmSW; categories-dark (with a text category per region and a swatch legend, on a dark canvas): ast_YyxieotL2Wz3Wfhk9rJWG; buckets-editorial (with the values in classes and a swatch legend, in the editorial house style — serif type on paper, a green ramp): ast_Rypz1Nxx7U4AMtY2Gdzlb; dark-surroundings (on a dark canvas, with the land around the place drawn in grey): ast_ZLqZ9nF3gN4vee5SKpCum; buckets-surroundings (with the values in classes and a swatch legend, with the land around the place drawn in grey): ast_T8NwjGbYCMbNa2Mwc0HKd; 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_OEDXCdIT8RdxJe013ryUQ; editorial-surroundings (in the editorial house style — serif type on paper, a green ramp, with the land around the place drawn in grey): ast_kT1wJ8PkPcRhaw4nR89E3; categories-surroundings (with a text category per region and a swatch legend, with the land around the place drawn in grey): ast_qC3cQOBYfnUYyX7JPVQJI; 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_P0F6xNwI9iYzh2YP5dPYX; 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_QwM1EYbrQ77e6AznquJ2U; 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_fTofcwwoD8FNK5bgjoBGV; 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_aiGSHmPPYf9QGIzV4IDhv. 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 |
|---|---|---|
| province | string | Province (ISO 3166-2 code or name) |
| population | number | Population, 1 January 2025 |
52 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_M1eCE1MnnSZcNqcRLKGht",
"knobs": {
"theme": "light",
"dataType": "gradient",
"title": {
"text": "Your title"
},
"source": {
"text": "Where the numbers come from"
}
},
"data": {
"columns": [
{
"id": "province",
"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,
6000000
],
"format": {
"kind": "number",
"compact": true,
"decimals": 1
},
"outline": {
"width": 0.5
},
"geography": "es-regions"
},
"title": {
"text": "Population of Spain's provinces, 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": "province"
}
},
"description": {
"text": "Population on 1 January 2025 by province. Madrid, Barcelona and Valencia lead; Soria, Teruel and the two autonomous cities are the smallest."
}
}map · choropleth · spain · provinces · country-regions
Similar templates
- Map of Italy by province, one number per province
- Map of Türkiye by province, one number per province
- Map of Bulgaria by province, one number per province
- Map of Denmark by province, one number per province
- Map of Belgium by province, one number per province
- Map of the Netherlands by province, one number per province
- Map of Spain by autonomous community, one number per autonomous community
- Map of Slovakia by municipality, one number per municipality
- All templates →