Monday 4 December 2017

Strava Data Analysis - A PC Based Visual C# Solution - V2.0.0.0 - Major Updates Dec 2017

The lastest version is here: Strava Tool Version 3.

Please download and use this version

In some previous posts I have shown the progress of my C# application to get hold of my own Strava data and do something with it.

The latest update is here: http://midlandscyclist.blogspot.co.uk/2018/04/my-windows-pc-c-strava-data-analysis.html

The last update was documented here: Strava Data Analysis - A PC Based Visual C# Solution - V1.1.0.8 - Updates Feb 1017

The current version is now at 2.0.0.0 and features a lot of updates. This is partly why the last update was over 10 months ago, and also because I'd rather be riding my bike

To find the previous posts about this software that I have written search for "Strava Data Analysis - A PC Based Visual C# Solution" in the blog

Major new features include:
  • Statistics ("simple" and "more advanced") (Visible to user)
  • Graphical display of data (Visible to user)
  • Some user interface improvements (Visible to user)
  • Quite a lot of work on the source code to make it a bit easier to support (Not visible to user)
All of these have taken me some time as its been a learning journey as well

You can download the application here: Zip File on Google Drive

Unfortunately I can't add files directly to this Blog and I don't have a hosting solution so its a bit clunky

At the moment the zip file is only the built application. There's no source code still - there are 2 reasons for this:
  • I am not sure how to split out only the files in the Visual Studio solution that are needed
  • I want to do some more work on the source code as its a bit of a mess
Assuming that you are still interested, have down loaded the zip file from the Google Drive and installed the application the remainder of this post is a bit of a user guide as to how to set up and then use the software

Firstly go to the Google Drive and find the file:



Make sure that you download Version 2.0.0.0

The Zip file contains the following files:



Double click on the "Setup" file. You will then see the following message:



Here you can choose whether or not to continue - the default option is "Don't Install" so you have to consciously select "Install".

Once installed it should appear in the Windows Start Menu:



Should you still not want to use the software you can un-install as normal from the Application menu (Its currently called "Strava Forms V2". Note that I have not yet created an an Icon for it yet)



Once it is installed start the Application. You'll see the following:



If you press the Start Button at this point you will get an error:



This is where its in-elegant. I have designed it so that you can download your private data. To do this you need the correct Strava Authentication Token. This is described here: How to get the Strava Token. This needs a lot of work. There appears to be no easy solution to doing this via a .Net application. There's certainly no specific ready to use code and I am going to have to create a second test application to look at this further.

Note that this is the weak spot of this application
 

Once you have generated a token copy and paste it into the text box marked "Strava Public Token" (note that this will be saved into an .ini file so once you have the token it will be able to be re-used (the tokens are non-expiring)

With a valid token select the relevant date range:



The Start Date of 1st January 2016 is hard coded in and the end date is today's date (by default the time of day is 00:00:00 am for the start and 23:59:59 for the end date so it will acquire any activities uploaded moments before.

Also select the units that you want to display the data in (imperial - miles, feet or metric km, m). This currently overrides the Athlete preferences read from Strava.


After a suitable pause (depending on the size of the date range, your network speed and the load on the Strava Site) you'll get results returned. (The application is currently single threaded and there's no progress indicator so please just wait).


The Application will return some Athlete Data (in the Athlete Data tab):





And in the Ride Activities tab will be all the Cycling activities within the defined date range (the number will be indicated in brackets, 342 in the example below):


If you are a Runner or do some other activity then tick Show Runs or Show Other Activities:


Show Runs will give another tab:





And Show Other Activities will show everything that's not a Cycle Ride (real, Stationary Trainer or Virtual Ride) or a Run. In my case I do swim occasionally:



However the application is Cycling focused. 

Firstly you can export the Activities list to a text file by selecting the Ride Activities tab and pressing the Export button:



Browse to a folder, give a file name and save. (Export also works for the individual Activity data).

Having got the activities you can now select which individual activity you want to view. elect the Ride Activity Data tab and double click in the first (empty) column. There will be a short pause whilst the data is retrieved from Strava. You can see which files have been selected as the "*" character is displayed in the first column and the row test colour is changed to red:



When this is complete data, in 3 more tabs is available (the Activity ID is shown in brackets as well).

Firstly the Ride Activity Data shows the 1Hz data (or whatever frequency was used):



As well as the raw measured data additional columns include calculated data such as Integral Altitude (cumulative height gain), Average Speed etc. Note that no power data is shown unless you have a power meter.

