Skip to content

OGladfelter/strava_heatmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

strava_heatmap

Let users connect to the Strava API in order to populate their own personal, customizable activity heatmap

Strava users can see it in action here. Non-Strava users can see a video demonstration here.

  • PHP

    • oauth.php: allows for initial token exchange with Strava API
    • reoauth.php: used to refresh an expired token
    • geocode.php: used to reverse_geocode the latitude and longitude coordinates received from Strava for the purpose of providing user with a list of neighborhoods they commonly start activities in
  • JavaScript

    • BigImage.js: powers the screenshot function (original credit to pasichnykvasyl)
    • strava_api.js: checks for presence of authorization or refresh token; calls oauth.php and reoauth.php; calls activities endpoint
    • script.js: contains drawHeatmap() function, which handles all Leaflet and most front end code
    • ui.js: event listeners for user-activated functions; adds JQuery sliders; contains reverse_geocode function

strava_heatmap_no_API

A near-copy of /heatmap, but runs on a local data source, rather than the Strava API itself, for development and testing purposes.

Note: current only up to August 2021, as the newer 'demo' and 'manual file upload' modes added to /heatmap provide more or less obsolete this no-API version.

  • PHP

    • geocode.php: used to reverse_geocode the latitude and longitude coordinates received from Strava for the purpose of providing user with a list of neighborhoods they commonly start activities in
  • JavaScript

    • BigImage.js: powers the screenshot function (original credit to pasichnykvasyl)
    • script.js: reads data; handles all Leaflet and most front end code
    • ui.js: event listeners for user-activated functions; adds JQuery sliders; contains reverse_geocode function
  • Data

About

Code for a Strava connected personal heatmap generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published