https://github.com/syre/strava-stats
Strava Stats is a simple Python app for providing insights into your Strava riding metrics.
https://github.com/syre/strava-stats
data-visualization metrics plotly-dash python strava tailwindcss
Last synced: 5 months ago
JSON representation
Strava Stats is a simple Python app for providing insights into your Strava riding metrics.
- Host: GitHub
- URL: https://github.com/syre/strava-stats
- Owner: syre
- Created: 2025-07-08T16:13:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-09-20T10:17:51.000Z (9 months ago)
- Last Synced: 2025-09-20T12:23:26.023Z (9 months ago)
- Topics: data-visualization, metrics, plotly-dash, python, strava, tailwindcss
- Language: Python
- Homepage:
- Size: 129 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Strava Stats
*If you didn't record a ride on Strava, did it even take place?* 🤪
Strava Stats is a simple Python app using the Strava API and Plotly Dash to show a dashboard of your yearly and current Strava Activities providing insights into your riding metrics.
## Requirements
A .env file with the following variables:
- `STRAVA_CLIENT_ID`
- `STRAVA_CLIENT_SECRET`
- `STRAVA_REFRESH_TOKEN`
Fetch the `STRAVA_CLIENT_ID` and `STRAVA_CLIENT_SECRET` from https://www.strava.com/settings/api
THE `STRAVA_REFRESH_TOKEN` can be obtained by running the following in a browser:
```
https://www.strava.com/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=activity:read_all
```
Afterwards copy the "code" parameter from the URL and use it in the curl command below to get the refresh token.
```
curl -X POST \
https://www.strava.com/oauth/token \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET \
-d code=YOUR_CODE \
-d grant_type=authorization_code
```
Replace `YOUR_CLIENT_ID`, `YOUR_CLIENT_SECRET`, and `YOUR_CODE` with your actual values.
## TODO
- ~Implement a filter toggling different sports~ Sike this is only for bikes
- Use a real relational database to store and analyze data
- Add tests
- Containerize it
- More visualizations