This code does the following:
- Connect to Strava API using StravaLib to export Activity and Activity Best Effort data
- Load the data into Google Sheets
After the data is loaded into Google Sheets, I visualize and analyze it using Tableau. The resulting workbook is published on my Tableau Public profile: https://public.tableau.com/app/profile/marsel.shamgunov
https://stravalib.readthedocs.io/en/latest/get-started/activities.html
Basic steps:
- Enable Google Sheets API on your Google Account that will have this Google Sheet
- Create a Service Account
- Export Service Account's json credential file
- Grant edit access to the Google Sheet to your Service Account's email address
- Replace variables in code to properly ingest the json credential file
Detailed guide: https://medium.com/mlearning-ai/how-to-access-google-sheets-on-google-colaboratory-8766b3a0996f
Basic steps:
- Create your Strava API application
- Get your Client ID
- Replace the Client ID in this URL, and open the URL: http://www.strava.com/oauth/authorize?client_id=108997&response_type=code&redirect_uri=http://localhost/exchange_token&approval_prompt=force&scope=profile:read_all,activity:read_all
- Using the URL above, approve the access request and hit OK
- Copy the CODE value from the resulting URL
Detailed guide: https://medium.com/analytics-vidhya/accessing-user-data-via-the-strava-api-using-stravalib-d5bee7fdde17