Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 1.85 KB

README.md

File metadata and controls

69 lines (48 loc) · 1.85 KB

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