Launch, grow, and unlock your career in data

March 3, 2018

Creating Runkeeper Tile Maps with Alteryx & Tableau

No comments
A couple weeks ago, I demoed how to create tile maps of Runkeeper runs using Alteryx and Tableau. You can watch the recording here; I was the final speaker if you need to fast forward.

In this post, I'll detail how I created the tile maps and share the workflow and visualizations. The inspiration for this project comes from Marcus Volz and his great github tutorial on how to create small multiple visualizations of your Strava runs, which I wrote about here. This was the viz that I created based on his R code:
When I visited The Information Lab France in January, we decided that we would try to replicate Marcus' process with Alteryx and Tableau because we wanted it to be an interactive visualisation, whereas Marcus' creates a static image. This process should work for Runkeeper, Strava or any fitness app that uses GPX files.

To get all of your routes from Runkeeper:

  1. Login to Runkeeper
  2. Go to "Account Settings" from the gear at top right of the screen
  3. Choose the Export Data option on the left
  4. Select the date range
  5. Click on Export Data
  6. Unzip the files

To get all of your routes from Strava:

  1. Login to Strava
  2. Select "Settings" from the main drop-down menu at top right of the screen
  3. Select "Download all your activities" from lower right of screen
  4. Wait for an email to be sent
  5. Click the link in email to download zipped folder containing activities
  6. Unzip the files

I actually don't follow either of these methods. I pay a small yearly fee for a service called Tapiriik that allows you to sync your fitness data with Dropbox.


    Since all of my files are in one place, this makes getting them all into Alteryx with a single input easy using a wildcard input. I've documented my workflow and you can download it here.


    1. Input all of the files using a wildcard match for 2018 runs only.
    2. Assign a unique number to every row. In these files there's a GPS reading every second. Having a unique number makes creating the routes easier because you know the sequence.
    3. The next few steps are the magic part. These essentially give every route the same size as a square. We need them all to be the same size regardless of the actual geographical area covered.
    4. Create points for each GPS points and connect them to create a polyline. Do this for both the route itself and the boundary
    5. Calculate some summary stats for each run.
    6. Bring them all back together.
    7. Export as a SHP file.


    Once the shapefile is done, all you need to do is connect to it in Tableau. I created two visualizations. Click on the images for the interactive versions and to download the workbook.

    1. Small Multiples 

    Like Marcus' viz, I created a view that spaces the runs based on the number of runs in the view. For example, in February, I recorded 22 runs, so I get a view with 5 rows and 5 columns. Each square has a route from the first run on the upper left to the most recent run in a Z pattern. There are additional details about each individual runs available on hover.

    This view uses table calculations to determine the spacing.

    2. Calendar View

    The calendar is much simpler to create since it doesn't need any table calcs.

    1. Double click the Geometry field to get a map
    2. Filter to a single month
    3. Place Weekday on the Columns
    4. Week on the Rows
    5. Add information for tooltips
    6. Add total monthly mileage to the caption
    7. Resize the rows and columns to fit the window


    I'm nowhere near an expert in Alteryx. I know I can improve if I practice more. Here are five lessons learned I learned that I will be taking forward:
    1. Leverage the strength of your team to help you solve a problem and to help you learn.
    2. Alteryx makes creating and working with spatial objects incredibly simple.
    3. Prepping the data exactly as you need it in Tableau will make the visualization process much faster.
    4. Data prep processes in R and Python make for great data prep exercises in Alteryx.
    5. Fail fast and iterate quickly. Both Alteryx and Tableau allow you to try lots of things quickly without fear of breaking anything. Try something. If it doesn't work, try something else. Keep going until you've nailed it.

    No comments

    Post a Comment