How to create maps using GPX files

In this article, you'll learn how to use GPX files (and other spatial files) of your favorite bike routes and hiking trails from apps like Komoot or Strava, to create beautiful maps in Datawrapper. 

By the end of this article, you'll be able to easily create a map like below in a few minutes! (hover over the map and click on "edit this chart" to play around with it yourself! ) 


We'll be using Datawrapper  locator maps, so if you're not familiar with this map type, head on over to this article " How to create a locator map" to learn more. You can also click here to create one yourself while following along this tutorial. 

1
Download the route's GPS data as GPX file: 
Most routing apps offer options to download your route as a GPX file. If there are no options for GPX, you can also export the data as TCXKML or other spatial files that are available. 

👉 Once you have your files, you can upload them directly to Datawrapper! Just open your locator map, and upload the file by dragging and dropping it onto your map, or by clicking the cloud upload button in the Add your markers step. If you'd like more details, you can find a full breakdown of uploading data in this article


2
If you'd like to, you can convert your GPX file into a GeoJSON file:
There are multiple tools to do this. In this example, we'll use geojson.io which is a free online tool to edit map data. Upload the GPX file into geojson.io and click on Save GeoJSON: 

You can also use QGIS to convert spatial files into GeoJSON or Ogre, a web client for ogr2ogr command line tool, which supports many file format transformations. 

* If the GeoJSON file is too detailed, the route might not render nicely on the map. If that's the case, we recommend simplifying it in mapshaper before exporting. You can do this either by by typing in  -clean  and -simplify 5% keep-shapein the console or following steps mentioned in this article

3
Upload the GeoJSON file into Datawrapper locator map: 
Go to Step 1 in Datawrapper and either drag and drop your map files into the map area, or click the Upload button from the Add markers menu at the top: 

4
Customize your map and add annotations 
The great thing about Datawrapper locator map is that you can customize color and lines for each section of the routes easily. You can even insert markers, tooltips and images to add more descriptive details. 
That's it! To learn more about customizing your locator map, head over to our academy articles here. You can also see some example maps in our " Examples of locator maps". 

We also wrote some blog posts on maps with routes: