Strava – Tour de Richmond Park Clockwise

Screenshot 2019-05-22 at 15.24.51

Following my recent update on the Tour de Richmond Park leaderboard, a friend asked about the ideal weather conditions for a reverse lap, clockwise around the park. This is a less popular direction, because it involves turning right at each mini-roundabout, including Cancellara corner, where the great Swiss rouleur crashed in the 2012 London Olympics, costing him a chance of a medal.

An earlier analysis suggested that apart from choosing a warm day and avoiding traffic, the optimal wind direction for a conventional anticlockwise lap was a moderate easterly, offering a tailwind up Sawyers Hill. It does not immediately follow that a westerly wind would be best for a clockwise lap, because trees, buildings and the profile of the course affect the extent to which the wind helps or hinders a rider.

Currently there are over 280,000 clockwise laps recorded by nearly 35,000 riders, compared with more than a million anticlockwise laps by almost 55,000 riders. As before, I downloaded the top 1,000 entries from the leaderboard and then looked up the wind conditions when each time was set on a clockwise lap.

In the previous analysis, I took account of the prevailing wind direction in London. If wind had no impact, we would expect the distribution of wind directions for leaderboard entries to match the average distribution of winds over the year. I defined the wind direction advantage to be the difference between these two distributions and checked if it was statistically significant. These are the results for the clockwise lap.

RoseSegmentBarSegmentclockwise

The wind direction advantage was significant (at p=1.3%). Two directions stand out. A westerly provides a tailwind on the more exposed section of the park between Richmond Gate and Roehampton, which seems to be a help, even though it is largely downhill. A wind blowing from the NNW would be beneficial between Roehampton and Robin Hood Gate, but apparently does not provide much hindrance on the drag from Kingston Gate up to Richmond, perhaps because this section of the park is more sheltered. The prevailing southwesterly wind was generally unfavourable to riders setting PBs on a clockwise lap.

The excellent mywindsock web site provides very good analysis for avid wind dopers. This confirms that the wind was blowing predominantly from the west for the top ten riders on the leaderboard, including the KOM, though the wind strength was generally light.

The interesting thing about this exercise is that it demonstrates a convergence between our online and our offline lives, as increasing volumes of data are uploaded from mobile sensors. A detailed analysis of each section of the million laps riders have recorded for Richmond Park could reveal many subtleties about how the wind flows across the terrain, depending on strength and direction. This could be extended across the country or globally, potentially identifying local areas where funnelling effects might make a wind turbine economically viable.

References

Jupyter notebook for calculations

Can self-driving cars detect cyclists?

Screenshot 2019-05-10 at 14.05.59

Self-driving cars employ sophisticated software to interpret the world around them. How do these systems work? And how good are they at detecting cyclists? Can cyclists feel safe sharing roads with an increasing number of vehicles that make use of these systems?

How hard is it to spot a cyclist?

Vehicles can use a range of detection systems, including cameras, radar and lidar.  Deep learning techniques have become very good at identifying objects in photographic images. So one important question is how hard is it to spot a cyclist in a photo taken from a moving vehicle?

Researchers at Tsinghua University, working in collaboration with Daimler, created a publicly available collection of dashboard camera photos, where humans have painstakingly drawn boxes around other road users. The data set is used by academics to benchmark the performance of their image recognition algorithms. The images are rather grey and murky, reflecting the cloudy and polluted atmosphere of the Chinese city location. It is striking that, in the majority of cases, the cyclists are very small, representing around 900 pixels out of the 2048 x 1024 images, i.e. less than 0.05% of the total area. For example, the cyclist in the middle of the image above is pretty hard to make out, even for a human.

Object-detecting neural networks are typically trained to identify the subject of a photo, which normally takes up are significant portion of the image. Finding a tall, thin segment containing a cyclist is significantly more difficult.

If you think about it, the cyclist taking up the largest percentage of a dash cam image will be riding across the direction of travel, directly in front of the vehicle, at which point it may be too late to take action. So a crucial aspect of any successful algorithm is to find more distant cyclists, before they are too close.

Setting up the problem

Taking advantage of skills acquired on the fast.ai course on deep learning, I decided to have a go at training a neural network to detect cyclists. Many of the images in the Tsinghua Daimler data set include multiple cyclists. In order to make the problem more manageable, I set out to find the single largest cyclist in each image.

If you are not interested in the technical bit, just scroll down to the results.

The technical bit

