Skip to content

Simple data extract from the Strava API to generate some data points I'm interested in

License

Notifications You must be signed in to change notification settings

c-wilkinson/StravaDataAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StravaDataAnalysis

This repository extracts data from the Strava API, stores it locally (encrypted), and generates visualizations.

If other people start using this, I'll try and streamline this process as much as I can.

License: Unlicense CodeFactor Codacy Badge CodeTest GenerateStats CodeQL

Generated Content

📅 Stats last updated on: 2025-05-21 04:19:20

🏃‍♂️ Most recent run: 0 years, 0 months, 1 days, 8 hours and 49 minutes

A.I. Recommended Training

Activity Heatmap

Cadence Over Time

Cumulative Distance

Elevation Gain Distribution

Elevation Gain Per Km By Month

Fastest 1K Pace Over Time

Forecast Weekly Pace

Longest Run Per Month

Median 1K Pace Over Time

Monthly Distance By Year

Number Of Runs Per Distance

Pace Consistency By Run

Pace Distribution

Pace By Day

Rest Days Heatmap

Rolling 30 Day Comparison

Run Days Heatmap

Run Distance Distribution

Run Rest Ratio Heatmap

Run Start Time By Month

Run Type Clusters

Run Type Distribution By Year

Running Pace Over Time

Running Pace Vs Elevation Change

Running Pace Vs Total Distance

Time Taken Distance

Total Distance Ran By Month

Training Intensity By Heartrate Zone

Training Load Over Time

Vo2 Proxy Over Time

Instructions

As I'm sure is obvious, I'm teaching myself python as I go so the code quality is not likely to be great. Do with it as you wish.

  1. To use, create an Application on Strava. This can be done here: https://www.strava.com/settings/api

Give it a name, a website and an 'Authorization Callback Domain'. The 'Authorization Callback Domain' should be 'local host'.

  1. Copy and paste the following link into your browser, replacing {CLIENTIDHERE} with your numeric Client ID found on your Strava application settings page.

http://www.strava.com/oauth/authorize?client_id={CLIENTIDHERE}&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=profile:read_all,activity:read_all

Click authorise when you visit the above link

  1. You will go to a 404 not found page with a link that looks like this: -

http://localhost/exchange_token?state=&code={LONGCODEHERE}&scope=read,activity:read_all,profile:read_all

Copy the code after '&code=' to save for step 4. You will also need your client ID and client secret found on your Strava application settings page.

  1. Run 'get_tokens.py'. This will create the initial tokens required for the script.

Once this has been completed, you can run 'main.py' which uses the tokens to get the data points. If the access_token has expired, it will refresh its tokens automatically during run time.

About

Simple data extract from the Strava API to generate some data points I'm interested in

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages