Learn how to create a map of

the Swiss Cantons.

Learn how to create a crisp, zoomable map of Switzerland in minutes with Datawrapper.

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. First, click here to create your chart. Your dataset has to include a column with the 2-Letter-ISO-Code of the cantons in order for the map to render. This is a valid example dataset:

[["ISO","Name","Wert"],["AG","Aargau","94"],["AR","Appenzell Ausserrhoden","44"],["AI","Appenzell Innerrhoden","99"],["BL","Basel-Landschaft","18"],["BS","Basel-Stadt","3"],["BE","Bern","24"],["FR","Fribourg","0"],["GE","Genève","98"],["GL","Glarus","39"],["GR","Graubünden","94"],["JU","Jura","61"],["LU","Lucerne","64"],["NE","Neuchâtel","77"],["NW","Nidwalden","57"],["OW","Obwalden","81"],["SG","Sankt Gallen","47"],["SH","Schaffhausen","44"],["SZ","Schwyz","32"],["SO","Solothurn","96"],["TG","Thurgau","91"],["TI","Ticino","42"],["UR","Uri","57"],["VS","Valais","17"],["VD","Vaud","70"],["ZH","Zürich","39"],["ZG","Zug","18"]]

You can copy & paste that dataset into Datawrapper to get started.

 

Creating the map

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

In the Refine tab, select "Switzerland > Cantons" as the Basemap.

Also, make sure Region Key is set to the column in your dataset that contains the ISO-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 tooltips. 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, you could create a tooltip like this:

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


Bonus: How to publish

Embedding charts into your website is super easy. If you use Datawrapper for free, you can download the chart as a ZIP file and host it on your own website yourself.

When you upgraded your account, you see a range of publishing options for your chart:

You can download the chart as a static image, but the best way to use a Datawrapper chart is by embedding it directly into your website. To do so, click on Export for embedding. Datawrapper automatically generates an iFrame-embed code that you can copy & paste directly into your CMS.

Copy the embed code into your website and you're done!

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