How the Training Today app was built

Sometimes life takes you by surprise

hot-cappuccino-with-white-cup-on-wood-table-coffee-house_rD47NlO3zx.jpg

For example, the other day I made a caramel latte for my daughter, who, by the way, is delighted to be studying for her ‘A’ level exams at home rather than at school. She hugged it in her hands and looked lovingly content as she took a sip. Then she turned to me and her face changed:

“I can’t draw the side of a face - where is the eye supposed to go?!”, she exclaimed.

It took me back a bit and I didn’t really have an answer, but we both laughed and got on with our day without mentioning it again. Such is the quarantine life.

And somedays I really don’t feel like going out for a run when I wake up, but then when I get out on the road, somehow I feel great and am really pleased with the performance. Or the opposite.

The point is that your mind can tell you things that your body doesn’t necessarily agree with (like trying to take a soccer penalty when you’re dizzy), and that is why it is helpful to have some way of understanding what your condition actually is.

Enter Heart Rate Variability (HRV)

There has been a lot written about HRV and sport. I have even attended a conference dedicated solely to the topic - The FirstBeat HRV Summit which is a yearly event.

But you can summarise the value of HRV to an athlete at a very high level by saying that the higher the variance between your heartbeats, the stronger you are to train on that day.

Apple Watch automatically measures your HRV periodically throughout the day and night whenever you are having a moment of peace (or every 2hrs through the night). That means that just by wearing your watch as much as you can, you can get this metric for free.

Or if you want to force a reading at any time just use the Apple Breathe app for a minute and you will get a new one. This can be useful to do sometime after a training session when you are recovering.

You can view your HRV in the Health app on iPhone

You can see your HRV data by opening the Health app on iPhone and searching for HRV. You will get your current value and a daily, weekly, monthly and yearly chart. You can even tap “Show All Data” and drill down to the daily ranges and then the hour by hour readings and even further into the “Beat-To-Beat measurements” which is sort of crazy.

But as interesting as this is, it’s not very actionable in a way that can guide your training for the day: It tends to vary quite a lot and it’s hard to judge from this raw data what your body is actually telling you. It’s also not available to view directly on Apple Watch.

What I felt would be useful would be a way to smooth the data and examine trends. For example, by looking at the overall baseline from the last 60 days and the sloping of the chart, we could derive a simple colour-coded “readiness to train” score that you could glance at on your watch via a complication or the full app.

The Training Today app takes your HRV data, processes it and turns it into a live glanceable training effort recommendation on your Apple Watch

That is what we have developed in this first release. I’m really pleased with the way it has turned out - it has quickly found a home on my watch faces as a complication and I am constantly glancing at the value and scrolling through the chart (I am a bit biased of course!)

Is this any better than the “Form” value from Strava, TP or others?

I believe there are some tangible benefits from the approach we have taken compared to other apps and platforms that calculate an effort from a training session and deriving a value for “form” from that. The biggest being that HRV data is reflective of your whole day and not just the workout session and as long as Apple Watch has made enough readings you will have a value that represents the holistic view of your life and not just your training sessions. That is something a good coach will always take into account but an algorithm based on training effort may not. So a poor nights sleep, a cold or injury, or in the opposite direction a solid nights sleep, and a rest period is reflected in what we call your RTT - your Readiness to Train.

And there is no fooling or messing with HRV by forgetting to log a session (or even faking one!), so it’s less likely to be misleading.

Smoothing the Chart

We spent a lot of time fine-tuning the algorithm that produces your RTT score and the chart to make it as representative as possible, but we found different athletes responded in different ways. So a top class triathlete may be able to deal with a small setback more easily than someone else (e.g. me) and so we introduced a way they could “smooth” the chart to a setting that suits them (just press firmly on the app screen to get to settings and change the smoothing value). I have mine set at 3 which seems to be a popular setting for the testers but I would be very interested in finding what values others set it to.

In a future release, we will be making this fine-tuning the subject of AI learning so it will adapt automatically to a user’s needs. Exciting!

Changing the Intensity

To understand what your base level of HRV is we read the last 60 days from your Health records on iPhone and create a moving average. If you find that recommendations are too high or too low you can shift them all up or down using the Intensity setting. I have mine set on -1 but I have a feeling that’s because I’m lazy.

How did we get here?

Since January this year, I’ve been following a Sprint Triathlon training plan created for me by Ade Bungay over at Goal Specific Training. I am working closely with Ade on Training Today and every day (before we had the first build of the app), I would export my HRV data from Health using Health Exporter into a Numbers spreadsheet and gradually fine-tune a set of formulas to get the chart and RTT score to what I felt was representative. I think I pushed Numbers quite hard here - not because of the amount of data (though there was quite a bit) but because of my repetitive and hacked formulas which I’m sure could have been a lot more efficient!

Still, it gave the developer - Olli Kallakivi from sydvesti.com, a good starting point to turn that into nice neat code and add additional enhancements to the calculations.

At the first build, we were then able to share this with a range of around 30 athletes for testing, all from varying backgrounds and abilities and that gave me the confidence that the RTT score is on the right track. Hopefully, you will find this too!

If you’d like to try the app you can download it for free from the Apple App Store using the App Store link (or just search for Training Today)

Where Next?

This is the first release of Training Today but we have plans to add much more capability going forward. Things like dynamic training plans which adjust based on your RTT score, sharing workouts and sessions with the community, sharing data with coaches, and professionally created, quality-assured, event-specific plans so you can select the exact plan needed for the running, swimming, cycling, triathlon, aquathlon or SwimRun event you have entered.

Feedback

I’d love to hear how you are getting on with Training Today so please do get in touch via a comment here, an email to Ian@theAppleWatchTriathlete.com or on twitter @IanBlackburn. And for more information on the app please visit the web site at TrainingTodayApp.com

Cheers!

Ian