Skip to content
Logo Theodo

Create a custom world map with D3.js

Maxime Thoonsen2 min read

Theodo travelers worldmap

A new blog post on D3.js! Last time Jean-Rémi made this very nice article on the force layout. This time will we show you how we drew this worldmap of where the Theodoers have traveled.

We started from this techslides demo to have countries grouped by continent. We simplified the map a little bit to make it easier to handle. We then colorized our map with the Theodoers traveling history. Finally, we added the ability to zoom in and zoom out.

The architecture is very simple with three directories and four important files:

The other files are the D3.js core files and topojson.

If you want to reuse the map, just change the js/map.js file. We made severals steps to make it easier to understand.
We tried to fill it with useful comments so the best way to understand how it works is to have a look at the lightest version of the code. Then you can look at the more complete versions and make your own version.

If you have any questions, you can ping us on twitter: @jiherr and @maxthoon

Jean-Rémi and Maxime

Liked this article?