Marathonviz is my effort to communicate my experience of running marathon through an interactive data visualization.
I decided to use Strava's API to get my detailed data about the marathon race. I could alternatively ask Strava to give me all my personal data, but the problem is that they only give you summaries of your activities and not details like pace per km. In a cube, connecting to Strava API is fairly straightforward and it does not introduce any further limitations.
I followed this tutorial to obtain REFRESH_TOKEN
, CLIENT_SECRET
and CLIENT_ID
which I then saved into the config file.
To obtain the data, I created a simple pipeline which can be called through CLI
:
cd src
python cli.py -FT
For details, check the pipeline file.
In the preprocessing part, I have two main things:
-
Decoded coordinates and estimated distance between them using
Haversine
library. (see the result) -
For each km, I estimated its coordinates and then added this to the each km detail. (see the result)
These two tasks were embedded into a simple pipeline which can be called through CLI
:
cd src
python cli.py -PRE
I explain my main visualization choices in the presentation (See comments for each slide) as well as in the report. To make things happen, I used plotly and dash. I deployed the Dash web app
using digital ocean - see this turorial for detail.