Export Strava data to Google Sheets using Google Apps Script
This Google Apps Script (GAS) project creates a data repo for your personal activity data on Strava in a Google Sheet. When up and running, it polls Strava via its activity API and copies a subset of the data as rows in a spreadsheet. I use this code to export some of my Strava data to visualize it in @stvkas/strava-gas-powered-vis">Observable notebooks.
Replicating this data repo with your own Strava data currently requires you to create your own application with this code. See the Initial Setup walkthrough in the wiki for details.
Each of these files is concatenated into Code.gs
for easy replication. I’ve excluded tests for this code in tests.gs
from this production code.
Activity_.gs
: A class for representing Strava activities in tabular form.Date.gs
: Additional methods for JavaScripts Date
objectMain.gs
: High-level routines to executeStrava.gs
: A high-level library for interacting with Strava’s API