How to create your first choropleth map
This is a very detailed tutorial on how to create and play around with your very first choropleth map in Datawrapper.
In this academy article, you will learn how to build a choropleth map to show unemployment data by the International Monetary Fund (IMF) in European countries. This is what it will look like:
Through the process, you'll learn about:
- choropleth map settings
- how to best use colors for highlighting differences
You'll also touch on:
- how to navigate the IMF Data Portal
- How maps are great for showing patterns
- how to show multiple values in tooltips
- how to write a chart title
- how to share & embed settings after publishing
How to get the data
In this section, you'll learn how to get the data from the IMF Data Portal. If you want to skip this part and go straight to learning how to create a map, we've also prepared a Google Sheet with the data for you. In this case, go to this Google Sheet, copy the data, and head on over to the next section "How to create a choropleth map".
First, you have to prepare the data. Go to the World Economic Outlook Database in the IMF database. You'll find a box that says "Download WEO Data: October 2019 Edition". Click on the link that says "By Countries (country-level data":
You want to create a map of European countries, but this IMF database doesn’t have a selection of European countries, just of the “Euro area” and “Emerging and developing Europe”. To get all European countries, the easiest way in this IMF source is to select “All countries”:
You can import the data for all countries to Datawrapper, but countries that don’t belong to Europe won’t be visible in the final map. That’s because we’ll choose a map that just displays the European countries and gets rid of the data points of countries that don’t belong to Europe.
Here you see the countries you've chosen. Click on “Continue”:
You will get a long list of possible variables you can choose from. Scroll down until you find the “Unemployment rate”, then click on the checkbox. Finally, scroll up again to click “Continue”:
Now, you can select the Date Range.
- set the start and end year as desired (e.g. 2000 to 2017). You’ll see in the final table that values for the present year and the future is estimated.
- uncheck “Append Country/Series-specific Notes”
- check “ISO Alpha-3 Code”
- uncheck “Subject Descriptor”
Click “Prepare Report” to finally get to your data.
It should load immediately:
Hurray, here’s your data!
Select the data from the header to the end.
Make sure that you selected all the text and numbers inside the table, but nothing outside of the table.
Now copy the data, either with clicking Cmd+C (or Ctrl + C), or with right-click > “Copy”:
How to create a choropleth map
Now that we got our data, let’s create a map! You will create a Choropleth map with this data. Each country will be filled with one color that will encode one underlying value, for example, the latest unemployment rate in this country.
First, Datawrapper asks you which administrative boundaries you want to show your data in. You can choose from all the countries around the world but let's focus on countries in Europe for now. Search for “Europe” in the list of available maps. When you select Europe, you’ll see the outlines of European countries on the right:
Once you see the Europe map on the right, click on the “Next” button:
In the second step, Datawrapper asks you to upload numbers.
Here you could type in the numbers you have and they would show up in the map immediately. But that’s a lot of work!
That’s why you can click on “Import your dataset” below the table. If you don’t see it, scroll down and click on “Import your dataset”:
Now, a popup window opens. Click on “Start import”:
You will see a table with two columns. Here you can paste the data you copied earlier.
You have more than two columns, but that’s ok; this table will adjust to whatever data you paste in.
To paste, click in the first cell in the first row and the first column and then press Cmd+V (Ctrl + V).
Or right-click and then select “Paste”, then click "Next":
Now we’re almost ready to see your data on the map! The last step is to select which column you want to visualize on the map.
Don’t worry, you can still change this later. Click on “Okay, continue”:
Then select any column with numbers, like the last column, or any other one. Again, you can still change this later.
Click “Next” below the table to finish the upload step:
In step 3, you now see the map you chose in step 1 filled with the data you imported in step 2.
To make sure it shows the unemployment rate of the right year, click on “Select column”, then the year you want to show:
To make sure your map shows different colors for different values, click on “Stops” and then on “min/max” or on “quartiles”.
Experiment with the Stops. You will notice that the visual difference between the countries is very high when you choose “quintiles” or “deciles”, and not so high when you choose “min/max”.
You can also choose another color gradient on the left. Play around with the color palette tool, maybe choose another column and other Stops, until you’re happy with your result.
To help readers make sense of the underlying numbers, you should implement tooltips.
They will show up when the readers hover their cursor over one of the countries, or when they click on it on their mobile phones and tablets.
To create tooltips, let’s click on “Customize tooltips”:
Again, a popup window will open, in which you can define the title and content of your tooltip.
On the top right, you can see all the columns you uploaded.
You can click on the names of the columns to insert them directly in the Title or Body. If you do, you’ll see curly brackets around the name of the column. This will tell Datawrapper to show the actual name of a country (e.g. “Germany” or “France”) when you hover over it, and not the word “country”:
You can also add text and links to the tooltips.
And HTML tags are allowed, so you can make text strong when you write the HTML tags <strong></strong> or <b></b> around them, and even create HTML tables within the tooltips. To read more, visit another academy article "How to create tooltips".
When you’re done, you can click “Save” at the bottom of the tooltip editor:
Now you have working tooltips! Try to hover over countries. This is what they should look like.
You can explore the rest of the options on this page. For example, try turning off the map zooming-in option, or change the map key and add a map key title. If you want to add line breaks in the map key title, use the HTML tag <br>.
If you’re done, go to the tab “Annotate” and give your map a proper title. Note that it is a good idea to choose a title that explains in words what your readers can see visually in the chart.
Don’t forget the source and the byline, so that everyone knows which great data designer has designed this map!
Once you’re happy with how your map looks like, you can go to step 4: “Publish & Embed” with a click on the last arrow.
There, click on “Publish chart”.
It will take a second or two, and then you see some “Share & Embed” options.
You can copy the embed code to use the map in an article of yours, or you can share the URL on social media or in emails:
Try clicking on the URL to see what it looks like:
Try to hover over the data, and you will notice that the chart is interactive and has tooltips you've designed!
And that’s it! Congratulations on creating your first Datawrapper choropleth map, and thank you so much for following this tutorial.
Do you have questions about options in a specific chart type? Click on the categories to the left of this Academy article to find out more about pie charts, bar charts, dot plots, etc.