FIFA 23 players analysis

Fawaz Babatunde

FIFA 23

Title: Nationality and Player Ratings in Professional Football: An Analysis of the FIFA 23 Player Dataset

Background

In professional football, players are often evaluated based on a variety of attributes, such as their speed, skill, and overall rating. However, it is not clear whether there are any differences in player ratings based on the players' nationalities. This research aims to explore the relationship between a football player's nationality and their ratings using data from the FIFA 23 player dataset.

Research Task

Is there a relationship between a football player's nationality and their overall rating, and if so, what are the key factors that contribute to this relationship?

Objectives

To explore the distribution of players by nationality in the FIFA 23 player dataset. To investigate the relationship between a player's nationality and their overall rating. To identify any key factors that contribute to the relationship between nationality and player ratings.

Data Source

The dataset has been sourced from EA Sports' FIFA 23, a football simulation video game published by Electronic Arts. FIFA 23 marks the 30th and final edition of the FIFA series developed by EA Sports. The dataset contains information about football players such as name, age, nationality, position, ratings and contract deals during the 2022/2023 football season. Data was collected through live tracking, research and tests by FIFA and league officials and analyst covering every match.

Pre-processing

The dataset's records was screened for integrity before any analysis was done. The data integrity was also ensured by making sure the data source was reliable, original, comprehensive, current and cited.

Data privacy and security

To ensure privacy and security in this process. Sensitive personally identifiable information (PII) of the players were not included in this dataset.

Expected Outcomes

A detailed understanding of the distribution of players by nationality in the FIFA 23 player dataset. Identification of any significant relationship between a player's nationality and their overall rating. Identification of any key factors that contribute to the relationship between nationality and player ratings.

Data Manipulation and Cleaning

The dataset was imported into MS Excel workspace and screened through filtering and sorting to make sure data inputs are consistent, within range and in the right format. Duplicates values found in the dataset were dropped and missing values were filled with accurate values. Dataset was then stored in a secure file using good data naming convention for analysis.

Data analysis with R

