How to create a custom basemap with different borders or multiple layers

In this tutorial, you'll learn how to create a choropleth or symbol map with differently styled borders. You can do this by putting together your TopoJSON file with multiple layers using mapshaper.org and uploading it as a custom base map

This is a feature that can be used to display disputed borders, as well as additional inner or outer borders that help with the contextualization of more fine-grain administrative regions. To display additional layers in your map, choose which layer should be shown as what layer type. You will have the option to select the following layer.

Name Appearance & Function
Regions This layer will be used to map your data if you're creating a choropleth map. These borders will have the standard line width*.
Outer borders Thicker* than the region borders for when you want to display additional higher-level borders to provide context.
Inner borders Thinner* than the region borders. For when you want to show the subdivisions of the region you're mapping.
Disputed borders Dashed*, ideal for when you need to indicate a disputed border.
Background Gray background, shown behind the map as an outline

*The styles of the borders are customizable for those on Custom plan as part of the custom design theme template. Reach out to support@datawrapper.de for any questions regarding style customization. 

In the above map above, you can see that the data is shown by filling the  Regions (NUTS2 level regional borders) with colors. The thicker Outer borders (country borders) can be distinguished from the thinner Inner borders (NUTS2 level regional borders). Because the NUTS regions don't extend to some countries like Belarus and Ukraine, they are shown as a light-colored Background.

How to create a map with different borders

To create a map like the above, you'll need to create your own custom map. Since we want 2 types of borders and background, we'll need to put together a TopoJSON file with three layers:NUTS2, country-bordersand background

Step 1: Create a single TopoJSON file with multiple layers

There are many ways to do this, but one way to do this is by using Mapshaper. Go to mapshaper.org and drag & drop three separate shapefiles as three separate layers. 

To make sure your map uses WGS-84, open the console in Mapshaper (either by clicking on "Console" in the top right corner or pressing your spacebar). Then type proj wgs84 in the console and press Enter

Then click on the Export button at the top-right corner, select all layers and export it as TopoJSON.

Step 2: Upload the TopoJSON in Datawrapper

Go to Step 1: Select your map and upload the custom TopoJSON file you've just created. Then, click on Additional options (advanced) 

Here, you can assign the different layers in the map to a different border. 

That's it!