R bloggers

Where do you run to? Map your Strava activities on static and Leaflet maps.

FavoriteLoadingAdd to favorites

So, Strava’s heatmap made quite a stir the last few weeks. I decided to give it a try myself. I wanted to create some kind of “personal heatmap” of my runs, using Strava’s API. Also, combining the data with Leaflet maps allows us to make use of the beautiful map tiles supported by Leaflet and to zoom and move the maps around – with the runs on it, of course. So, let’s get started. First, you will need an access token for Strava’s API. I found all the necessary information for this in this helpful “Getting started” post. As soon as you have the token, you have access to your own data. Now, let’s load some packages and define functions for getting and handling the data. For the get.activities() function, I adapted code from here. library(httr)library(rjson)library(OpenStreetMap)library(leaflet)library(scales)library(dplyr)token <- “”get.coord.df.from.stream <- function…
Original Post: Where do you run to? Map your Strava activities on static and Leaflet maps.