Quantcast
Channel: InterWorks
Viewing all articles
Browse latest Browse all 2698

140.6 Miles: How Two People Trained for Six Months to Complete the Boulder Ironman

$
0
0

Deciding to spend six months of your life training for an endurance event isn’t easy. Most people I talk to tell me that it’s crazy and some even tell me it’s impossible. What’s really at stake in endurance training, though? What do we gain? What do we lose?

Metrics and Tracking

People would often ask me about everything that went into training for an Ironman, such as: correlation of death verses joy thoughts (pretty high), how many times did I throw up (none, yay!) and metrics like speed, distance, time etc.

Unfortunately, I can’t give you a quantified number of times I was exhausted to the point of tears or so filled with joy that I was going to explode or felt like Wonder Woman. What I can share is how many runs, swims and rides both my training partner Dominic Perry and I did in preparation for the Boulder 2017 Ironman.

There’s a new saying amongst athletes, “Strava or it didn’t happen.” I could argue the days I left my phone and watch at home were some of the most joyful and freeing workouts. Still, per my analysis, the saying is true: if it didn’t happen according to Strava, you won’t see it here. So, while we’ve done our best to represent all the activities we did during our six-month training foray, there are a few technical pieces of which you should be aware:

  1. Not all activities are listed. Sometimes we forgot to use Strava, our watches were dead or we just wanted time with nothing between us and the open road.
  2. Most swims will not show on the map since they were almost all done indoors without GPS. Strava no longer exports city and state of activity, so indoor swims are not mapped.
  3. Calorie counts, unfortunately, aren’t listed here due to the Python library I’ve used, which currently has a bug pulling that data.
  4. We had a wonderful third member of our team, whom I had to remove from analysis due to data issues. At the end of the day, she was part of a wonderful team and we wouldn’t have had such a great time without her. Check out her Strava profile: Courtney Kiggins.

My goal in this post was to bring together several technologies and datasets I have been wanting to explore for quite a long time. I worked primarily with the Strava 3.0 API and Python library Stravalib to pull athletes activity data and Tableau to visualize the data.

Using the Strava API

The Strava API is quite extensive and you can pull almost any piece of data they track. The Stravalib allows one to use Python to pull from the API; however, you can find many other libraries for different languages here.

Pulling athlete information from the Strava API requires a user to create an application under their Strava Account. You can see mine below. Strava makes it very easy for users to create the authorization page:

Ironman Strava Viz Data

As you can see Above, there’s a hyperlink you can select and give to your end users. Since this wasn’t a long-term application for me, I kept it simple and just gave the link to the other athletes and had them paste the return URL to me, instead of formalizing the process.

The returned URL from an athlete looks like: https://www.interworks.com/?state=&code=12345abcde

The code can then be exchanged for a token:

Ironman Strava Viz Data

The code above returns the access token that we can then use in pulling athlete activity detail. I originally authorized three athletes. Anything more than that and you may want to formalize the collection of code and exchange for a token.

I took the same strategy in the code below - manually changing the token and running the header/detail for data:

Ironman Strava Viz Data

The code above was built mostly by Brian Bickell. I added and changed fields, added an export to a text file and added the ability to choose a different athlete. There were also some activities that had emojis in their names for which I had to change the encoding to UTF 8 for it to be brought in properly.

There are two different functions: One to pull the summary data of the activity and one to pull the detail of the activity. Due to the non-additive nature of the detailed data, I pulled the summary data for most pieces of information shown. The detailed data is almost exclusively used for mapping the routes of activities.

Pulling the Data into Tableau

In order to pull the data, I ran through each function for each athlete. The data was piped to two different text files: stravaheader.txt and stravadeatail.txt. I immediately pulled them both into Tableau.

https://www.interworks.com/about-us/people/brian-bickell#profile-public

Don’t forget to extract!

The header data is much wider and the detail data is much taller. So, I needed to do some calculations in the data.

Strava exports distance in meters and I needed to convert them to miles. This is pretty simple process. I just needed to divide by 1609.344. Same went for activity duration, which is returned in seconds, so we simply took the duration and divided by 60 twice. The more complex calculations came when creating the hex map. A great how-to guide can be found here.

The Tableau Dashboard Explained

The dashboard shows overall and official times for each of us, along with a bar chart representing the total Strava time in each activity. Transition times were removed.

Training for an Ironman is a lot about volume. As you get closer and closer to the race, your volume increases. Each bar in the viz shows the total time we spent in a week for an activity. You can see the week or two prior we significantly decrease our volume but increase our intensity. The final bar is the day of the Ironman!

Users can explore the data by selecting an activity in the bar, an athlete or a hex shape on the map. Times, dates, volume and results are all in one dashboard, and while there’s no cry per run metric, I hope you get a lot out of what we put into making a dream happen!


Viewing all articles
Browse latest Browse all 2698

Trending Articles