You can also Export this data as well using the Export button.

The Ride Activity Stats Tab shows some simple analysis of the activity data as well as some more advanced stats:



The Simple stats (left pane) shows the minimum, average, maximum, median and standard deviation of the raw recorded data.

The more advanced stats (right pane) is a work in progress and is based on some of the Stravistix Chrome Plugin. There's more to come here and this will be one of the sooner items in the next set of updates.


There is finally the Ride Activity Graphics tab [lots all the continuous data against either distance or time (using the radio buttons):



There is a "MouseOver" event so the actual data is displayed in the status bar at the top of the  graph pane. The Export button also exports the graphic as an image file:


Al the data for the application is stored in the default directory, currently this is as per the Installer location as is very obscure. Use the Tools Menu selection to Show Data Folder:



Here you will see the ini file (stravaforms.ini), and 2 other files: Athelete_xxxxxx.txt and Activities_xxxxxx.txt. xxxxxx is the Athlete ID:



Also for every activity selected the raw data is stored in 3 files <activity_id>_activity.txt,
<activity_id>_activity_stats.txt and <activity_id>_activity_stats_adv.txt. All these files are plain text files so can be re-used if required.

The .ini file contains some application settings (I have hidden my token):


If the .ini files exists s well as the Athlete and Activities files then the next time the application loads the data will be displayed. The start button is now an update (note that it wipes any existing data rather than appending to use accordingly).

You can quit the application in the normal manner or use the File- Quit option.

So far this is it.

What's planned for later versions (no particular order):
  • Continued code improvements
  • Use of threads to make more responsive
  • Ability to Authenticate within the application
  • Use of a database rather than files.
  • More statistical options
  • Automated Activity data retrieval 
  • More work on the Graphics pane - there is a lot of white space, its quite slow and needs more legends, axis titles etc
  • Error Trapping - currently there is almost none!
Feel free to send suggestions!

Also comment with issues/bugs/errors

Thanks

Wednesday 27 September 2017

Velo Birmingham

I rode the Velo Birmingham on 24 September 2017

I might write a few words about it later but in the meantime I had my Garmin Virb running at various points and here are the videos I created:

The first few miles from the start:



The "epic" climb of St Kenelms Pass:


This final few miles:


Sunday 10 September 2017

Tour of Britain 2017 - Stage 8 - Start in Worcester

We went to the see the start of Stage 8 of the Tour of Britain in Worcester on Sunday 10 September

We were near the start line so got a good glimpse of both the team buses and bikes but also the riders riding to sign on and then the start itself. 

Here is a  large number of photos:

Team Lotto Jumbo

Team Katusha


Team Quickstep

Team Cannondale

Detail of climbs and feed zones taped to stem (Team Cannondale)
One of the Cannondale riders was using disk brakes

No Barriers at Team Connandale

Dan Martin - Team Quickstep

Elia Viviani - Team Sky

Tao Geoghegan Hart - Team Sky

Christain Knees (I think) - Team Sky
Alex Dowsett - Team Movistar

Mark Cavendish - Team Dimension Data



Thursday 31 August 2017

Cycling Around Mallory Park, Leicestershire

I spent a pleasant late August evening cycling around the Mallory Park circuit. 





I managed to average 19.7mph over 1hr15mins - 25 miles. I was pleased with this performance as it was entirely solo. There was no one at a similar pace to me - a few really fast people on full aero bling and the rest slower than me.


Here's a video of about the 3rd lap I did - average of circa 20.5mph:


Mallory Park is open for Cycling from 6pm-9pm each Wednesday evening. 

Link is here: https://www.cyclingmallory.com/events-calendar

Rapha Exclusivity or Rapha Tat?

I normally sign up for the Strava Monthly challenges - they are there and it costs nothing

I normally manage the "Grand Fondo" distance challenge (just over 60 miles) and get just over 50% of the monthly distance challenge. The monthly climbing ones are more in my grasp and I probably get 3/4 of them through the year. Having been on holiday to the French Alps and Pyrenees for the past 3 years the climbing challenges have been done and dusted in just over a week.

This year (2017) as well at the normal Strava challenges in July there were additional challenges - the "Eurosport Peaks Challenge (ride)" and the "Rapha Rising" challenge. Given that the Strava Climbing challenge for July was 26,247ft and the Rapha challenge was only 15,092ft (4600m) the latter was a lot easier. I signed up as normal for them and sure enough duly climbed a lot more than required - 54,954ft to be precise - and thought no more about it.

Here is the evidence (Courtesy of veloviewer):


A few weeks ago a small black (and expensive looking) package dropped through the letter box, and when I opened it was a tangible Strava Achievement:



Gone now are the virtual achievements that I was used to, here is something from the Internet that I ca actually touch and feel. I really don't know what to do with it. I think I will put it somewhere safe so in a few years time my sons can get it out and it will have some tangible value. People will reminisce and say - "my I remember when a company could create value by creating an image and this overcharging customers for the same stuff you could get elsewhere!"

Just to prove the pretentiousness these are the words embossed inside:


Lets be honest - I went on holiday somewhere intersting to ride my bike up some "iconic" mountains - its not become part of what I am.

Fair play to Rapha for putting thier money where their mouth is  - but you can see why the clothes cost what they do when you have for factor in making woven bagdes and sending them to members of the public.

I also do have to admit that despite the comments above I have an item of Rapha clothing - but in my defence I was given this. Its a convoluted tale but a supplier to the company I work for is Austrian and a friend of Bernie Eisel. Some discussion later and this arrived:


Personally signed as you can just about see below:



Its a medium and whilst I am normally a medium this is what I guess is called a racing fit - I have to breathe in to do it up but once in and on the bike its OK. It does look great and it is comfortable. Given that it is unique to me I have worn it only a few times - not sure of the value of Bernie vs. say Chris Froome but its pretty valuable to me. Thanks Bernie.

Saturday 22 April 2017

Mountain Biking Again

At Easter 2016 I used a Red Letter Voucher to go Mountain Biking with MudTrek. It was so good that I chose to go again in 2017 and paid for it myself as well.

Again a really good day. Excellent guiding from Jay and hospitality before and after. A challenging route with a bit of everything mixed in - single track, double track, trails and roads. We ended up doing 33 miles and 4500ft of climbing. This year I was completely done in by about 25 miles. The last hour or so was painful. Every part of me ached and I was totally knackered, but the feeling on completion was fantastic


The ride is on Strava here

It looked like this:


And here's a few photo's of me truly:









Friday 21 April 2017

100 Climbs No95 - Black Mountain

I went mountain biking in South Wales again over Easter. But I also took my road bike and tried to squeeze in some other hills. It was a holiday with my wife as well so I made just one ride - that of the 100 Climbs No95 - Black Mountain. 

We struggled to find the start of the climb from the description in the book, so we drove all the way to the car park at the top. This meant that the ride would start with the descent and then I'd turn round at the bottom and ride up.

I got the bike out of the car and got changed. It was not cold but the wind at the top was quite brisk so I put several layers on to keep warm. I ended up needing these layers on the descent - I pedalled as hard as I could to try and warm up but the speed ended up faster than I was comfortable with. For this reason I went a lot further "down" the hill than I knew was necessary in order to warm up and be sure of starting the segment properly. In the end I had about 1-1½ miles of warm up which, together with the descent was just about enough.

The bottom of the climb starts somewhere near the small group of houses and the bridge (I think). There's a short kick up which saw me drop onto the smaller front ring. However I felt strong enough to use the 3rd and 4th gears for some time although I needed 2nd (34-25) for a while

There was about a mile of riding to the cattle grid, but once over the grid it levelled just enough to get into 3rd (34-23) and accelerate from ~8 to 9mph and felt quite strong. This was the pattern for most of the climb - I felt strong enough to ride 3rd pretty well all the way apart from a couple of points (one of the hairpins for example) where the gradient kicked up a little. The last ¾ mile or so ease off even more and I got into the 34-15 gear.

There was a tail wind to a degree for most of the climb but all the layers I put on at the start were starting to be 1 too many and I was pretty hot by the end.


I rode past the car park to be sure I had "summitted" and then rode back to the car. The ride was done.

Here's a video of the climb (with the extra bit at the bottom):




The Strava segment is here: OFFICIAL 100Climbs No95 Black Mountain



The data is:
Climb Length: 4.4 miles
Height Gain: 1246ft
Average Gradient: 5% (Strava Cat 2)
My time: 27:52
My position: 831 of 5316

With the time and overall position I was ecstatic - it was a great performance and I felt there is another minute in there - not getting too hot with the one too many layers I had on and knowing how to pace better could easily get a minute out of the climb - roll on next attempt!