Chasing Complex Bugs: Power Curves and Best Rolling Curves

The harder category of bugs are when it is related to bad numbers generated from the more complex algorithms in ConnectStats. This is what is now happening with the best rolling plots.

The rolling best curve are one of my favorite feature in ConnectStats, they provide insight I don’t see in many other services. It’s quite common to see a power curve, but I feel the concept extended to heart rate or speed help give people a good sense of the characteristic of a workout. While the concept is simple, it actually can be a bit tricky to implement (at least for me it was). The current version of the app shows quite a few quirks that are obviously wrong, like the below.

Continue reading

Quick review of COVID-19 data

While I am still preparing a new release of ConnectStats fixing a few issues, right now, the corona virus is a major distraction for most of us. While the virus spreads there is a lot of information floating around and it can be sometimes be a bit confusing. So I decided to see what could I verify on my own at home with basics analysis and tools. I’ll be using python/jupyter/pandas, which is very standard and easy to install or can be run directly on google collab

This may become a bit technical for some, but hopefully will be interesting and may help some people learn more about python and pandas as more of us have to stay home…

Continue reading

Statistics on a selection of activities

One feature people repeatedly ask about is the ability to see statistics for a selection of Garmin Activities. It is actually possible by using the search feature.

Let’s say for example I want to see the statistics of all the running activities in july 2015. I first enter that as a search

Simulator Screen Shot 20 Jan 2016, 21.53.35

Then in the statistics page, hit the type button until the term Search appears. It will remind you what the search term was, and then the statistics you see are only using the currently selected list:

Simulator_Screen_Shot_20_Jan_2016__21_53_40

This will be the case for the other stats page as well, here for example I show a scatter plot of Pace versus HR for the running activities of July 2015

Simulator Screen Shot 20 Jan 2016, 21.53.54

Another useful application is to run statistics on a specific activity type, for example all the skiing activities as here, I show how much elevation gain I achieved each month in backcountry skiing. You can see more about skiing here

Simulator Screen Shot 20 Jan 2016, 22.01.22

It is limited though by the current search syntax of ConnectStats, which if there is significant demand, I may extend. Just let me know.

 

Fenix 3: Inconsistent Laps and speed graphs?

Update I added a new option to ConnectStats to mitigate the issue

I started noticing something quite weird with the activities recorded on the Fenix 3 since I updated to firmware 6.5 for my running activities. The pace reported on garmin connect is quite off, while the pace of the splits seems correct. At the very least the two are very inconsistent, the pace on the pace graph is typically quite slower than the correct pace. You can see an example activity here, all the lap pace overlay are clearly toward the minimum of the lap pace, which is not possible.

Screen Shot 2016-01-18 at 21.24.55Screen Shot 2016-01-18 at 21.25.09

While if I look at a similar run but in december (pre 6.5) it’s much better

Screen Shot 2016-01-19 at 22.15.39

Looking at the activity on garmin connect, shows the same issue, so I don’t think it’s a bug in Connectstats (my initial thought). Old activities (pre 6.5) do not show the issue. On Garmin website, while it’s harder to see, if you move around the pace, you can see most values are quite slower than the average pace for the activity.

 

Screen Shot 2016-01-18 at 21.23.49

If I looked at the same activities on Activity on Strava,  the graph is consistent with the splits. Strava seem to recreate the pace from the GPS points (my guess).

Screen Shot 2016-01-18 at 21.24.20Screen Shot 2016-01-18 at 21.24.10

I then looked at the details in excel, here too, it’s quite clear that the speed recorded for each point is quite slower, while the speed of the split is correct. For example for the first split, I looked for the 1000m point, computed the time to start 308 seconds, which gives 3.24 meter/seconds or 5:08min/km. While a simple average of the speed recorded for each point gives 2.72mps or 6:07min/km. The simple average is inaccurate, it should be weighted by the time between points, but this is way off.

gc_track

 

Heart Rate Time in Zone Accuracy

Someone in a comment highlighted differences between the Time in Zone reported by ConnectStats and the one reported in Garmin Connect. So I did some investigation of the accuracy of the time in zone reported by Garmin and ConnectStats. I checked some of my recent activities and also found some discrepancies. Here is a bit of a dive and how to look at it, but my initial conclusion is that ConnectStats seems more accurate.

I look here at a run in the mountains of Switzerland. First you can see the time in zone reported by ConnectStats. You can see first the graphs, but if you tap on the laps cell and select the Heart Rate Zone choice, you can then see details of the numbers computed for each zone.

Screenshot_30_12_2015__21_54 iPhone_6_-_iPhone_6___iOS_9_2__13C75_

Note also that if you hit a given zone, here Zone 5, you can see on the map and on the graph where you were in that zone.

Screenshot_30_12_2015__21_55

Here it shows 26 minutes in the zone 176 to 190. As a comparison, Garmin Connect shows 47 minutes in that zone and 1:36 in the Z5 zone (above 190), which is interesting because the max HR reported for that run is 189… The settings for the zone in garmin connect is also consistent with the one ConnectStats is using as you can see below.

Garmin_Connect

Garmin_Connect Garmin Connect Time in Zone

As a comparison, Strava shows numbers more in line with ConnectStats, but I was unable to align the zone exactly. For me choosing a custom zone in strava to match the one above 176 to 190 didn’t work and wasn’t picked up by the graph.

Afternoon_Run___Run___Strava

Strava time in zone

As a last resort I exported the data for this run to a csv file. You can do that by using the sharing pane in the details activity of ConnectStats, select csv file and email it to yourself. In this case the number also was matched closer to connectstats at 1739 seconds or 28 minutes and change (though not exact, I’ll try to understand why)

gc_track

So all in all, I’d be interested in other example of mismatch, but here I feel ConnectStats seems more accurate than Garmin Connect, especially for example the fact that Garmin Connect report over 1min30 in a zone that is above the Max HR reported…

If you find a case where Garmin Connect seems more accurate, please send me a bug report that includes the activity and the numbers Garmin Connect reports.

Thanks

 

What the Summary Stats say about September

Looking at the summary stats September turned out a pretty good month for my running.

Looking at the fitness vs fatigue graph section corresponding to september, the line stayed pretty constant, showing I kept my training level pretty constant. Later in the month I pushed a bit more as the peak in fatigue shows.

Simulator_Screen_Shot_17_Oct_2015__21_12_12In the bottom graph, the thicker black line shows the best speed achieved for given distances in september. I achieved my best speed of the year for all distance between 6km and 13km. You can see that as the thicker black line for september is the minimum for the year, and I did quite significantly better in speed than august.

Simulator_Screen_Shot_17_Oct_2015__21_12_27Meanwhile the best heart rate profile shows that this was achieved without pushing the heart rate more than the other months. Actually, the september line (black thick line) stays quite below the max of the year for any duration. This is pretty satisfying: better speed without pushing  much more…

 

Few more months to catch up

Another year of running comes to a close. How did I do this year so far?

Year to Date

1443360891_thumb.pngThe Year to Date graph gives me a good incentive to keep the weekly running distance high. I have so far run 949km  this year, about 80km behind last year at the same date. I had a slow beginning of the year compared to the previous one, but since April, I did pretty well.

So if I keep the momentum of the last few months, I maybe able to catch up my running distance of 2014. The year 2012 is still quite a way ahead, though…

Monthly Totals

1443361239_full.pngTo better evaluate my chances, let’s look at how much I ran last year in the last few months. In the monthly stats over the last year, I can see that november and december in 2014 were on the low side with less than 90km each, so hopefully if I keep at it, I’ll catch up! I finish september close to 150km…

Year to date or Month to date statistics

Version 2.1 of ConnectStats introduces the ability to see year to date or month to date statistics. The yearly cumulative graph was already giving a good idea of how well you were doing this year versus the last, but now you can see the full stats you reached at the same point of last year.

Below for example you can see that in 2015, so far I ran 758km, while on the full year of 2014 I ran 1356km. If you press on the button All, you get to the YTD screen, that shows that in 2014 at the same point in the year as today (August), I had run 913km.

IMG_1664 IMG_1665

In the monthly view, the graph is slightly different, the full month bar is shown, but the blue shows how much for each month was reached at the same point in the month, here around august 15, or about half way through the month.

 

IMG_1666 IMG_1667

Best Rolling Graphs over Time

ConnectStats can now maintain best rolling graph over time. I find it quite interesting to see how one month compare to the other. You access the feature by going to the statistics screen and it’s the graph at the bottom of the summary page.

You can also find information about best rolling plots for an activity here and how to interpret them here

Initial Computation

Computing these graphs can be quite expensive. Every time you do a download, ConnectStats will process a few activities. It requires the full activity details, so only the activities for which you will have looked at the detail screen will be used.

You can force to recalculate older activities by going to the settings, profiles, and select Compute Best for more old Activities. This processes quite a few existing activities. Each time to press it, it will look for activities not already processed.

Interpreting the graphs

Heart Rate

This is the graph showing the best Heart Rate I achieved for any given period of time.
iOS_Simulator_Screen_Shot_8_Aug_2015_09_34_03The arrow 1 below shows the graph for July. You can see here that it was a month for which the best of the year was achieved except for the area pointed out by the arrow 2. The arrow 3 potints to the yellow graph showing that the last year (2014) was not as good as this year, I definitely pushed myself more this year, especially in july, when I completed a half marathon…

If you tap once on the graph it will rotate through the last few months, to show you how you performed then.

 

 

Pace or speed

This is the graph with the best speed or pace I achieve for a given distance. Not the heart rate is for time, not distance as I think it makes more sense.

iOS_Simulator_Screen_Shot_8_Aug_2015_09_34_15
If you pan to the left on the graph it will switch to the best pace or speed. Arrow 1 here shows you that the best speed for the year on most distances was achieved in july. Note that for pace a graph lower is better, but for speed higher is better. Again, if you tap on the graph, it will rotate through the last few months.

 

 

 

Performance Analysis

In the version 1.20, ConnectStats supports a first version of long term (fitness) versus short term (fatigue) performance analysis. This is a bit rudimentary for now, and hopefully will improve over time.

The performance Index

The analysis is based on two fields, a summable field like distance, time or elevation gain and a second field to rescale it like heart rate, power, etc.

The analysis is based on an index built using this scalable field and summable field.

To access the analysis you need to select from the statistics field view, a field. If the field you select is summable (Distance, Time, Elevation Gain) it will use it as the summable field and choose Heart Rate as the scalable field. If you select a non summable field, it will use that as the scalable field and distance to sum.

Once the two fields are selected it will then apply a formula to get a performance index. The formula in this first version is simply to multiply the two fields, similar to a very simple TRIMP index, but in the future we could change that, for example along the line of normalised power and apply a function scaling more realistically to how the scalable field impact the distance field. This page gives some interesting comparison of the different way to do that.

Fitness (Long Term) versus fatigue (Short Term)

Given the two fields above and the performance index, then we will try to compare the long term accumulated fitness versus the short term training. We pick two periods, the short term period and the long term period, and plot the average performance index of the long term period versus the short term period.

Currently the short term period is the last seven days and the long term period is the month prior to that.

So the idea is to show how much training accumulated over a month (long term fitness) versus how much you are currently training. If your short term training is significantly above the long term fitness, you maybe over doing it. And you maybe taking it too easy or resting if the short term fitness is quite below the long term fitness.

In a future version I could parametrise both the performance index function and the periods used, depending how much people feel the idea is useful or not. So don’t hesitate to give feedback either with a review, tweet, comment or bug report.

Example

Once you selected a field in the statistics view, tap the bottom plot to iterate between the different choices: Monthly value, performance index graph and histogram/distribution of values.

Here is my current running performance. You can see in this graph that recently I have been training a bit more which raised my long term fitness, while the toward the end november I did less running which lowered the long term fitness .

Screen Shot 2016-02-24 at 05.20.48