In order to save space on my drive, I downloaded about a third of the training set. The 3209 images were split 80:20 to create a training and validation sets. I also downloaded 641 unseen images that were excluded from training and used only for testing the final model.

I used transfer learning to fine-tune a neural network using a pre-trained ResNet34 backbone, with a customised head designed to generate four numbers representing the coordinates of a bounding box around the largest object in each image. All images were scaled down to 224 pixel squares, without cropping. Data augmentation added variation to the training images, including small rotations, horizontal flips and adjustments to lighting.

It took a couple of hours to train the network on my MacBook Pro, without needing to resort to a cloud-based GPU, to produce bounding boxes with an average error of just 12 pixels on each coordinate. The network had learned to do a pretty good job at detecting cyclists in the training set.

Results

The key step was to test my neural network on the set of 641 unseen images. The results were impressive: the average error on the bounding box coordinates was just 14 pixels. The network was surprisingly good at detecting cyclists.

oosImages

The 16 photos above were taken at random from the test set. The cyan box shows the predicted position of the largest cyclist in the image, while the white box shows the human annotation. There is a high degree of overlap for eleven cyclists 2, 3, 4, 5, 6, 8, 11, 12, 14, 15 and 16. Box 9 was close, falling between two similar sized riders, but 7 was a miss. The algorithm failed on the very distant cyclists in 1, 10 and 13. If you rank the photos, based on the size of the cyclist, we can see that the network had a high success rate for all but the smallest of cyclists.

In conclusion, as long as the cyclists were not too far away, it was surprisingly easy to detect riders pretty reliably, using a neural network trained over an afternoon.  With all the resources available to Google, Uber and the big car manufacturers, we can be sure that much more sophisticated systems have been developed. I did not consider, for example, using a sequence of images to detect motion or combining them with data about the motion of the camera vehicle. Nor did I attempt to distinguish cyclists from other road users, such as pedestrians or motorbikes.

After completing this project, I feel reassured that cyclists of the future will be spotted by self-driving cars. The riders in the data set generally did not wear reflective clothing and did not have rear lights. These basic safety measures make cyclists, particularly commuters, more obvious to all road users, whether human or AI.

Car manufacturers could potentially develop significant goodwill and credibility in their commitment to road safety by offering cyclists lightweight and efficient beacons that would make them more obvious to automated driving systems.

References

“A new benchmark for vision-based cyclist detection”, X. Li, F. Flohr, Y. Yang, H. Xiong, M. Braun, S. Pan, K. Li and D. M. Gavrila, in proceedings of IEEE Intelligent Vehicles Symposium (IV), pages 1028-1033, June 2016

Link to Jupyter notebook

Strava: Richmond Park leaderboard update

Screenshot 2019-04-27 at 16.15.55

An extended version of this blog was published by cyclist.co.uk

If you have ever had the feeling that it is becoming harder to rise up the Strava leaderboards and that KOMs are ever more elusive, you are right. I took a snapshot of the top 1000 entries for the Tour de Richmond Park segment in April 2019 and compared it with the leaderboard from February 2017 that I used for an earlier series of blogs.

The current rankings are led by a team of Onyx RT riders, who rode as a group at 6:02am on 25 July 2018, beating Rob Sharland’s solo effort by 6 seconds, with a time of 13:51. Some consider that targeting a KOM by riding as a team time trial is a kind of cheating. Having said that, many riders have achieved their best laps around Richmond Park while riding in the popular Saturday morning and Wednesday evening chain gang rides. In fact, if the Onyx guys had checked my blogs on the optimal wind direction and weather conditions, and chosen a warm evening with a moderate Easterly wind, they would have probably gone faster.

Survival of the fittest

The Darwinian nature of Strava leaderboards ensures that the slowest times are continually culled. Over the two year gap, the average time of the top 1000 riders improved by 35 seconds, which equates to an increase in speed of about 1.6% per annum. In 2017, a time of 17:40 was good enough to reach the top 1000. You now need to complete the rolling 10.8km course in less than 17:07, averaging over 37.8kph, to achieve the same ranking. The rider currently ranked 1000th would have been 503rd on the 2017 leaderboard, making the turnover about 50%.

Speed20172019

Strava inflation produces a right shift in the speeds at which riders complete the segment. Rider speeds exhibit “long tailed” distributions, with just a few riders producing phenomenal performances: although many people can hold an average of 38kph, it remains very hard to complete this segment at over 42kph.

More faster riders

