Learn how to create a

map of Spain.

Visualize geographical data of Spain's 52 provinces with Datawrapper's new zoomable and crisp maps.

What You'll Learn


1.

Formatting the data

How does the data need to be formatted to be correctly recognized by Datawrapper?

2.

Creating the map

How to create the map with Datawrapper?

3.

Making it your own

How to customize the map with additional data, highlighting and your own tooltips.

Formatting the data

Creating a map works similar to creating a regular chart inside Datawrapper. Your dataset has to include a column with the Province Code in order for the map to render. This is a valid example dataset:

[["Province-Code","Province","Value"],["01","Araba","20"],["02","Albacete","94"],["03","Alacant","58"],["04","Almera","19"],["05","vila","8"],["06","Badajoz","88"],["07","Illes Balears","2"],["08","Barcelona","88"],["09","Burgos","34"],["10","Cceres","84"],["11","Cdiz","34"],["12","Castell","10"],["13","Ciudad Real","47"],["14","Crdoba","61"],["15","A Corua","3"],["16","Cuenca","79"],["17","Girona","11"],["18","Granada","40"],["19","Guadalajara","38"],["20","Gipuzcoa","66"],["21","Huelva","58"],["22","Huesca","54"],["23","Jan","34"],["24","Len","93"],["25","Lleida","60"],["26","La Rioja","60"],["27","Lugo","77"],["28","Madrid","84"],["29","Mlaga","56"],["30","Murcia","11"],["31","Navarra","33"],["32","Ourense","57"],["33","Asturias","9"],["34","Palencia","67"],["35","Las Palmas","11"],["36","Pontevedra","9"],["37","Salamanca","62"],["38","Santa Cruz de Tenerife","93"],["39","Cantabria","99"],["40","Segovia","57"],["41","Sevilla","31"],["42","Soria","35"],["43","Tarragona","66"],["44","Teruel","14"],["45","Toledo","43"],["46","Valncia","82"],["47","Valladolid","17"],["48","Bizkaia","7"],["49","Zamora","11"],["50","Zaragoza","98"],["51","Ceuta","26"],["52","Melilla","71"]]

You can copy & paste that dataset into Datawrapper. In step 2 ("Check & Describe"), you have to make sure the Province Code column is registered as Text, not as a Number column.


Creating the map

In step 3 ("Visualize"), select Choropleth Map as the chart type.

In the Refine tab, select "Spain >> Provinces" as the Basemap.

Also, make sure the Geo ID selector is set to the column that contains the Province Code, and the ID type is set to "Code".

In addition, you can customize the color palette to your desired styling, if you want to.



A glimpse at the map

Once the settings are correct, refresh the page to check out your newly created map:


Making it your own

You can customize the map further, for example by enabling your own, custom tooltip. Datawrapper can automatically show rich-text-tooltips when your viewers hover over your map.

Click on Customize Tooltips in the Refine tab to get started.


Datawrapper will show you an edit field where you can configure the tooltip. This allows you to enter your own text and combine it with the data of the individual cells for the specific region. For example, if you visualize "Unemployment Rate per Province", you could create a tooltip like this:

Now, you will see this tooltip when hovering over your map:


Other Interesting Tutorials

How to create a Stacked Column Chart

Learn how to create a stacked column chart in minutes with Datawrapper.

View Guide

All-new line charts

Datawrapper has completely revamped line charts: More responsive, cleaner and with annotations.

View Guide