if (FALSE) {
# get activity data
stoken <- httr::config(token = strava_oauth(app_name, app_client_id, app_secret, cache = TRUE))
my_acts <- get_activity_list(stoken)
# get the latest activity
acts_data <- compile_activities(my_acts)[1, ]
# get lat, lon
polyline <- acts_data$map.summary_polyline
latlon <- get_latlon(polyline, key = mykey)
# get distance
get_dists(latlon$lon, latlon$lat)
}
Run the code above in your browser using DataLab