Running sparkline reloaded
A workaround to generate the sparkline of my runs, dropping the requirement of having a Strava API access
As noted a while back, I’ve been working on an alternative to make my running data available without the use of the Strava API.
Happy to say, it’s done!
My subscription revoked I’m no more a pro Strava Athlete. But my running blog still shows a sparkline, that stays up to date.
Here’s how that works, everything is AWS based:
- A JSON file describing an activity is uploaded into a S3 bucket.
- That triggers a lambda function that consolidates the current state of persisted activities. That persist is file-based, as well on S3.
- Each week, another lambda is invoked to consolidate the persisted state and keep only one year of activities.
- Every day, the script I’m using to update the blog runs and fetches the current state of activities from S3 instead of Strava. The rest of the process is just as before. Curious about that part? You’ll find some details on From my Strava activites into one sparkline and Style it, ship it.
That makes use of the 2 terraform recipes that I described recently on this blog. The terraform code I use is available on a GitHub repository for the curious one, although probably too specific to be worth of interest.
It’s less streamlined than before but not that much. Concretely, when I press stop on my watch I need to complete an 8-clicks flow on my smartphone to have my run ingested. I’m using S3 Files to upload the JSON file that the Suunto App provides. In comparison, earlier I just had to sync my watch with my phone. The sync with Strava happens in the background thanks to the Suunto integration of Strava and this made the activity then available via the api.
Talking about Suunto App, I had in mind at first to push the needle one step
further and have my own application integrated in there ecosystem. Of course! I
had no high hopes, but you know… keep on knocking, and it will be opened
to you
. So I knocked, and to my surprise I’ve got a reply! You’re
invited to join Suunto API Zone
they said. The thing is, when using the
one link they provided to complete the application onboarding, I ended up
nowhere. Broken link. My next attempt at reaching out to them did not find any
answer so I left that idea on the side and moved on to work out the pipeline
described here.