The Timeless Rivalry: Ronaldo vs Messi

An investigation tracking Messi and Ronaldo’s performance trends

Project description
Author
Affiliation

Mobolaji Adewale, Narasimha Vardhan Rachaputi, Pradnya Raut, Praveen Kumar Pappala, Tushar Kant Singh, Usama Ahmed

School of Information, University of Arizona

Introduction

In the world of football, the names Cristiano Ronaldo and Lionel Messi resonate as symbols of unparalleled talent and sporting prowess. Their enduring rivalry has fueled debates among fans, pundits, and analysts, each vying to determine the superior player. However, amidst the fervour of subjective opinions, lies an opportunity to uncover objective truths through data-driven analysis. This project embarks on a journey to delve into the goal-scoring exploits of Ronaldo and Messi, employing statistical methods to dissect their performances across diverse dimensions. By meticulously examining their records spanning countries, competitions, opponents, matchdays, and goal times, this endeavour aims to provide a comprehensive understanding of their impact on the beautiful game.

Project Overview

The project unfolds in several phases, commencing with the meticulous wrangling of datasets to ensure data cleanliness and coherence. Following this, bespoke functions are crafted to calculate and visualize the number of goals scored by each player based on specified criteria, such as opponent, competition, matchday, and goal time. Leveraging these functions, the data is analysed and visualized to unearth insights into Ronaldo and Messi’s goal-scoring prowess, facilitating a nuanced comparison of their performances over the years.

Methodology

The methodology encompasses a systematic approach to data wrangling, analysis, and visualization. It begins with the loading of necessary libraries and datasets, followed by rigorous data cleaning and preparation to ensure accuracy and consistency. Key functions are then defined to compute and visualize the goal-scoring data, enabling comprehensive exploration across various dimensions. Through data analysis and visualization techniques, including bar charts and maps, the project illuminates the spatial and temporal dynamics of Ronaldo and Messi’s performances, offering valuable insights into their contributions to the sport.

Topic One

For the first topic, a series of dataframes were created in succession to manipulate the player data alongside map data. Ronaldo and Messi’s data were merged and subsequently joined to geometric data of the world. The data was then leveraged and reduced to merely the players, their countries and the number of goals in such. Another dataset was then produced of the centers of country’s co-ordinates to allow for the labelling of the countries involved. Once complete, the information was joined via ggplot and coalesced to gganimations; while a separate plotly diagram was created to allow for an interactive version of the information, over the entire timespan as opposed to yearly.

Animations

Animations, cont.

Interactive

Discussion

First animation is an animation created using gganimate. It is a highlighting countries where Messi and Ronaldo scored goals for a particular year over the period from 2005 to 2022. It also displays total number of goals scored by each player in all matches in that year

Second animation is also similar to first one displaying countries where goals were scored in a year all over the world by the two but zooming only Europe and Russia.

In year 2012 Messi scored highest goals of 74 whereas in 2013, Ronaldo scored highest goals of 58.

Both players scored higher goals compared to the other for 8 years each.

Messi scored higher goals than Ronaldo in years viz. 2009-2010, 2012, 2016-2019, 2022 whereas Ronaldo scored higher than Messi in the years 2005-2008,2013-2015, 2020

The total goals scored by Messi in there years are 652 whereas goals scored by Ronaldo in the same period are 654.

From 2005 to 2022, globally, Messi has scored more goals than Ronaldo in 11 countries, while Ronaldo has outscored Messi in 13 countries out of all matches played by both players.

So the performance of both players looks almost comparable in terms of goals scored with Ronaldo scoring marginally higher total scores than Messi

Topic Two

Topic two involved the collaboration of HTML, R and CSS to craft useful plots that can be filtered. A custom plotting function was created to allow for the specification of a filtering variable that can be selected via HTML drop-down menus and that responds instantly to change. The filtering was based on regions, competitions, last minute goals, whether the game was in ‘clutch’ time and the type of match involved. The use of the filters allows for a more specific scrutiny of the relationship between the goals scored between the two players such as viewing who had a more dominant career in the country of France - for example.

Discussion

In the second part of the project delves deeper into the goal-scoring prowess of Ronaldo and Messi, examining their performance across various dimensions such as countries, competitions, opponents, matchdays, and goal times. It employs data wrangling techniques, function definitions, and comprehensive analysis to provide a nuanced comparison of their performances, offering insights into their respective careers and contributions to the sport.

An insight gained from the new visualisation is that for a number of competition types, Ronaldo has outperformed Messi and vice versa: Ronaldo having outscored Messi in most competition types except finals. Another observation is that Rondaldo consistently scores more last minute goals - attaining more equalisers and winning goals than Messi does.

To further scrutinise, it can be deemed somewhat surprising that the two players have not played against each other often in the same countries and competitions within the same calendar years. As the representatives of the top of their sport, it would be exciting to see more matches played between the two players: head-to-head.

Limitations

The comparison between both players spans the available data from 2005 to 2022, covering a duration of 18 years. As the dataset grows larger, computational resources and processing times required for data analysis and visualization may increase significantly, posing scalability challenges, particularly when dealing with extensive historical data or incorporating real-time updates. The project focuses primarily on goal-scoring statistics and may not capture the entirety of Ronaldo and Messi’s contributions to football. Other aspects of their gameplay, such as assists, dribbles, defensive actions, etc., are not considered, which may provide a more holistic understanding of their performance.

In addition, there are more features that could have been scrutinised, such as penalties only or free-kicks only, but for the overall career story, it is more effective to showcase all the goals scored throughout their careers to highlight the success they have attained.