Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 2.12 KB

README.md

File metadata and controls

46 lines (33 loc) · 2.12 KB

About

Marathonviz is my effort to communicate my experience of running marathon through an interactive data visualization.

marathonviz

Journey to marathonviz

Data

Connecting to Strava API

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.

Fetching the Strava data

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.

Processing the Strava data

In the preprocessing part, I have two main things:

  1. Decoded coordinates and estimated distance between them using Haversine library. (see the result)

  2. 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

Visualization

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.