A total of 409 names dropped off the bottom of the 2017 leaderboard, to be replaced by new faster riders. Some of these quicker times were set by cyclists who had improved enough to rise up the leaderboard into the top 1000, while others were new riders who had joined Strava or not previously done a lap of Richmond Park.

Riders riding faster

Of the 591 riders who appeared on both leaderboards, 229 improved their times by an average of 53 seconds. These included about 90 riders who would have dropped out of the top 1000, had they not registered faster times.

Getting faster without doing anything

One curious anomaly arose from the analysis: 32 efforts appearing on the 2019 leaderboard were recorded on dates that should have shown up on the 2017 leaderboard. Nine of these appeared to be old rides uploaded to Strava at a later date, but that left 23 efforts showing faster times in 2019 than 2017 for exactly the same segments completed by the same cyclists on the same rides.

For example, Gavin Ryan’s ride on 25 August 2016 appeared 8th on the 2017 leaderboard with a time of 14:23, but now he appears as 16th on the 2019 leaderboard with a time of 14:20! It seems that Strava has performed some kind of recalculation of historic times, resulting a new “effort_id” being assigned to the same completed segment. If you want to see a list of other riders whose times were recalculated, click here and scroll down to the section entitled “Curious anomaly”.

Summer is the time to go faster

Strava leaderboards were never designed to rank pure solo TT efforts. Although it is possible to filter by sex, age, weight and date, it remains hard to distinguish between team versus solo efforts, road versus TT bikes and weather conditions. The nature of records is that they are there to be broken, so the top times will always get faster. The evidence from this analysis suggests that there are more faster cyclists around today than two years ago.

As the weather warms up, perhaps you can pick a quiet time to move up the leaderboard on your favourite segment, while showing courtesy to other road users and respecting the legal speed limit.

 

 

 

 

Relative Energy Deficit in Sport (RED-S)

EnergyBalance

Unfortunately an increasing proportion of the population of western society has fallen into the habit consuming far more calories than required, resulting an a huge increase in obesity, with all the associated negative health consequences. At the opposite end of the spectrum, a smaller but important group experiences problems stemming from insufficient energy intake. This group includes certain competitive athletes, especially those involved in sports or dance, where a low body weight confers a performance advantage. A new infographic draws attention to this problem and highlights the fact that the individuals have control over the factors that can put them on the path to optimal health and performance.

RED-S

The human body requires a certain amount of energy to perform normal metabolic functions, including, maintaining homeostasis, cardiac and brain activity. The daily requirement is around 2,000 kcal for women and 2,500 kcal for men. Additional energy intake is required to balance the energy requirements any physical activities performed.

Athletes and dancers need to eat more than sedentary people, but they can fall into an energy deficit in two ways.

  • Reducing energy intake, while maintaining the same training load. This is typically an intentional decision, in order to lose weight, in the belief that this might improve performance. It can also arise unintentionally, perhaps due to failing to calculate energy demands of the training programme.
  • Increasing training load, while maintaining the same energy intake. This can often occur unintentionally, as a result of a more intensive training session or a shift into a higher training phase. Some athletes or dancers perform extra training sessions while deliberately failing to eat more, in the hope, once again, that this might improve performance.

While most of the population would benefit from a period of moderate energy deficit. High level athletes and dancers tend to be very lean, to the extent that losing further weight compromises health and performance. The reason is that the endocrine system is forced to react to an energy deficit by scaling back or shutting down key metabolic systems. For example, levels of the sex hormones testosterone and oestrogen can fall, leading to, among other things, reductions in bone density. Unlike men, women have a warning sign, in the form of an interruption or cessation of menstruation. Both men and women with RED-S are likely to suffer from a failure to achieve their peak athletic performance.

Achieving peak performance

Fortunately athletes have control over the levers that lead to peak performance. These are nutrition, training load and, of course, recovery. Consistently fuelling for the energy required, whilst ensuring that the body has adequate time to recover, allows the endocrine system to trigger the genes that lead to the beneficial outcomes of exercise, such as improved cardiovascular efficiency, effective muscular development, optimal body composition, healthy bones and a fully functional immune system. These are the changes required to reach the highest levels of performance.

Screenshot 2019-04-08 at 12.19.45

 

 

Don’t ride your bike like an astronaut

Screenshot 2019-04-05 at 17.13.59

Astronauts return from the International Space Station with weak bones, due to the lack of gravitational forces. It is surprising to learn that competitive cyclists can experience similar losses in bone density over the period of a race season.

