# NOT RUN {
# get my activities
stoken <- httr::config(token = strava_oauth(app_name, app_client_id, app_secret, cache = TRUE))
my_acts <- get_activity_list(stoken)
# register Google maps API key
library(ggmap)
register_google('xxxxxxxxxxx') # enter your key here
# default
get_heat_map(my_acts, acts = 1, alpha = 1)
# plot elevation on locations, requires key
mykey <- 'Get Google API key'
get_heat_map(my_acts, acts = 1, alpha = 1, key = mykey, add_elev = TRUE, col = 'Spectral', size = 2)
# compile first, change units
my_acts <- compile_activities(my_acts, acts = 156, units = 'imperial')
get_heat_map(my_acts, key = mykey, alpha = 1, add_elev = T, col = 'Spectral', size = 2,
maptype = 'satellite')
# }
Run the code above in your browser using DataLab