Main dataset
The dataset consists of 18,147 players (after dropping 60 NAs) which are real world footballers translated into FIFA game engine by EA Sports. It was downloaded from Kaggle. Before we take a first look at the summarized statistics I will list below the packages that helped greatly during the process of analysis.
library(knitr)
library(kableExtra)
library(tidyr)
library(dplyr)
library(GGally)
library(gridExtra)
library(FactoMineR)
library(corrplot)
library(purrr)
library(factoextra)
library(labdsv)
library(maptools)
library(psych)
library(ClusterR)
The dataset that will be used in this paper is one that has already been subset from the original one which has around 90 variables. It consisted of many useless to this study ones, such as whether the player has in-game face scan or just a generic game engine generated face. What could have had potential impact in this study was a set of four categorical variables describing players. Those were:
- Skills - Rated in stars, min 1 star, max 5 stars; determines player’s ability to pull off skill moves, like the famous roulette
- Weak foot - Rated in stars, min 1 star, max 5 stars; determines player’s ability to pass, shoot, etc. with his not-preferred foot correctly
- Attacking workrate - Can be either High, Medium or Low; determines how much does the player run in attacking zones of the pitch
- Defensive workrate - Can be either High, Medium or Low; determines how much does the player run in defensive zones of the pitch
I decided to leave them out, because they don’t follow the same pattern as the ones mentioned before. They are also much less precise, having only 3 or 5 levels.
Most statistics are pretty self-explanatory with the exception of FKAccuracy, which stands for Free Kick Accuracy - how well one can shoot from this set piece. Also, position refers to players’ preferred positions on the pitch and the game recognizes 28 different ones.
Preview
kable(stats[1:5,], caption="Preview of the main dataset") %>%
kable_styling(bootstrap_options=c("striped", "hover")) %>%
scroll_box(width="780px")
| Name | Position | Crossing | Finishing | HeadingAccuracy | ShortPassing | Volleys | Dribbling | Curve | FKAccuracy | LongPassing | BallControl | Acceleration | SprintSpeed | Agility | Reactions | Balance | ShotPower | Jumping | Stamina | Strength | LongShots | Aggression | Interceptions | Positioning | Vision | Penalties | Composure | Marking | StandingTackle | SlidingTackle | GKDiving | GKHandling | GKKicking | GKPositioning | GKReflexes | Total |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| L. Messi | RF | 84 | 95 | 70 | 90 | 86 | 97 | 93 | 94 | 87 | 96 | 91 | 86 | 91 | 95 | 95 | 85 | 68 | 72 | 59 | 94 | 48 | 22 | 94 | 94 | 75 | 96 | 33 | 28 | 26 | 6 | 11 | 15 | 14 | 8 | 2298 |
| Cristiano Ronaldo | ST | 84 | 94 | 89 | 81 | 87 | 88 | 81 | 76 | 77 | 94 | 89 | 91 | 87 | 96 | 70 | 95 | 95 | 88 | 79 | 93 | 63 | 29 | 95 | 82 | 85 | 95 | 28 | 31 | 23 | 7 | 11 | 15 | 14 | 11 | 2323 |
| Neymar Jr | LW | 79 | 87 | 62 | 84 | 84 | 96 | 88 | 87 | 78 | 95 | 94 | 90 | 96 | 94 | 84 | 80 | 61 | 81 | 49 | 82 | 56 | 36 | 89 | 87 | 81 | 94 | 27 | 24 | 33 | 9 | 9 | 15 | 15 | 11 | 2237 |
| De Gea | GK | 17 | 13 | 21 | 50 | 13 | 18 | 21 | 19 | 51 | 42 | 57 | 58 | 60 | 90 | 43 | 31 | 67 | 43 | 64 | 12 | 38 | 30 | 12 | 68 | 40 | 68 | 15 | 21 | 13 | 90 | 85 | 87 | 88 | 94 | 1539 |
| K. De Bruyne | RCM | 93 | 82 | 55 | 92 | 82 | 86 | 85 | 83 | 91 | 91 | 78 | 76 | 79 | 91 | 77 | 91 | 63 | 90 | 75 | 91 | 76 | 61 | 87 | 94 | 79 | 88 | 68 | 58 | 51 | 15 | 13 | 5 | 10 | 13 | 2369 |
Summary
kable(summary(stats), caption="Summary of the main dataset") %>%
kable_styling(bootstrap_options=c("striped", "hover")) %>%
scroll_box(width="780px")
| Name | Position | Crossing | Finishing | HeadingAccuracy | ShortPassing | Volleys | Dribbling | Curve | FKAccuracy | LongPassing | BallControl | Acceleration | SprintSpeed | Agility | Reactions | Balance | ShotPower | Jumping | Stamina | Strength | LongShots | Aggression | Interceptions | Positioning | Vision | Penalties | Composure | Marking | StandingTackle | SlidingTackle | GKDiving | GKHandling | GKKicking | GKPositioning | GKReflexes | Total | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Length:18147 | ST :2152 | Min. : 5.00 | Min. : 2.00 | Min. : 4.0 | Min. : 7.0 | Min. : 4.00 | Min. : 4.00 | Min. : 6.00 | Min. : 3.00 | Min. : 9.00 | Min. : 5.00 | Min. :12.00 | Min. :12.00 | Min. :14.0 | Min. :21.00 | Min. :16.00 | Min. : 2.00 | Min. :15.00 | Min. :12.00 | Min. :17.00 | Min. : 3.00 | Min. :11.00 | Min. : 3.0 | Min. : 2.00 | Min. :10.00 | Min. : 5.00 | Min. : 3.00 | Min. : 3.00 | Min. : 2.0 | Min. : 3.00 | Min. : 1.00 | Min. : 1.00 | Min. : 1.00 | Min. : 1.00 | Min. : 1.00 | Min. : 754 | |
| Class :character | GK :2025 | 1st Qu.:38.00 | 1st Qu.:30.00 | 1st Qu.:44.0 | 1st Qu.:54.0 | 1st Qu.:30.00 | 1st Qu.:49.00 | 1st Qu.:34.00 | 1st Qu.:31.00 | 1st Qu.:43.00 | 1st Qu.:54.00 | 1st Qu.:57.00 | 1st Qu.:57.00 | 1st Qu.:55.0 | 1st Qu.:56.00 | 1st Qu.:56.00 | 1st Qu.:45.00 | 1st Qu.:58.00 | 1st Qu.:56.00 | 1st Qu.:58.00 | 1st Qu.:33.00 | 1st Qu.:44.00 | 1st Qu.:26.0 | 1st Qu.:38.00 | 1st Qu.:44.00 | 1st Qu.:39.00 | 1st Qu.:51.00 | 1st Qu.:30.00 | 1st Qu.:27.0 | 1st Qu.:24.00 | 1st Qu.: 8.00 | 1st Qu.: 8.00 | 1st Qu.: 8.00 | 1st Qu.: 8.00 | 1st Qu.: 8.00 | 1st Qu.:1509 | |
| Mode :character | CB :1778 | Median :54.00 | Median :49.00 | Median :56.0 | Median :62.0 | Median :44.00 | Median :61.00 | Median :48.00 | Median :41.00 | Median :56.00 | Median :63.00 | Median :67.00 | Median :67.00 | Median :66.0 | Median :62.00 | Median :66.00 | Median :59.00 | Median :66.00 | Median :66.00 | Median :67.00 | Median :51.00 | Median :59.00 | Median :52.0 | Median :55.00 | Median :55.00 | Median :49.00 | Median :60.00 | Median :53.00 | Median :55.0 | Median :52.00 | Median :11.00 | Median :11.00 | Median :11.00 | Median :11.00 | Median :11.00 | Median :1695 | |
| NA | CM :1394 | Mean :49.74 | Mean :45.55 | Mean :52.3 | Mean :58.7 | Mean :42.91 | Mean :55.38 | Mean :47.18 | Mean :42.87 | Mean :52.72 | Mean :58.37 | Mean :64.61 | Mean :64.73 | Mean :63.5 | Mean :61.84 | Mean :63.96 | Mean :55.47 | Mean :65.09 | Mean :63.22 | Mean :65.32 | Mean :47.11 | Mean :55.88 | Mean :46.7 | Mean :49.96 | Mean :53.41 | Mean :48.55 | Mean :58.65 | Mean :47.29 | Mean :47.7 | Mean :45.67 | Mean :16.62 | Mean :16.39 | Mean :16.23 | Mean :16.39 | Mean :16.71 | Mean :1657 | |
| NA | LB :1322 | 3rd Qu.:64.00 | 3rd Qu.:62.00 | 3rd Qu.:64.0 | 3rd Qu.:68.0 | 3rd Qu.:57.00 | 3rd Qu.:68.00 | 3rd Qu.:62.00 | 3rd Qu.:57.00 | 3rd Qu.:64.00 | 3rd Qu.:69.00 | 3rd Qu.:75.00 | 3rd Qu.:75.00 | 3rd Qu.:74.0 | 3rd Qu.:68.00 | 3rd Qu.:74.00 | 3rd Qu.:68.00 | 3rd Qu.:73.00 | 3rd Qu.:74.00 | 3rd Qu.:74.00 | 3rd Qu.:62.00 | 3rd Qu.:69.00 | 3rd Qu.:64.0 | 3rd Qu.:64.00 | 3rd Qu.:64.00 | 3rd Qu.:60.00 | 3rd Qu.:67.00 | 3rd Qu.:64.00 | 3rd Qu.:66.0 | 3rd Qu.:64.00 | 3rd Qu.:14.00 | 3rd Qu.:14.00 | 3rd Qu.:14.00 | 3rd Qu.:14.00 | 3rd Qu.:14.00 | 3rd Qu.:1852 | |
| NA | RB :1291 | Max. :93.00 | Max. :95.00 | Max. :94.0 | Max. :93.0 | Max. :90.00 | Max. :97.00 | Max. :94.00 | Max. :94.00 | Max. :93.00 | Max. :96.00 | Max. :97.00 | Max. :96.00 | Max. :96.0 | Max. :96.00 | Max. :96.00 | Max. :95.00 | Max. :95.00 | Max. :96.00 | Max. :97.00 | Max. :94.00 | Max. :95.00 | Max. :92.0 | Max. :95.00 | Max. :94.00 | Max. :92.00 | Max. :96.00 | Max. :94.00 | Max. :93.0 | Max. :91.00 | Max. :90.00 | Max. :92.00 | Max. :91.00 | Max. :90.00 | Max. :94.00 | Max. :2431 | |
| NA | (Other):8185 | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA | NA |