The problem is called Relative Energy Deficiency is Sport (RED-S). This occurs when lean athletes reach a tipping point where the benefits of losing weight become overwhelmed by negative impacts on health. When deprived of sufficient energy intake to match training load, certain metabolic systems become impaired or shut down.

Colleagues from Durham University and I recently published a study investigating what cyclists at risk of RED-S can do to improve their health and performance. It is freely available and written in an accessible way, without the requirement for specialist expertise.

Race performance

Race performance was measured by the number of British Cycling points accumulated over the season. This was correlated with power (FTP and FTP/kg) and training load. However, changes in energy availability proved to be an important factor. After adjusting for FTP, cyclists who improved their fuelling (green triangles) gained, on average, 95 points more than those who made no change. In contrast, those who restricted their nutrition (red crosses) accumulated 95 fewer points and reported fatigue, illness and injury.

Figure2 600
Race Performance versus FTP and changes in Energy Availability (EA)

The nutritional advice included recommendations on adequate fuelling before, during and after rides. Also see my previous article on fuelling for the work required.

Bone health

Competitive road cyclists can fall into an energy deficit due to the long hours of training they complete. Although an initial loss of excess body weight can lead to performance improvements, athletes need to maintain a healthy body mass. The lumbar spine is particularly sensitive to deficiencies of energy availability.

In cyclists, the lower back also fails to benefit from the gravitational stresses of weight-bearing sports. This is why, in addition to nutritional advice, study participants were recommended some basic skeletal loading exercises (yes, that is me in the pictures).

The cyclists fell into three general groups: those who made positive changes to nutrition and skeletal loading, those who made negative changes and the remainder. The resulting changes in bone mineral density over a six month period were striking, with highly statistically significant differences observed between the groups.

Those making positive changes (green triangles) saw significant gains in bone mineral density, while those making negative changes (red crosses) saw equally significant negative losses in bone density. Any individual observation outside the band of the least significant change (LSC) is indicative of a material change in bone health.

Figure1 600
Changes in Lumbar Bone Mineral Density versus Behaviour Changes

Conclusions

The study provided strong evidence of the benefits of positive changes and the costs of negative changes in nutrition and skeletal loading exercises. It was noted that certain cyclists found it hard to overcome psychological barriers preventing them from deviating from their current routines. It is hoped that such strong statistical results will help these vulnerable athletes make beneficial behavioural changes

References

Clinical evaluation of education relating to nutrition and skeletal loading in competitive male road cyclists at risk of relative energy deficiency in sports (RED-S): 6-month randomised controlled trial, Nicola Keay, Gavin Francis, Ian Entwistle, Karen Hind. BMJ Open Sport and Exercise Medicine Journal, Volume 5, Issue 1. http://dx.doi.org/10.1136/bmjsem-2019-000523

 

 

Learning the language of the Giro

Fausto_Coppi

Computers are becoming ever better at natural language processing (NLP). I set up a neural network as a language model and loaded a set of pre-trained weights on my MacBook Pro, to see what it could do. After priming it with some text about the Giro d’Italia, this is what the model produced as a continuation.

Priming text: The Giro d’ Italia (Italian pronunciation: [ˈdʒiːro diˈtaːlja]; English: Tour of Italy; also known as the Giro) is an annual multiple-stage bicycle race primarily held in Italy, while also occasionally passing through nearby countries. The first race was organized in 1909 to increase sales of the newspaper La Gazzetta dello Sport; however it is currently run by RCS Sport. The race has been held annually since its first edition in 1909, except when it was stopped for the two world wars. As the Giro gained prominence and popularity the race was lengthened, and the peloton expanded from primarily Italian participation to riders from all over the world.

Computer generated continuation:  the race was won by the italian rider , giovanni di u_n , who won the race in the first leg of the race . the race was won by italian rider giovanni u_n , who won the race by a margin of two lengths .
= = = world tour = = =
the tour de france was the first of the tour de france . the tour de france was won by the reigning world champion , the reigning world champion , who had won the tour de france in the previous year ‘s race …

The output may not make a lot of sense, but the point is that it looks like English (in lower case). The grammar is reasonable, with commas, fullstops and a header inserted in  a logical way. Furthermore, the model has demonstrated some understanding of the context by suggesting that the Giro could be won by an Italian ride called Giovanni. The word “u_n” stands for unknown, which is consistent with the idea that an Italian surname may not be a familiar English word. It turns out that a certain Giovanni Di Santi raced against Fausto Coppi (pictured above) in the 1940 Giro, though he did not win the first stage. In addition to this, the model somehow knew that the Giro, in common with the Tour the France, is a World Tour event that could be won by the reigning world champion.

