Authenticate with Strava

Data Retrieval

Data Exploration

Now that that activity data is retrieved and stored as a .csv file, and as a pandas DataFrame (df), we can inspect the head of the df to get an idea of how the data looks:

Data Conversion

Often when working with raw data, some of the data types are not in a format that is convenient.

For example, most long distance runners prefer to work in miles and not kilometers. This means that a new kilometers column is needed, as well as pace data to be converted from min/km to min/mile.

Also, days of the week data could be useful, so a new day of the week column, and month of the year column can be created.

Finally, the data types sometimes need to be changed, in the example below we change a datetime column into a timedelta column.

Get Only Half Marathon Training Activities

Next, two dfs are needed, the actual race day data, and the training data excluding the race day data.

Graphing

Weekly Distance

Weekly Distance Plan

The bar chart above shows that the training consisted of an easy first week, followed by 4 weeks of 25 miles or above per week, peaking at around 31 miles a week. The training ends with an aggressive two week taper running at a distance of approximately 60 percent less than the proceeding 4 weeks average. A total of 139 miles was ran in the training period before the Half Marathon.

Days of the Week Analysis

The first half of the week (Mondays to Wednesdays) where lighter distance days, when compared to the later half (Thursdays to Sundays). There was no predefined plan for this, it just happened that after 4 days of longer runs, the proceeding 3 days where run at a lower distance. This variation could have helped with recovery between long runs. However, the shorter runs where ran faster, in order to build speed. And speed runs also need their rest days afterwards.

Pacing

The target race pace was 7:30 min / mile. Most of the training that occurred in the 6 week period before race day was done above race pace. Two exceptions come in the form of tempo runs, when the average pace for these two runs was better than target race pace. These are designed to be run at speed.

Running distance per session ranged from roughly 3 to 10 miles. The Half Marathon race distance (13.1 miles) was never run in training in the 6 weeks prior to race day. This was intentional. I have ran marathons before and many half marathons in training, so I knew I could cover the distance. I was training to run a personal best, to run faster than I had before.

To achieve this, I ran long distances above race pace and shorter distances at speed, significantly faster than race pace. This variable training type is designed to get the heart stronger, get the legs able to move faster, as well as having the cardiovascular engine to cover the half marathon race distance.

From the graph above, it can be seen that the race pace target was actually achieved on race day. The red data point represents the race day pace. Also, most runs in training are significantly slower than the actual race pace, except two tempo runs. This was the plan and it appeared to work well.

Heart Rate

Heart is a very valuable metric to observe when training for, and running, long distance races. Typically, the harder you run the more stress you put under the cardiovascular system. When running a long distance race, the trick is to keep your heart rate at a comfortably uncomfortable level, for me that is around 160 beats per minute (bpm). I kept my heart rate at about 160 bpm for the majority of the race, although likely towards the end it went over into the 170-180 bpm range, as for the last mile it is important to give it everything you have got left in the tank.

The heart rate data below is average only, so on tempo runs that rate would vary significantly. Usually on tempo runs I ran 4 miles, the first mile slow, the second fast, the third slow, and the final mile fast.

During the race, my heart rate was much more consistent, only spiking upwards towards the end of the race.

The graph below demonstrates that during training, my average heart rate spanned a big range, from around 130 bpm to 180 bpm depending on the type of run. This was intentional, to expose my cardiovascular system to a wide range of heart rates.