Download strava activities and generate a map from them. View all your Strava activity data in one map, or just download and save your activity data to edit as you choose.
strava_map
can be installed via pip using:
pip install strava-map
or run directly from a cloned repo
git clone https://github.com/tcramm0nd/strava_map.git
from strava_map import Map. ActivityDB
# Fetches activities from Strava and stores them in an ActivityDataBase
activities = ActivityDB(fetch=True)
# Creates a Map Object
m = Map(activities)
m.create_heatmap()
On the initial run you will be prompted for your Client ID and Client Secret. This is to authorize the App to retrieve activity data from Strava. All Strava keys are stored locally in a .credntials.json
file.
You can find your Client ID and Client Secret by navigating to Settings > My API Application
. If you have not set up Strava for API applications, you can find directions on how to do so here.
Once the Strava Client has been authorized it will proceed to retrieve activity data, stored in ActivityDB.data
.
You can create a heatmap of all activiies by simply running
m.create_heatmap()
This will generate a map with different activity types coded as different colors.
m.save_(path='path/to/directory/', filename='my_strava_activities')