Skip to content

Separates and aggregates data for Rides and VirtualRides on Strava

Notifications You must be signed in to change notification settings

michaeljgallagher/strava_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Separate outdoor rides and indoor rides

Frustrated that Strava combines the data from your virtual rides with your real rides? Now you can separate the year-to-date totals for these activity types!

Installation and usage

Prerequisite

Afterwards

  • Clone this repository & install dependencies:
git clone https://github.com/michaeljgallagher/strava_data && cd strava_data
pip install -r requirements.txt
  • Update settings.py with your CLIENT_ID, CLIENT_SECRET, and REFRESH_TOKEN (obtained from authorization)
  • Run strava_data.py:
python strava_data.py

The distance can be displayed in kilometers rather than miles by adding -m or --metric as an argument:

python strava_data.py -m
# or
python strava_data.py --metric

The date range can be specified with -s and -e, formatted as YYYY-MM-DD:

# for 2019 activities
python strava_data.py -s 2019-01-01 -e 2019-31-12
# for activities since March 15, 2020
python strava_data.py --start 2020-03-15

Sample output

sample

Optional arguments

usage: strava_data.py [-h] [-m] [-s START] [-e END]

Separate and aggregate Rides and Virtual Rides from Strava

optional arguments:
  -h, --help            show this help message and exit
  -m, --metric          Display distance in kilometers rather than miles
  -s START, --start START
                        Specify start date (YYYY-MM-DD)
  -e END, --end END     Specify end date (YYYY-MM-DD)

TODO

  • Add ability to read -s and -e args as strings and convert to epoch
  • Make output cleaner
  • Add option to export data

About

Separates and aggregates data for Rides and VirtualRides on Strava

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages