strava_py
Create artistic visualisations with your exercise data (Python version).
This is a port of the R strava package to Python.
Examples
Facets
A plot of activities as small multiples. The concept behind this plot was originally inspired by Sisu.
How to use
Bulk export from Strava
The process for downloading data is described on the Strava website here: [https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export], but in essence, do the following:
- Log in to Strava
- Select “Settings” from the main drop-down menu at top right of the screen
- Select “My Account” from the navigation menu to the left of the screen.
- Under the “Download or Delete Your Account” heading, click the “Get Started” button.
- Under the “Download Request”, heading, click the “Request Your Archive” button. Don’t click anything else on that page, i.e. particularly not the “Request Account Deletion” button.
- Wait for an email to be sent
- Click the link in email to download zipped folder containing activities
- Unzip files
Process the data
The main function for importing and processing activity files expects a path to a directory of unzipped GPX and / or FIT files. If required, the fit2gpx package provides useful tools for pre-processing bulk files exported from Strava, e.g. unzipping activity files (see Use Case 3: Strava Bulk Export Tools).
df = process_data(<path to folder with GPX and / or FIT files>)
Plot activities as small multiples
plot_facets(df, output_file = 'plot.png')