We need to conduct some descriptive analysis on the dataset to be able to further investigate the data for trends and patterns. Here are the steps taken.
We load the tidyverse package into our workspace.
In [1]:
library(tidyverse) ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ✔ dplyr 1.1.0 ✔ readr 2.1.4 ✔ forcats 1.0.0 ✔ stringr 1.5.0 ✔ ggplot2 3.4.1 ✔ tibble 3.1.8 ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 ✔ purrr 1.0.1 ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Then we set our working directory to the current folder. This done to make importing data and writing files in a particular directory more easier and efficient.
In [2]:
#setwd("C:/Users/pc/Desktop/Datasets/FIFA")
Importing the dataset that will be needed for the analysis using the read csv function in the readr package.
In [3]:
info <- read_csv('/kaggle/input/fifa-archive/Fifa_23_Players_Data.csv') Rows: 17529 Columns: 89 ── Column specification ──────────────────────────────────────────────────────── Delimiter: "," chr (18): Known As, Full Name, Positions Played, Best Position, Nationality,... dbl (71): Overall, Potential, Value(in Euro), Age, Height(in cm), Weight(in ... ℹ Use `spec()` to retrieve the full column specification for this data. ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Now we inspect our dataset to find out its characters, content, and making sure they are in the right format.
In [4]:
colnames(info) str(info) summary(info) head(info)
'Known As'
'Full Name'
'Overall'
'Potential'
'Value(in Euro)'
'Positions Played'
'Best Position'
'Nationality'
'Image Link'
'Age'
'Height(in cm)'
'Weight(in kg)'
'TotalStats'
'BaseStats'
'Club Name'
'Wage(in Euro)'
'Release Clause'
'Club Position'
'Contract Until'
'Club Jersey Number'
'Joined On'
'On Loan'
'Preferred Foot'
'Weak Foot Rating'
'Skill Moves'
'International Reputation'
'National Team Name'
'National Team Image Link'
'National Team Position'
'National Team Jersey Number'
'Attacking Work Rate'
'Defensive Work Rate'
'Pace Total'
'Shooting Total'
'Passing Total'
'Dribbling Total'
'Defending Total'
'Physicality Total'
'Crossing'
'Finishing'
'Heading Accuracy'
'Short Passing'
'Volleys'
'Dribbling'
'Curve'
'Freekick Accuracy'
'LongPassing'
'BallControl'
'Acceleration'
'Sprint Speed'
'Agility'
'Reactions'
'Balance'
'Shot Power'
'Jumping'
'Stamina'
'Strength'
'Long Shots'
'Aggression'
'Interceptions'
'Positioning'
'Vision'
'Penalties'
'Composure'
'Marking'
'Standing Tackle'
'Sliding Tackle'
'Goalkeeper Diving'
'Goalkeeper Handling'
'GoalkeeperKicking'
'Goalkeeper Positioning'
'Goalkeeper Reflexes'
'ST Rating'
'LW Rating'
'LF Rating'
'CF Rating'
'RF Rating'
'RW Rating'
'CAM Rating'
'LM Rating'
'CM Rating'
'RM Rating'
'LWB Rating'
'CDM Rating'
'RWB Rating'
'LB Rating'
'CB Rating'
'RB Rating'
'GK Rating'
spc_tbl_ [17,529 × 89] (S3: spec_tbl_df/tbl_df/tbl/data.frame) $ Known As : chr [1:17529] "L. Messi" "K. Benzema" "R. Lewandowski" "K. De Bruyne" ... $ Full Name : chr [1:17529] "Lionel Messi" "Karim Benzema" "Robert Lewandowski" "Kevin De Bruyne" ... $ Overall : num [1:17529] 91 91 91 91 91 90 90 90 90 90 ... $ Potential : num [1:17529] 91 91 91 91 95 90 91 90 90 90 ... $ Value(in Euro) : num [1:17529] 5.40e+07 6.40e+07 8.40e+07 1.08e+08 1.90e+08 ... $ Positions Played : chr [1:17529] "RW" "CF,ST" "ST" "CM,CAM" ... $ Best Position : chr [1:17529] "CAM" "CF" "ST" "CM" ... $ Nationality : chr [1:17529] "Argentina" "France" "Poland" "Belgium" ... $ Image Link : chr [1:17529] "https://cdn.sofifa.net/players/158/023/23_60.png" "https://cdn.sofifa.net/players/165/153/23_60.png" "https://cdn.sofifa.net/players/188/545/23_60.png" "https://cdn.sofifa.net/players/192/985/23_60.png" ... $ Age : num [1:17529] 35 34 33 31 23 30 30 36 37 30 ... $ Height(in cm) : num [1:17529] 169 185 185 181 182 175 199 193 187 193 ... $ Weight(in kg) : num [1:17529] 67 81 81 70 73 71 96 93 83 92 ... $ TotalStats : num [1:17529] 2190 2147 2205 2303 2177 ... $ BaseStats : num [1:17529] 452 455 458 483 470 471 473 501 445 461 ... $ Club Name : chr [1:17529] "Paris Saint-Germain" "Real Madrid CF" "FC Barcelona" "Manchester City" ... $ Wage(in Euro) : num [1:17529] 195000 450000 420000 350000 230000 270000 250000 72000 220000 230000 ... $ Release Clause : num [1:17529] 9.99e+07 1.31e+08 1.72e+08 1.99e+08 3.67e+08 ... $ Club Position : chr [1:17529] "RW" "CF" "ST" "CM" ... $ Contract Until : chr [1:17529] "2023" "2023" "2025" "2025" ... $ Club Jersey Number : chr [1:17529] "30" "9" "9" "17" ... $ Joined On : num [1:17529] 2021 2009 2022 2015 2018 ... $ On Loan : chr [1:17529] "-" "-" "-" "-" ... $ Preferred Foot : chr [1:17529] "Left" "Right" "Right" "Right" ... $ Weak Foot Rating : num [1:17529] 4 4 4 5 4 3 3 4 4 3 ... $ Skill Moves : num [1:17529] 4 4 4 4 5 4 1 1 5 2 ... $ International Reputation : num [1:17529] 5 4 5 4 4 4 4 5 5 4 ... $ National Team Name : chr [1:17529] "Argentina" "France" "Poland" "Belgium" ... $ National Team Image Link : chr [1:17529] "https://cdn.sofifa.net/flags/ar.png" "https://cdn.sofifa.net/flags/fr.png" "https://cdn.sofifa.net/flags/pl.png" "https://cdn.sofifa.net/flags/be.png" ... $ National Team Position : chr [1:17529] "RW" "ST" "ST" "RF" ... $ National Team Jersey Number: chr [1:17529] "10" "19" "9" "7" ... $ Attacking Work Rate : chr [1:17529] "Low" "Medium" "High" "High" ... $ Defensive Work Rate : chr [1:17529] "Low" "Medium" "Medium" "High" ... $ Pace Total : num [1:17529] 81 80 75 74 97 90 84 87 81 81 ... $ Shooting Total : num [1:17529] 89 88 91 88 89 89 89 88 92 60 ... $ Passing Total : num [1:17529] 90 83 79 93 80 82 75 91 78 71 ... $ Dribbling Total : num [1:17529] 94 87 86 87 92 90 90 88 85 72 ... $ Defending Total : num [1:17529] 34 39 44 64 36 45 46 56 34 91 ... $ Physicality Total : num [1:17529] 64 78 83 77 76 75 89 91 75 86 ... $ Crossing : num [1:17529] 84 75 71 94 78 80 14 15 80 53 ... $ Finishing : num [1:17529] 90 92 94 85 93 93 14 13 93 52 ... $ Heading Accuracy : num [1:17529] 70 90 91 55 72 59 13 25 90 87 ... $ Short Passing : num [1:17529] 91 89 84 93 85 84 33 60 80 79 ... $ Volleys : num [1:17529] 88 88 89 83 83 84 12 11 86 45 ... $ Dribbling : num [1:17529] 95 87 85 88 93 90 13 30 85 70 ... $ Curve : num [1:17529] 93 82 79 89 80 84 19 14 81 60 ... $ Freekick Accuracy : num [1:17529] 93 73 85 83 69 69 20 11 79 70 ... $ LongPassing : num [1:17529] 90 76 70 93 71 77 35 68 75 86 ... $ BallControl : num [1:17529] 93 91 89 90 91 88 23 46 88 76 ... $ Acceleration : num [1:17529] 87 79 76 76 97 89 42 54 79 68 ... $ Sprint Speed : num [1:17529] 76 80 75 73 97 91 52 60 83 91 ... $ Agility : num [1:17529] 91 78 77 76 93 90 63 51 77 61 ... $ Reactions : num [1:17529] 92 92 93 91 93 93 84 87 94 89 ... $ Balance : num [1:17529] 95 72 82 78 81 91 45 35 67 53 ... $ Shot Power : num [1:17529] 86 87 91 92 88 83 56 68 93 81 ... $ Jumping : num [1:17529] 68 79 85 63 77 69 68 77 95 88 ... $ Stamina : num [1:17529] 70 82 76 88 87 87 38 43 76 74 ... $ Strength : num [1:17529] 68 82 87 74 76 75 70 80 77 93 ... $ Long Shots : num [1:17529] 91 80 84 91 82 85 17 16 90 64 ... $ Aggression : num [1:17529] 44 63 81 75 64 63 23 29 63 85 ... $ Interceptions : num [1:17529] 40 39 49 66 38 55 15 30 29 90 ... $ Positioning : num [1:17529] 93 92 94 88 92 92 13 12 95 47 ... $ Vision : num [1:17529] 94 89 81 94 83 85 44 70 76 65 ... $ Penalties : num [1:17529] 75 84 90 83 80 86 27 47 90 62 ... $ Composure : num [1:17529] 96 90 88 89 88 92 66 70 95 90 ... $ Marking : num [1:17529] 20 43 35 68 26 38 20 17 24 92 ... $ Standing Tackle : num [1:17529] 35 24 42 65 34 43 18 10 32 92 ... $ Sliding Tackle : num [1:17529] 24 18 19 53 32 41 16 11 24 86 ... $ Goalkeeper Diving : num [1:17529] 6 13 15 15 13 14 84 87 7 13 ... $ Goalkeeper Handling : num [1:17529] 11 11 6 13 5 14 89 88 11 10 ... $ GoalkeeperKicking : num [1:17529] 15 5 12 5 7 9 75 91 15 13 ... $ Goalkeeper Positioning : num [1:17529] 14 5 8 10 11 11 89 91 14 11 ... $ Goalkeeper Reflexes : num [1:17529] 8 7 10 13 6 14 90 88 11 11 ... $ ST Rating : num [1:17529] 90 91 91 86 92 89 34 43 90 74 ... $ LW Rating : num [1:17529] 90 87 85 88 90 88 29 40 86 68 ... $ LF Rating : num [1:17529] 91 89 88 87 90 88 31 43 88 70 ... $ CF Rating : num [1:17529] 91 89 88 87 90 88 31 43 88 70 ... $ RF Rating : num [1:17529] 91 89 88 87 90 88 31 43 88 70 ... $ RW Rating : num [1:17529] 90 87 85 88 90 88 29 40 86 68 ... $ CAM Rating : num [1:17529] 91 91 88 91 92 90 35 50 88 73 ... $ LM Rating : num [1:17529] 91 89 86 91 92 90 34 47 87 73 ... $ CM Rating : num [1:17529] 88 84 83 91 84 85 35 53 81 79 ... $ RM Rating : num [1:17529] 91 89 86 91 92 90 34 47 87 73 ... $ LWB Rating : num [1:17529] 67 67 67 82 70 74 32 39 65 83 ... $ CDM Rating : num [1:17529] 66 67 69 82 66 71 34 46 62 88 ... $ RWB Rating : num [1:17529] 67 67 67 82 70 74 32 39 65 83 ... $ LB Rating : num [1:17529] 62 63 64 78 66 70 32 38 61 85 ... $ CB Rating : num [1:17529] 53 58 63 72 57 61 32 37 56 90 ... $ RB Rating : num [1:17529] 62 63 64 78 66 70 32 38 61 85 ... $ GK Rating : num [1:17529] 22 21 22 24 21 25 90 90 23 23 ... - attr(*, "spec")= .. cols( .. `Known As` = col_character(), .. `Full Name` = col_character(), .. Overall = col_double(), .. Potential = col_double(), .. `Value(in Euro)` = col_double(), .. `Positions Played` = col_character(), .. `Best Position` = col_character(), .. Nationality = col_character(), .. `Image Link` = col_character(), .. Age = col_double(), .. `Height(in cm)` = col_double(), .. `Weight(in kg)` = col_double(), .. TotalStats = col_double(), .. BaseStats = col_double(), .. `Club Name` = col_character(), .. `Wage(in Euro)` = col_double(), .. `Release Clause` = col_double(), .. `Club Position` = col_character(), .. `Contract Until` = col_character(), .. `Club Jersey Number` = col_character(), .. `Joined On` = col_double(), .. `On Loan` = col_character(), .. `Preferred Foot` = col_character(), .. `Weak Foot Rating` = col_double(), .. `Skill Moves` = col_double(), .. `International Reputation` = col_double(), .. `National Team Name` = col_character(), .. `National Team Image Link` = col_character(), .. `National Team Position` = col_character(), .. `National Team Jersey Number` = col_character(), .. `Attacking Work Rate` = col_character(), .. `Defensive Work Rate` = col_character(), .. `Pace Total` = col_double(), .. `Shooting Total` = col_double(), .. `Passing Total` = col_double(), .. `Dribbling Total` = col_double(), .. `Defending Total` = col_double(), .. `Physicality Total` = col_double(), .. Crossing = col_double(), .. Finishing = col_double(), .. `Heading Accuracy` = col_double(), .. `Short Passing` = col_double(), .. Volleys = col_double(), .. Dribbling = col_double(), .. Curve = col_double(), .. `Freekick Accuracy` = col_double(), .. LongPassing = col_double(), .. BallControl = col_double(), .. Acceleration = col_double(), .. `Sprint Speed` = col_double(), .. Agility = col_double(), .. Reactions = col_double(), .. Balance = col_double(), .. `Shot Power` = col_double(), .. Jumping = col_double(), .. Stamina = col_double(), .. Strength = col_double(), .. `Long Shots` = col_double(), .. Aggression = col_double(), .. Interceptions = col_double(), .. Positioning = col_double(), .. Vision = col_double(), .. Penalties = col_double(), .. Composure = col_double(), .. Marking = col_double(), .. `Standing Tackle` = col_double(), .. `Sliding Tackle` = col_double(), .. `Goalkeeper Diving` = col_double(), .. `Goalkeeper Handling` = col_double(), .. GoalkeeperKicking = col_double(), .. `Goalkeeper Positioning` = col_double(), .. `Goalkeeper Reflexes` = col_double(), .. `ST Rating` = col_double(), .. `LW Rating` = col_double(), .. `LF Rating` = col_double(), .. `CF Rating` = col_double(), .. `RF Rating` = col_double(), .. `RW Rating` = col_double(), .. `CAM Rating` = col_double(), .. `LM Rating` = col_double(), .. `CM Rating` = col_double(), .. `RM Rating` = col_double(), .. `LWB Rating` = col_double(), .. `CDM Rating` = col_double(), .. `RWB Rating` = col_double(), .. `LB Rating` = col_double(), .. `CB Rating` = col_double(), .. `RB Rating` = col_double(), .. `GK Rating` = col_double() .. ) - attr(*, "problems")=<externalptr> Known As Full Name Overall Potential Length:17529 Length:17529 Min. :47.00 Min. :48.00 Class :character Class :character 1st Qu.:62.00 1st Qu.:67.00 Mode :character Mode :character Median :66.00 Median :71.00 Mean :65.94 Mean :71.04 3rd Qu.:70.00 3rd Qu.:75.00 Max. :91.00 Max. :95.00 Value(in Euro) Positions Played Best Position Nationality Min. : 0 Length:17529 Length:17529 Length:17529 1st Qu.: 500000 Class :character Class :character Class :character Median : 1000000 Mode :character Mode :character Mode :character Mean : 2931541 3rd Qu.: 2000000 Max. :190500000 Image Link Age Height(in cm) Weight(in kg) Length:17529 Min. :16.0 Min. :155.0 Min. : 49.00 Class :character 1st Qu.:22.0 1st Qu.:177.0 1st Qu.: 70.00 Mode :character Median :25.0 Median :182.0 Median : 75.00 Mean :25.3 Mean :181.6 Mean : 75.22 3rd Qu.:29.0 3rd Qu.:186.0 3rd Qu.: 80.00 Max. :44.0 Max. :206.0 Max. :105.00 TotalStats BaseStats Club Name Wage(in Euro) Min. : 759 Min. :224.0 Length:17529 Min. : 0 1st Qu.:1471 1st Qu.:331.0 Class :character 1st Qu.: 1000 Median :1642 Median :359.0 Mode :character Median : 3000 Mean :1604 Mean :358.4 Mean : 9007 3rd Qu.:1789 3rd Qu.:385.0 3rd Qu.: 8000 Max. :2312 Max. :502.0 Max. :450000 Release Clause Club Position Contract Until Club Jersey Number Min. : 0 Length:17529 Length:17529 Length:17529 1st Qu.: 674000 Class :character Class :character Class :character Median : 1500000 Mode :character Mode :character Mode :character Mean : 5171944 3rd Qu.: 3400000 Max. :366700000 Joined On On Loan Preferred Foot Weak Foot Rating Min. :2002 Length:17529 Length:17529 Min. :1.000 1st Qu.:2020 Class :character Class :character 1st Qu.:3.000 Median :2021 Mode :character Mode :character Median :3.000 Mean :2020 Mean :2.948 3rd Qu.:2022 3rd Qu.:3.000 Max. :2022 Max. :5.000 Skill Moves International Reputation National Team Name Min. :1.000 Min. :1.00 Length:17529 1st Qu.:2.000 1st Qu.:1.00 Class :character Median :2.000 Median :1.00 Mode :character Mean :2.367 Mean :1.09 3rd Qu.:3.000 3rd Qu.:1.00 Max. :5.000 Max. :5.00 National Team Image Link National Team Position National Team Jersey Number Length:17529 Length:17529 Length:17529 Class :character Class :character Class :character Mode :character Mode :character Mode :character Attacking Work Rate Defensive Work Rate Pace Total Shooting Total Length:17529 Length:17529 Min. :28.00 Min. :16.0 Class :character Class :character 1st Qu.:62.00 1st Qu.:44.0 Mode :character Mode :character Median :68.00 Median :56.0 Mean :67.99 Mean :53.9 3rd Qu.:75.00 3rd Qu.:64.0 Max. :97.00 Max. :92.0 Passing Total Dribbling Total Defending Total Physicality Total Min. :25.00 Min. :28.00 Min. :15.0 Min. :30.00 1st Qu.:52.00 1st Qu.:58.00 1st Qu.:36.0 1st Qu.:59.00 Median :59.00 Median :64.00 Median :54.0 Median :66.00 Mean :58.12 Mean :63.19 Mean :50.3 Mean :64.86 3rd Qu.:65.00 3rd Qu.:69.00 3rd Qu.:64.0 3rd Qu.:72.00 Max. :93.00 Max. :94.00 Max. :91.0 Max. :91.00 Crossing Finishing Heading Accuracy Short Passing Min. : 6.00 Min. : 3.0 Min. : 5.00 Min. :10.00 1st Qu.:39.00 1st Qu.:31.0 1st Qu.:44.00 1st Qu.:55.00 Median :54.00 Median :50.0 Median :55.00 Median :62.00 Mean :49.51 Mean :46.3 Mean :51.91 Mean :59.14 3rd Qu.:63.00 3rd Qu.:62.0 3rd Qu.:64.00 3rd Qu.:68.00 Max. :94.00 Max. :94.0 Max. :93.00 Max. :93.00 Volleys Dribbling Curve Freekick Accuracy Min. : 3.00 Min. : 3.00 Min. : 6.00 Min. : 4.00 1st Qu.:30.00 1st Qu.:51.00 1st Qu.:36.00 1st Qu.:32.00 Median :44.00 Median :61.00 Median :50.00 Median :43.00 Mean :42.61 Mean :55.92 Mean :47.75 Mean :43.07 3rd Qu.:56.00 3rd Qu.:68.00 3rd Qu.:61.00 3rd Qu.:56.00 Max. :90.00 Max. :95.00 Max. :93.00 Max. :94.00 LongPassing BallControl Acceleration Sprint Speed Min. : 9.00 Min. : 5.00 Min. :14.00 Min. :15.00 1st Qu.:45.00 1st Qu.:55.00 1st Qu.:57.00 1st Qu.:57.00 Median :56.00 Median :63.00 Median :68.00 Median :68.00 Mean :53.63 Mean :58.56 Mean :64.69 Mean :64.77 3rd Qu.:64.00 3rd Qu.:69.00 3rd Qu.:75.00 3rd Qu.:75.00 Max. :93.00 Max. :94.00 Max. :97.00 Max. :97.00 Agility Reactions Balance Shot Power Min. :19.00 Min. :30.00 Min. :20.00 Min. :18.00 1st Qu.:55.00 1st Qu.:56.00 1st Qu.:55.00 1st Qu.:48.00 Median :66.00 Median :62.00 Median :66.00 Median :59.00 Mean :63.51 Mean :61.64 Mean :64.01 Mean :57.95 3rd Qu.:74.00 3rd Qu.:68.00 3rd Qu.:74.00 3rd Qu.:68.00 Max. :94.00 Max. :94.00 Max. :95.00 Max. :94.00 Jumping Stamina Strength Long Shots Min. :22.00 Min. :14.00 Min. :25.00 Min. : 4.00 1st Qu.:57.00 1st Qu.:56.00 1st Qu.:57.00 1st Qu.:33.00 Median :66.00 Median :66.00 Median :66.00 Median :51.00 Mean :64.82 Mean :63.07 Mean :65.24 Mean :46.89 3rd Qu.:73.00 3rd Qu.:74.00 3rd Qu.:74.00 3rd Qu.:62.00 Max. :95.00 Max. :95.00 Max. :96.00 Max. :91.00 Aggression Interceptions Positioning Vision Min. :10.00 Min. : 3.00 Min. : 2.00 Min. :10.00 1st Qu.:45.00 1st Qu.:26.00 1st Qu.:40.00 1st Qu.:45.00 Median :59.00 Median :54.00 Median :56.00 Median :56.00 Mean :55.74 Mean :46.88 Mean :50.55 Mean :54.28 3rd Qu.:68.00 3rd Qu.:64.00 3rd Qu.:65.00 3rd Qu.:64.00 Max. :95.00 Max. :91.00 Max. :96.00 Max. :94.00 Penalties Composure Marking Standing Tackle Min. : 6.00 Min. :13.00 Min. : 3.00 Min. : 6.00 1st Qu.:39.00 1st Qu.:51.00 1st Qu.:29.00 1st Qu.:28.00 Median :49.00 Median :59.00 Median :53.00 Median :56.00 Mean :48.04 Mean :58.15 Mean :46.77 Mean :48.42 3rd Qu.:60.00 3rd Qu.:66.00 3rd Qu.:63.00 3rd Qu.:66.00 Max. :92.00 Max. :96.00 Max. :92.00 Max. :93.00 Sliding Tackle Goalkeeper Diving Goalkeeper Handling GoalkeeperKicking Min. : 6.00 Min. : 2.00 Min. : 2.00 Min. : 2.00 1st Qu.:26.00 1st Qu.: 8.00 1st Qu.: 8.00 1st Qu.: 8.00 Median :53.00 Median :11.00 Median :11.00 Median :11.00 Mean :46.27 Mean :16.48 Mean :16.22 Mean :16.12 3rd Qu.:63.00 3rd Qu.:14.00 3rd Qu.:14.00 3rd Qu.:14.00 Max. :90.00 Max. :90.00 Max. :90.00 Max. :93.00 Goalkeeper Positioning Goalkeeper Reflexes ST Rating LW Rating Min. : 2.00 Min. : 2.00 Min. :19.00 Min. :14.00 1st Qu.: 8.00 1st Qu.: 8.00 1st Qu.:51.00 1st Qu.:50.00 Median :11.00 Median :11.00 Median :60.00 Median :60.00 Mean :16.27 Mean :16.53 Mean :56.77 Mean :55.85 3rd Qu.:14.00 3rd Qu.:14.00 3rd Qu.:66.00 3rd Qu.:66.00 Max. :91.00 Max. :90.00 Max. :92.00 Max. :90.00 LF Rating CF Rating RF Rating RW Rating Min. :15.00 Min. :15.00 Min. :15.00 Min. :14.00 1st Qu.:50.00 1st Qu.:50.00 1st Qu.:50.00 1st Qu.:50.00 Median :59.00 Median :59.00 Median :59.00 Median :60.00 Mean :55.76 Mean :55.76 Mean :55.76 Mean :55.85 3rd Qu.:65.00 3rd Qu.:65.00 3rd Qu.:65.00 3rd Qu.:66.00 Max. :91.00 Max. :91.00 Max. :91.00 Max. :90.00 CAM Rating LM Rating CM Rating RM Rating Min. :17.00 Min. :18.00 Min. :18.00 Min. :18.00 1st Qu.:52.00 1st Qu.:54.00 1st Qu.:53.00 1st Qu.:54.00 Median :61.00 Median :62.00 Median :60.00 Median :62.00 Mean :57.99 Mean :58.48 Mean :57.43 Mean :58.48 3rd Qu.:67.00 3rd Qu.:67.00 3rd Qu.:66.00 3rd Qu.:67.00 Max. :92.00 Max. :92.00 Max. :91.00 Max. :92.00 LWB Rating CDM Rating RWB Rating LB Rating Min. :17.00 Min. :19.00 Min. :17.00 Min. :17.00 1st Qu.:51.00 1st Qu.:49.00 1st Qu.:51.00 1st Qu.:49.00 Median :59.00 Median :59.00 Median :59.00 Median :59.00 Mean :56.31 Mean :55.98 Mean :56.31 Mean :55.68 3rd Qu.:66.00 3rd Qu.:66.00 3rd Qu.:66.00 3rd Qu.:65.00 Max. :88.00 Max. :89.00 Max. :88.00 Max. :87.00 CB Rating RB Rating GK Rating Min. :18.00 Min. :17.00 Min. :10.00 1st Qu.:45.00 1st Qu.:49.00 1st Qu.:17.00 Median :58.00 Median :59.00 Median :18.00 Mean :54.57 Mean :55.68 Mean :23.33 3rd Qu.:66.00 3rd Qu.:65.00 3rd Qu.:20.00 Max. :90.00 Max. :87.00 Max. :90.00 Known AsFull NameOverallPotentialValue(in Euro)Positions PlayedBest PositionNationalityImage LinkAge⋯LM RatingCM RatingRM RatingLWB RatingCDM RatingRWB RatingLB RatingCB RatingRB RatingGK Rating <chr><chr><dbl><dbl><dbl><chr><chr><chr><chr><dbl>⋯<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl> L. Messi Lionel Messi 9191 54000000RW CAMArgentinahttps://cdn.sofifa.net/players/158/023/23_60.png35⋯91889167666762536222 K. Benzema Karim Benzema 9191 64000000CF,ST CF France https://cdn.sofifa.net/players/165/153/23_60.png34⋯89848967676763586321 R. LewandowskiRobert Lewandowski9191 84000000ST ST Poland https://cdn.sofifa.net/players/188/545/23_60.png33⋯86838667696764636422 K. De Bruyne Kevin De Bruyne 9191107500000CM,CAMCM Belgium https://cdn.sofifa.net/players/192/985/23_60.png31⋯91919182828278727824 K. Mbappé Kylian Mbappé 9195190500000ST,LW ST France https://cdn.sofifa.net/players/231/747/23_60.png23⋯92849270667066576621 M. Salah Mohamed Salah 9090115500000RW RW Egypt https://cdn.sofifa.net/players/209/331/23_60.png30⋯90859074717470617025
We create another version of the dataset which will only include columns needed for the descriptive analysis.
In [5]:
info_v2 <- select(info, `Known As`, `Full Name`, Overall, Nationality, Age, `Height(in cm)`, `Weight(in kg)`) str(info_v2) tibble [17,529 × 7] (S3: tbl_df/tbl/data.frame) $ Known As : chr [1:17529] "L. Messi" "K. Benzema" "R. Lewandowski" "K. De Bruyne" ... $ Full Name : chr [1:17529] "Lionel Messi" "Karim Benzema" "Robert Lewandowski" "Kevin De Bruyne" ... $ Overall : num [1:17529] 91 91 91 91 91 90 90 90 90 90 ... $ Nationality : chr [1:17529] "Argentina" "France" "Poland" "Belgium" ... $ Age : num [1:17529] 35 34 33 31 23 30 30 36 37 30 ... $ Height(in cm): num [1:17529] 169 185 185 181 182 175 199 193 187 193 ... $ Weight(in kg): num [1:17529] 67 81 81 70 73 71 96 93 83 92 ...
AFter filtering and sorting the dataset, we start our descriptive analysis.
First, we find out the number of players in each country.
In [6]:
info_v20 <- info_v2 %>% group_by(Nationality) %>% summarise(No_of_players = length(`Full Name`))
Then, we perform further analysis on players based on their countries measures such as the average rating, tallest, shortest, age and weight.
In [7]:
info_v21 <- info_v2 %>% group_by(Nationality)%>% summarise(avg_rating = mean(Overall), Midpoint_rating = median(Overall), lowest_rating= min(Overall), highest_rating= max(Overall)) info_v22 <- info_v2 %>% group_by(Nationality) %>% summarise(avg_age = mean(Age), Midpoint_age = median(Age), lowest_age= min(Age), highest_Age= max(Age)) info_v23 <- info_v2 %>% group_by(Nationality) %>% summarise(avg_height = mean(`Height(in cm)`), Midpoint_height = median(`Height(in cm)`), shortest= min(`Height(in cm)`), tallest= max(`Height(in cm)`)) info_v24 <- info_v2 %>% group_by(Nationality) %>% summarise(avg_weight = mean(`Weight(in kg)`), Midpoint_weight = median(`Weight(in kg)`), lowest_weight= min(`Weight(in kg)`), highest_weight= max(`Weight(in kg)`))
After our descriptive analysis on the dataset, we need to compile all our results in a table for easy comparison and for creating visualizations.
In [8]:
sum_viz <- bind_cols(info_v20, info_v21, info_v22, info_v23, info_v24) colnames(sum_viz) sum_viz <- sum_viz[,-c(3,8,13,18)] sum_viz <- rename(sum_viz, Country = Nationality...1) str(sum_viz) New names: • `Nationality` -> `Nationality...1` • `Nationality` -> `Nationality...3` • `Nationality` -> `Nationality...8` • `Nationality` -> `Nationality...13` • `Nationality` -> `Nationality...18`
'Nationality...1'
'No_of_players'
'Nationality...3'
'avg_rating'
'Midpoint_rating'
'lowest_rating'
'highest_rating'
'Nationality...8'
'avg_age'
'Midpoint_age'
'lowest_age'
'highest_Age'
'Nationality...13'
'avg_height'
'Midpoint_height'
'shortest'
'tallest'
'Nationality...18'
'avg_weight'
'Midpoint_weight'
'lowest_weight'
'highest_weight'
tibble [159 × 18] (S3: tbl_df/tbl/data.frame) $ Country : chr [1:159] "Afghanistan" "Albania" "Algeria" "Andorra" ... $ No_of_players : int [1:159] 1 49 57 1 20 3 871 8 262 281 ... $ avg_rating : num [1:159] 63 67.4 69.3 62 68.8 ... $ Midpoint_rating: num [1:159] 63 67 69 62 69.5 62 69 68 62 66 ... $ lowest_rating : num [1:159] 63 51 53 62 57 62 55 65 49 52 ... $ highest_rating : num [1:159] 63 79 86 62 79 68 91 81 78 86 ... $ avg_age : num [1:159] 22 25.6 26.2 20 26.5 ... $ Midpoint_age : num [1:159] 22 25 26 20 28 26 26 29.5 24 25 ... $ lowest_age : num [1:159] 22 18 18 20 20 24 16 22 16 18 ... $ highest_Age : num [1:159] 22 33 34 20 32 27 42 36 40 40 ... $ avg_height : num [1:159] 185 183 180 190 178 ... $ Midpoint_height: num [1:159] 185 183 181 190 178 ... $ shortest : num [1:159] 185 172 168 190 168 178 156 172 158 168 ... $ tallest : num [1:159] 185 194 191 190 193 181 197 187 200 200 ... $ avg_weight : num [1:159] 71 75.7 73.7 78 74 ... $ Midpoint_weight: num [1:159] 71 75 72 78 73.5 75 75 75.5 75 76 ... $ lowest_weight : num [1:159] 71 63 60 78 60 73 56 68 58 60 ... $ highest_weight : num [1:159] 71 92 92 78 91 80 99 86 95 94 ...
We create a summary dataset with our table, which we can easily import into Tableau to create visualizations.
In [9]:
#write.csv(sum_viz, file = 'C:/Users/pc/Desktop/Datasets/FIFA/sum_viz.csv')

Data Visualization with Tableau

After gaining some insights and summarizing the data, we create efficient visualizations as this is the best way to communicate and share our findings.
This FIFA player distribution tree map shows the distribution of players by nationality with each box representing a different country and the size of the box proportional to the number of players from that country.
This is a dashboard showing the world map, a table and the average ratings of players by their nationality.
This scatter plot shows the relationship the number of players and their average rating by their nationality.
The interactive version of the visualizations can be found here

Insights

From the analysis and visualizations. We can identify relationships between a player's nationality and their overall rating in professional football. The findings may be useful for football clubs, gamers and scouts in identifying high-performing players from different nationalities.
The majority of players in FIFA 23 originate from countries represented in Europe's top 5 leagues and South America's top 2 leagues.
FIFA 23 features players from diverse continents including South America, Asia, Europe, Africa and North America, with a relatively even distribution across the globe. However, Europe stands out as the continent with the highest representation of players in the game.
The abundance of European countries in FIFA 23 is apparent, which may be attributed to the fact that the top 5 global football leagues are located in Europe, and European football competitions rank among the most widely televised events in the sport.
The analysis revealed that there was little to no correlation between a player's country and their overall rating in FIFA 23. Furthermore, the ratings were evenly distributed across all countries, with an average range of 55 to 60 rating.

Conclusions

In conclusion, FIFA 23 appears to have a well-distributed player population across the globe, with a considerable number of players having similar overall ratings. This suggests that the game developers have put significant effort into ensuring fair play and balance in the ratings system. However, it's worth noting that playing with a team from one of the top-rated countries could still provide an advantage over teams from countries with average ratings.
To gain a deeper understanding of the relationship between a player's nationality and their overall rating in professional football, further analysis such as regression analysis could be conducted. Controlling for other factors such as average age, height, and weight could provide valuable insights into how these variables contribute to a player's overall rating.
Based on this analysis, we recommend that gamers and coaches take advantage of the diverse player population in FIFA 23 to create balanced and competitive teams. Additionally, further research could be conducted to explore the impact of other factors, such as playing style or team tactics, on player ratings in FIFA 23.

License

This Notebook has been released under the Apache 2.0 open source license.

Continue exploring

Like this project
0

Posted Aug 20, 2023

Explore and run machine learning code with Kaggle Notebooks | Using data from FIFA 23 Player Research

Babatunde Zenith’s Post
Babatunde Zenith’s Post
Data Visualization and Cleaning of Sales Analysis
Data Visualization and Cleaning of Sales Analysis