Where People Run: Redux

I recently came across this article that provided some beautiful visualizations showing where people run using RunKeeper data.

At the end of the article a link is provided to an R script so you can plot your own runs.  Awesome!  Except… some things were a bit off.

After downloading my RunKeeper data from here I ran the script.  I was presented with a PDF containing a bunch of lines and no map.

RunKeeperScriptFromFlowingData

That’s not entirely useful, so I modified the script to download a map automatically and plot the routes on the map.

The other issue that I found was that only the first segment of your run was imported using the script, so if you routinely pause RunKeeper during your run (or have it do that automatically when you come to a stop) then you will have issues.  So I’ve also modified the script to read all segments from each run instead of just the first.

Here’s the final result, where you’ll notice a nice map and many more tracks present.

RunKeeperScriptAfter

The script is provided for you here.  Just make sure you modify the LEFT, BOTTOM, RIGHT, and TOP variables to bound your area of interest.

map-routes