I found this totally amazing. And it was not a one off: further examples on random topics are included below. This neural network is just an architecture, defining a collection of matrix multiplications and transformations, along with a set of connection weights. Admittedly there are a lot of connection weights: 115.6 million of them, but they are just numbers. It was not explicitly provided with any rules about English grammar or any domain knowledge.

How could this possibly work?

In machine learning, language models are assessed on a simple metric: accuracy in predicting the next word of a sentence. The neural network approach has proved to be remarkably successful. Given enough data and a suitable architecture, deep learning now far outstrips traditional methods that relied on linguistic expertise to parse sentences and apply grammatical rules that differ across languages.

I was experimenting with an AWD-LSTM model originally created by Stephen Merity. This is a recurrent neural network (RNN) with three LSTM layers that include dropout. The pre-trained weights for the wt103 model were generated by Jeremy Howard of fast.ai, using a large corpus of text from Wikipedia.

Jeremy Howard converted the Wikipedia text into tokens. A tokeniser, such as spaCy,  breaks text into words and punctuation, resulting in a vocabulary of tokens that are indexed as integers. This allows blocks of text to be fed into the neural network as lists of numbers. The outputs are numbers that can be converted back into the predicted words.

The wt103 model includes a linear encoder that creates embeddings of word tokens. These are passed through three LSTM layers whose states are able to retain a memory of previous words or context. The result is passed through a decoder, employing the same weights as the encoder, to produce a softmax output that can be treated as a set of probabilities, across the vocabulary, to predict the next word token. Special forms of dropout were employed, as described in the paper, to limit overfitting and make the model more robust.

The network was trained by minimising cross-entropy loss using stochastic gradient descent. A technique called back propagation through time (BPTT) introduced some random variation into the length of the blocks of text employed in each training batch. The connection weights were iteratively improved towards optimal values.

OK, but so what?

Impressive as it may be for a neural network to spout highly plausible but nonsensical English, what possible use could this have? Well, suppose you want to automate the separation of texts into different categories, for example, distinguish different authors or determine the sentiment of tweets or predict the reaction of the stock market to news items or identify the sentiment of movie reviews. Fine-tuning a neural network that already has a good knowledge of English provides a huge advantage over starting from scratch. In lesson 10 of the fast.ai course, Jeremy Howard demonstrates how this approach can be used to achieve state of the art results on the widely used IMDB movie review data set.

Further examples

In the first example, the network finishes the sentence about a hurricane in perfect English.  Next, it comes up with the name of a critic (actually a rock music critic rather than a book reviewer, but heh!) and it makes use of its LSTM to open and close quotation marks. In the bean example, it amazingly starts describing flowers and correctly converts their dimensions from centimetres to inches!

My code can be found here.

Priming text: Hurricane Ivan was a large long Cape Verde hurricane that caused widespread damage in the Caribbean and United States The cyclone was

Computer generated continuation:  the first hurricane to strike the united states since hurricane katrina in 2005 .

Priming text: The book was widely acclaimed by the critics.

Computer generated continuation: the book was published in the united states by the american library association on june 1 , 2006 .

= = = critical response = = =

the book received mixed reviews from critics . the new york times reviewer robert christgau called it ” a great book ” and ” a great book ” . he praised the book ‘s ” strong , strong , and well – written ” prose , and the ” excellent ” prose .

Priming text: Most varieties of bean grow either as an erect bush or as a climbing plant, but a few important kinds are of intermediate form. Dwarf and semiclimbers are grown extensively. When the climbing type is grown for its immature pods, artificial supports are necessary to facilitate harvesting. Varieties differ greatly in size, shape, colour, and fibrousness or tenderness of the immature pods. In general, varieties grown for dry mature seeds produce pods that are too fibrous to be eaten at any state of development. Most edible-podded beans produce relatively low yields of mature seeds, or seeds that are of low eating quality. Seed colours range from white through green, yellow, tan, pink, red, brown, and purple to black in solid colours and countless contrasting patterns. Seed shapes range from nearly spherical to flattened, elongated, and kidney-shaped. Pods are of various shades of green, yellow, red, and purple and splashed with red or purple; pod shapes range from flat to round, smooth to irregular, and straight to sharply curved; length ranges from 75 to 200 millimetres (3 to 8 inches) or more.

Computer generated continuation:  the most common form of the flower is the flower spike , which is a characteristic of the flower spike . the flower is made up of a series of small , cylindrical , cylindrical , cylindrical , cylindrical stems that are up to 10 cm ( 3.9 in ) long and 2.5 cm ( 0.98 in ) wide . the flower spikes are arranged in a series of three or four pairs of flowers 

 

 

Creating artistic images from Strava rides

firstimage
Four laps of Richmond Park

When you upload a ride, Strava draws a map using the longitude and latitude coordinates recorded by your GPS device. This article explores ways in which these numbers, along with other metrics, can be used to create interesting images that might have some artistic merit.

The idea was motivated by the huge advances made in the field of Deep Learning, particularly applications for image recognition. However, since datasets come in all shapes and forms, researchers have explored ways of converting different types of data into images.  In a paper published in 2015, the authors achieved success in identifying standard time series by converting them into images.

GPS bike computers typically record snapshots of information every second. What kind of images could these time series generate? It turns out that there are several ways to convert a time series into an image.

Spectrogram

Creating a spectrogram is a standard approach from signal processing that is particularly useful for analysing acoustic files. The spectrogram is a heat map that shows how the underlying frequencies contributing to the signal change over time. Technically, it is derived by calculating the discrete Fourier transform of a window that slides across the time series. I applied this to my regular Saturday morning club ride of four laps around Richmond Park. The image changes a bit once the ride gets going after about 1200 seconds (20 minutes), but, frankly, the result was not particularly illuminating. There is no obvious reason to consider cycling power data as a superposition of frequencies.

spectrogram

Ah! Now we are getting somewhere

The authors of the referenced paper took a different approach to produce things called Gramian Angular Summation Field (GASF), Gramian Angular Difference Field (GADF), and Markov Transition Field (MTF). Read the paper if want to know the details. I created these and something call a Recurrence Plot. All of these methods generate a matrix, by combining every element in the time series with every other element. The underling observations occurring at times t_{1} and t_{2} determine the colour of the pixel at position (t_{1}, t_{2}). Images are symmetric along the lower-left to upper-right diagonal, apart from GADF, which is antisymmetric.

Let’s see how do they look for on four laps of Richmond Park. We have six time series, with corresponding sets of images below. The segmentation of the images is due to periodicity of the data. This is particularly clear in the geographic data (longitude, latitude and altitude). The higher intensity of the main part of the ride is most obvious in the heart rate data. The MTF plots are quite interesting. Scroll down through the images to the next section

data1
Raw time series of power, heart rate, cadence, longitude, latitude and altitude
gasf
Gramian Angular Sum Field
gadf
Gramian Angular Difference Field
mtf
Markov Transition Field
rp
Recurrence Plot

From cycle ride to art

It is one thing to create an image of each item, but how can we combine these to summarise a ride in a single image. I considered two methods of combining time series into a single image: a) create a new image where the vertical and horizontal axes represent different series and b) create a new image by simply adding the corresponding values from two underlying images.

One problem is that some cyclists don’t have gadgets like heart rate monitors and power meters, so I initially restricted myself to just the longitude, latitude and altitude data. Nevertheless, as noted in an earlier blog, it is possible to work out speed, because the time interval is one second between each reading. Furthermore, one can estimate power, from the speed and changes in elevation.

Another problem is that rides differ in length. For this I split the ride into, say, 128 intervals and took the last observation in each interval. So for a 3 hour ride, I’d be sampling about once every 84 seconds.

The chart at the top of this blog was created by first normalising each series to a standard range (-1, +1). Method a) was used to create two images: longitude was added to latitude and altitude was multiplied by speed. These were added using method b). Using these measures will produce pretty much the same chart each time the ride is done. In contrast, an image that is totally unique to the ride can be produced using data relating to the individual rider. The image below uses the same recipe to combine speed, heart rate, power and cadence. If this had been a particularly special ride, the image would be a nice personal memento.

lastimage
A different take on four laps of Richmond Park

For anyone interested in the underlying code, I have posted a Jupyter notebook here.

References

Encoding Time Series as Images for Visual Inspection and Classification Using Tiled Convolutional Neural Networks, Wang Z Oates T, https://www.aaai.org/ocs/index.php/WS/AAAIW15/paper/viewFile/10179/10251