project

EDA on Web-Scraped

UEFA Champions League Finals

The UEFA Champions League is an annual football competition established in 1955 by the Union of European Football Associations (UEFA).

The league features champions of all UEFA member associations, current title holders of the tournament, and clubs finishing from second to fourth position in the strongest leagues. There has been a total of 67 tournament seasons from the inaugural to the latest edition of the tournament. Documented details of the tournament seasons are available online from the official website, Wikipedia and other sources. We consider the data on the UEFA champions league finals that is available from Wikipedia.

 

Data scraping:

We first scraped the UEFA champions league data from the Wikipedia website, followed by a thorough cleansing of the data and lastly performed an exploratory data analysis (EDA) on the dataset. The entire procedure was accomplished using a couple of R add-on libraries. We used the rvest library for scraping, stringr for editing, data.table for melting, magrittr for piping, dplyr for manipulating, ggplot2 for plotting and ggthemes for styling. The first ten rows of the retrieved data are shown in the table below, also with a tidy and complete table available at the link given below the table.

# A tibble: 67 x 10
---------------------------------------------------------------------------------- Winners ----- Fulltime --------------- Runners-up -------
   Season     Venue                                      Attendance    Winners     country        score     Runners-up     Country                 
--------------------------------------------------------------------------------------------------------------------------------------------            
1  1955–56    Parc des Princes, Paris, France                38239      ESP       Real Madrid      4–3          FRA        Reims                   
2  1956–57    Santiago Bernabéu, Madrid, Spain              124000      ESP       Real Madrid      2–0          ITA        Fiorentina                 
3  1957–58    Heysel Stadium, Brussels, Belgium              67000      ESP       Real Madrid      3–2          ITA        Milan                        
4  1958–59    Neckarstadion, Stuttgart, West Germany         72000      ESP       Real Madrid      2–0          FRA        Reims                      
5  1959–60    Hampden Park, Glasgow, Scotland               127621      ESP       Real Madrid      7–3          GER        Eintracht Frankfurt             
6  1960–61    Wankdorf Stadium, Bern, Switzerland            26732      POR       Benfica          3–2          ESP        Barcelona                   
7  1961–62    Olympisch Stadion, Amsterdam, Netherlands      61257      POR       Benfica          5–3          ESP        Real Madrid                  
8  1962–63    Wembley Stadium, London, England               45715      ITA       Milan            2–1          POR        Benfica                     
9  1963–64    Praterstadion, Vienna, Austria                 71333      ITA       Inter Milan      3–1          ESP        Real Madrid                 
10 1964–65    San Siro, Milan, Italy                         89000      ITA       Inter Milan      1–0          POR        Benfica                     
# ... with 57 more rows

see complete table

 

Analysis:

In what follows, we present the results of our UEFA Champions League EDA using appropriate visualization tools. First, we see that a total of 17 countries have had the league’s final hosted in their domains. Italy, Spain, Germany and England were the top hosts for the tournament. The well-attended events have had an average of 60,000 attendants from its inaugural competition to date. The topmost attended of all the tournaments were held at Hampden Park, Glasgow, Scotland with a record 127,621 attendees, and at Santiago Bernabéu, Madrid, Spain with 124,000 attendees. The least attended seasons finals were held in stádio do Dragão, Porto, Portugal (14,110) and Estádio da Luz, Lisbon, Portugal (0). With the zero attendance for the year 2020 due to the covid-19 pandemic.

 

uefa-attendance.png

Fig 1

 

uefa-attendance.png

 

A total of 13 nations have produced the winning team, with Spain being on top of the list. It made 30 appearances at the finals with 19 wins, while England, Italy and Germany respectively made 25, 28, and 18 appearances and 14, 12, and 8 wins. When narrowed down to clubs, we further observed that 22 clubs have won the League. Real Madrid takes the lead with a record fourteen times wins. Milan, Liverpool, Bayern Munich and Barcelona are also on top of the list, having won at least 5 times in the tournaments. Juventus have been runners-up the most times, losing seven finals. Benfica and Bayern Munich lost 5 finals each.

 

nations.png

 

uefa-winners.png

 

uefa-runners-up.png

 

We further observe the distribution of the (full-time) scores in the tournaments’ finals. The distribution is skewed to the right, of course, indicating the toughness of the games. Most of the seasons had no more than three goals at full-time, with several wins made with just a 1-0 score at full-time. About 18% of the tournament finals ended in a draw, thus, decided by a penalty shoot-out.

 

uefa-fulltime-score.png

 

Final thoughts:

No team waste resources and time just to show a mere presence at a tournament. The goal has always been to get into the final stage to kiss and lift up the victorious trophy. We have shown in our EDA the performances of teams who made it to the UEFA champions league finals over the years. Spain remains on top of the list with its 19 wins out of 30 appearances at the finals. Real Madrid, which happens to be both the inaugural and the current title holder, gave Spain 14 out of the 19 wins, with the remaining 5 won by Barcelona. Juventus made the most runner-up down the years. Lastly, we observed that the distribution of the scores skewed to the right while also including a draw, indicating a tough and fiercely contested League.

You are welcome to contact DataXotic for questions or extra materials on this project.

 

Back To Project