Runs in Iowa City
Running and Biking in Chicago
If you use runkeeper and pay for a yearly subscription (runkeeper elite), you can export your data and plot all of your activities simultaneously using R. I’ve written a script for doing so (Special thanks to flowing data which has a tutorial that helped with a few key parts of this).
The script does a few unique things.
- Runkeeper exports data in gpx format. If you ever pause an activity within runkeeper or you lose GPS reception briefly, the GPS path will get split into multiple paths within the same file. The script will retain all paths and plot them separately.
- This script will merge in the type of activities so you can plot different types of activities by color.
- Finally, cluster analysis is used to segregate different locations when plotting. If you are like me and have moved around a bit – this is necessary as plotting distant locations on the same map (e.g. Chicago and Boston) is not feasible and results in distant locations being plotted as single points.
- Export your runkeeper data. The option is available for subscribers only under the settings menu.
Exporting can be done from within the settings menu
- Place the script below within a folder containing your runkeeper data. Set the
num_locations variable to the number of places you have lived/run. This will be used to pull out the number of distinct running locations automatically.</p>
- Install the necessary R packages. You can run the following code within R to do so.
<pre>install.packages("fpc") install.packages("plyr") install.packages("dplyr") install.packages("mapproj")</pre>
- Run the script below from within R Studio or on unix based machines using
RScript plot_runkeeper.R. If you are using Rstudio, be sure to set the working directory using