The Power of R

R_1

R is an open source statistical programming package that incorporates graphical tools to present your data.  It has become one the most used business tools for computing statistical information over the past decade.  With R you can infiltrate any data format, from .CSV to .SAV.  This is why it has become the tool used by most data scientists and it’s free.  Another important thing of R is you don’t have to be a programming wizard to work with it.

Here is an excellent article on R from January 2009, New York Times by Ashlee Vance.

Jumping in

The best way to learn to swim is to jump in and that is what I did with R.  Using the tutorial site Try R it was a gradual introduction to the useful functions of the programming language, as well as being a bit of fun.  There are 7 levels in the tutorial with each level introducing a function with easy to follow examples.  After learning the basic skills to use R without getting wet, let’s see if it can answer one of the most asked questions, Who is better Messi or Ronaldo?

Project_R

WHO IS BETTER – MESSI or RONALDO

  Lionel Andres Messi Cristiano Ronaldo
Born 24th June 1987 (28) 5th February 1984 (31)
Height 1.70m 1.85m
Team Barcelona Real Madrid
Total Goals 2009 – 2015 232 225

Nobody can dispute the quality of these fantastic players.  So to break it down we are doing to look at their goal scoring ability, how they assist their team and how long it takes them score one goal.  So lets have a look at each player.  For this study we will be only looking at data from the 2009/10 season onwards.  That is the year Cristiano Ronaldo joined Real Madrid.

GOALS PER SEASON
It truly is amazing looking at the fire power of each of these players.  The number of goals that each of them score in one season most centre forwards wouldn’t score over two.  You also have to take into account that the graph below only shows the goals that were scored in La Liga for each season from 2009 to 2015.  For the time period covered Messi has scored 232 goals and Ronaldo has 225.  So it’s 1 nil to Messi
Total Goals Scored

 

HOW OFTEN ARE THEY LIKELY TO SCORE

Here we look the likelihood of each of them scoring over a 90 minute period and again they break the norm.  On average most world class strikers have a goal rate of over 90 minutes.  Sergio Aguero, who finished top goal scorer in the Premier League for 2015 with 26 goals averages a goal every 98 minutes.  But the machines of Messi and Ronaldo each average a goal every 78 minutes.  It seems the only way to stop them from scoring is not let them play!!!!!  Its draw on this one.  Messi still 1 nil up.

Average MinGoal

NO “I” IN TEAM

We come down to the final comparison between the two greats and very little separates them. It’s not all about scoring goals especially if your having an off day.  So lets have a look at how they help their team mates outs.  The graph below shows how many assists each player has had in each of the seasons covered and it shows the their really is an I in team and that being Mess(I).  He is a clear winner by contributing an average of 17 assists per season to Ronadlo’s 13.  So based on our analysis Messi is the better player.  You don’t have to agree!!!

Number of Assists

Below is a heat map showing the full dataset for each player.

Messi_Heat

Leave a Reply

Your email address will not be published. Required fields are marked *