Skip to content

Archiving My Runs in Eleventy

tl;dr

I wanted a way to own my run data and display it on my website. I used fit-file-parser to convert all my fit files to separate json files so I could use them in my eleventy build.

I used to walk around a lot near Union Square and there was a beautiful fenced-in park there called Gramercy Park. It is so exclusive that you have to know someone with a key to get inside. I can't help but think of this highly-exclusive park any time a new web platform emerges and they want to house my data.

2019

I started running in August of 2019 with the idea that I needed to get fit. I loved my 30-year-old metabolism of being able to eat whatever I wanted, but that was in the distant past at this point. I started tracking my with Nike Run Club and absolutely fell in love with guided runs. A podcast with feedback that felt like it was personalized for the run I was onβ€”I needed that motivation!

2020

After tracking 186.4 miles in the NRC app in 2019, I started double-tracking in NRC and Strava. I had a few conversations with friends about the inaccuracies across apps and platforms, which made me want to start archiving my own data.

The Nike Run Club app was that walled garden of Gramercy Park. No public API, and no way to retrieve my own data, but probably used to serve me ads or sell me products in some way.

2021

Strava was fine for tracking and great for run analysis, but I started using the Intervals Pro app with my Apple Watch so I could, at the very least, export my data files from each of my runs and sync them to Strava.

2022

In May 2022, I ran the RBC Brooklyn Half Marathon. Since I finished under my 2-hour goal by less than 4 minutes, now I run for fun and pleasure!

2023

I started exporting all my fit files from Intervals Pro to a folder inside my website repository and at build time, using a node script to convert them all into separate json files. After they're converted and placed in my _data/runs folder, they're available to my eleventy layouts as global data. Because all the json files are in the same folder, they're available to my layouts as runs. (source)

I should note the node script (source) runs before my build, parses all the fit files into json, and creates an allRuns.json file in my global data folder. I use this to automatically update my now page on every build, as well as my run archive.

There's something incredibly empowering about owning and archiving a piece of yourself on the internet. This is the way.

2024

I've now updated the archive to include the beginning of 2024! I'll need to do some more tweaking to get the stats shown correctly per year but all the data is MINE!

Posted in: #javascript #running by @ https://danleatherman.com/running-data/

Webmentions

3 Likes

Eleventy 🎈 v2.0.1
depone
Cory Dransfeldt :prami:

2 Retweets

Eleventy 🎈 v2.0.1
Cory Dransfeldt :prami:

These are webmentions via the IndieWeb and webmention.io. Mention this post from your site:


More posts