Python application for visualizing and finding the titles of a user's Strava activities on an interactive map. The project allows the user to authenticate with the Strava API, fetch their activities' data, and generate a map based on that data.
To install the required libraries:
pip install -r requirements.txt
Or run:
python3 setup.py
-
Create an application in the Strava Developer Portal.
-
Save your Client ID and Client Secret provided by Strava.
-
Replace the placeholders for Client ID and Client Secret in
strava_credentials.json. Alternatively, you can set these as environment variables asSTRAVA_CLIENT_IDandSTRAVA_CLIENT_SECRET.
To run the program:
python3 main.py
- Follow the link provided in the terminal to authorize the application.
- Once authorized,
strava_token.jsonwill store your access token for future use. - The program will then give you feedback on the retrieving of your activites. This might take a while depending on the amount of activities.
- Finally, the program should generate the map, in the form of an html file, and open it in your default browser.
strava_credentials.json: Stores your Strava API credentials. You need to configure this.strava_token.json: Stores the access and refresh tokens. This file will automatically be created after you have run the program.
This project requires Flask, folium, polyline, and requests.
These, with their correct versions, can be installed using:
pip install -r requirements.txt
Of course, you also need to create a Strava app.
Here is an example of a generated map:
