The top 100 tennis ATP rankings in the last 5 years

Written by Yannik Messerli - 6 October 2014


What are the tennis players that have not left the top 100 ranking of the ATP classement in the last 5 years? Have the players a steady progression and a slow decline or changes are fast? I tried to answer these questions with the following visualization that githut.info inspired me.

Instructions

  • Hover the players to follow their paths through the 5 years of ranking.
  • Click on a player to highlight his path permanently.
  • The green bars are proportional to the ATP points of the player.
  • The tooltip shows the ATP points, followed by the ranking position at the ranking date. E.g. 1000 [2] means 1000 ATP points and the 2nd position.


Note on the creation process

To gather the data, I have used Casperjs. This framework is just fabulous! You can inject jquery into the page from which you want to extract data. As an example, here is the code I have used to collect the data above. On each page 'http://www.atpworldtour.com/Rankings/Singles.aspx?d=' + date + "&r=1&c=#", using the 5 different dates above, I was injecting:

var data = $('.bioTableWrap.bioTableWrapAlt tr').slice(1).map(function(i,el){
    var matches = $(el).find('.first').text().match(/\((...)\)/);
    return {
          name: $(el).find('.first a').text(),
          points: parseInt($(el).find('td:nth-child(2) a').text().replace(",","")),
          country: matches ? matches[1]: "",
          position: parseInt($(el).find('.first .rank').text())
     };
});

Then, I only kept the players that never left this list. There were precisely 37 players. Finally, I modified githut.info source code to suit my needs.

This visualization framework is really great to highlight evolutions. Feel free to propose suggestions for new visualizations about tennis or anything else in the comments below.

Written by

Yannik Messerli

Comments