Skip to content

vlanard/strava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SETUP

This script fetches your strava historical data and outputs to tab separated values. You can copy into excel, or redirect into a .tsv file and import to a spreadsheet.

This script does not pull segment data, map data, or gpx data.

Prerequisites

  • This script assumes the following are installed
    • python3.7
    • homebrew

One time setup

  • install pipenv if needed

      brew install pipenv
      pipenv shell
      pipenv install
    
  • if you don't have a Strava Client Application, Register for one here: https://www.strava.com/settings/api

    • Tips:
      • Application Name: (whatever you like)
      • Category: Data Importer
      • Website: http://notarealsite.com or your real url
      • Description: developer
      • Authorization Callback Domain: localhost:4000
  • create your client_secret.json file

      cp client_secret.json.sample client_secret.json
    
  • customize your client_secret.json file

To run

  • load environment and run

      pipenv shell
      python strava_pull.py
    
  • the first time you run this

    • the file credentials.json will be saved locally
    • a browser will open for the authentication flow
  • to customize:

    • edit the strava_pull.py script variables near the top

         is_celsius = False  # set to True for C, False for F
         is_metric = False  # set to True for metric, False for standard
         max_pages = None  # set to 1 for quick test or None to get all pages
      
    • comment out or reorder columns in COLUMNS_ORDERED list

  • to exit pipenv environment

      exit
    

Future Things To Do

  • lookup lat/long where city is missing
  • find a more performant way to gather ride detail, like calories
  • what else? drop me a line.

About

pull strava data to tab separated values

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages