## [1] 16643 22
## [1] "ID" "Name" "Age" "Nationality"
## [5] "Overall" "Potential" "Club" "ClubName"
## [9] "ClubTop20" "WageK" "PreferredFoot" "Reputation"
## [13] "WeakFoot" "SkillMoves" "Position" "ShortPassing"
## [17] "Dribbling" "BallControl" "Agility" "Stamina"
## [21] "StandingTackle" "ReleaseClauseM"
## Classes 'data.table' and 'data.frame': 16643 obs. of 22 variables:
## $ ID : int 161804 239428 244978 243434 244823 232105 236216 162054 135587 129566 ...
## $ Name : Factor w/ 15773 levels "A. ?ati?","A. ?ermák",..: 11750 704 3575 5436 11191 12876 4158 9567 11296 12089 ...
## $ Age : int 36 20 22 18 18 21 20 33 33 32 ...
## $ Nationality : Factor w/ 161 levels "Afghanistan",..: 100 144 144 32 30 54 61 47 54 125 ...
## $ Overall : int 65 51 51 50 47 63 61 69 69 68 ...
## $ Potential : int 65 62 60 68 64 69 72 69 69 68 ...
## $ Club : Factor w/ 651 levels " SSV Jahn Regensburg",..: 368 241 243 316 600 301 301 55 98 472 ...
## $ ClubName : Factor w/ 21 levels "Others","01RealMadrid",..: 1 1 1 1 1 1 1 1 1 1 ...
## $ ClubTop20 : Factor w/ 2 levels "No","Yes": 1 1 1 1 1 1 1 1 1 1 ...
## $ WageK : int 2 2 2 1 1 1 1 7 14 12 ...
## $ PreferredFoot : Factor w/ 2 levels "Left","Right": 2 1 2 1 2 2 1 2 2 2 ...
## $ Reputation : int 1 1 1 1 1 1 1 1 1 1 ...
## $ WeakFoot : int 4 3 3 3 2 3 3 2 3 3 ...
## $ SkillMoves : int 2 2 2 2 2 2 2 1 1 2 ...
## $ Position : Factor w/ 4 levels "Forward","Defence",..: 2 4 4 2 2 2 1 3 3 2 ...
## $ ShortPassing : int 64 58 60 29 27 57 48 18 31 61 ...
## $ Dribbling : int 61 46 46 25 46 57 64 16 17 39 ...
## $ BallControl : int 62 49 46 28 29 57 61 34 16 63 ...
## $ Agility : int 67 59 53 42 55 75 85 54 55 47 ...
## $ Stamina : int 67 52 40 61 54 74 62 33 38 53 ...
## $ StandingTackle: int 63 52 34 52 48 58 25 20 9 65 ...
## $ ReleaseClauseM: num 0.099 0.099 0.099 0.099 0.099 0.999 0.999 0.998 0.998 0.998 ...
## - attr(*, ".internal.selfref")=<externalptr>
## Age Nationality Overall Potential
## Min. :16.00 England : 1475 Min. :46.00 Min. :48.00
## 1st Qu.:21.00 Germany : 1151 1st Qu.:62.00 1st Qu.:67.00
## Median :25.00 Spain : 974 Median :66.00 Median :71.00
## Mean :25.23 France : 853 Mean :66.16 Mean :71.14
## 3rd Qu.:29.00 Argentina: 833 3rd Qu.:71.00 3rd Qu.:75.00
## Max. :45.00 Brazil : 788 Max. :94.00 Max. :95.00
## (Other) :10569
## Club ClubName ClubTop20
## Arsenal : 33 Others :16042 No :16042
## AS Monaco : 33 01RealMadrid : 33 Yes: 601
## Atlético Madrid: 33 02FCBarcelona : 33
## Burnley : 33 03ManchesterUnited: 33
## FC Barcelona : 33 05ManchesterCity : 33
## Liverpool : 33 07Arsenal : 33
## (Other) :16445 (Other) : 436
## WageK PreferredFoot Reputation WeakFoot SkillMoves
## Min. : 1.000 Left : 3820 Min. :1.000 Min. :1.000 Min. :1.00
## 1st Qu.: 1.000 Right:12823 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:2.00
## Median : 3.000 Median :1.000 Median :3.000 Median :2.00
## Mean : 9.618 Mean :1.115 Mean :2.943 Mean :2.35
## 3rd Qu.: 8.000 3rd Qu.:1.000 3rd Qu.:3.000 3rd Qu.:3.00
## Max. :565.000 Max. :5.000 Max. :5.000 Max. :5.00
##
## Position ShortPassing Dribbling BallControl
## Forward :3044 Min. : 7.00 Min. : 4.0 Min. : 5.00
## Defence :5438 1st Qu.:53.00 1st Qu.:48.0 1st Qu.:54.00
## GoalKeeper:1900 Median :62.00 Median :61.0 Median :63.00
## MidField :6261 Mean :58.54 Mean :55.1 Mean :58.14
## 3rd Qu.:68.00 3rd Qu.:68.0 3rd Qu.:69.00
## Max. :93.00 Max. :97.0 Max. :96.00
##
## Agility Stamina StandingTackle ReleaseClauseM
## Min. :14.00 Min. :12.00 Min. : 2.00 Min. : 0.013
## 1st Qu.:55.00 1st Qu.:56.00 1st Qu.:27.00 1st Qu.: 0.525
## Median :66.00 Median :66.00 Median :55.00 Median : 1.100
## Mean :63.38 Mean :63.16 Mean :47.78 Mean : 4.585
## 3rd Qu.:74.00 3rd Qu.:74.00 3rd Qu.:66.00 3rd Qu.: 3.500
## Max. :96.00 Max. :96.00 Max. :93.00 Max. :228.100
##
## n mean sd median min max
## ID 16643 213845.01 30546.29 221493.0 16.00 246620.0
## Name* 16643 7854.63 4537.63 7811.0 1.00 15773.0
## Age 16643 25.23 4.72 25.0 16.00 45.0
## Nationality* 16643 76.39 47.14 60.0 1.00 161.0
## Overall 16643 66.16 7.01 66.0 46.00 94.0
## Potential 16643 71.14 6.15 71.0 48.00 95.0
## Club* 16643 325.89 188.21 326.0 1.00 651.0
## ClubName* 16643 1.37 2.19 1.0 1.00 21.0
## ClubTop20* 16643 1.04 0.19 1.0 1.00 2.0
## WageK 16643 9.62 22.26 3.0 1.00 565.0
## PreferredFoot* 16643 1.77 0.42 2.0 1.00 2.0
## Reputation 16643 1.11 0.40 1.0 1.00 5.0
## WeakFoot 16643 2.94 0.66 3.0 1.00 5.0
## SkillMoves 16643 2.35 0.76 2.0 1.00 5.0
## Position* 16643 2.68 1.16 2.0 1.00 4.0
## ShortPassing 16643 58.54 14.81 62.0 7.00 93.0
## Dribbling 16643 55.10 19.01 61.0 4.00 97.0
## BallControl 16643 58.14 16.79 63.0 5.00 96.0
## Agility 16643 63.38 14.81 66.0 14.00 96.0
## Stamina 16643 63.16 16.06 66.0 12.00 96.0
## StandingTackle 16643 47.78 21.68 55.0 2.00 93.0
## ReleaseClauseM 16643 4.59 11.12 1.1 0.01 228.1
## Position
## Forward Defence GoalKeeper MidField
## 18.29 32.67 11.42 37.62
# bar-plot
bp <- barplot(tab3,
xlab = "Position", ylab = "Percent (%)",
main = "Percentages Different Types of Players in the Data",
col = c("lightblue"),
beside = TRUE,
ylim = c(0, 40))
text(bp, 0, round(tab3, 2),cex = 1, pos = 3) ## Reputation
## 1 2 3 4 5
## 90.98 6.93 1.76 0.29 0.04
# bar-plot
bp <- barplot(tab3,
xlab = "Reputation", ylab = "Percent (%)",
main = "Percentages of Players Having International Reputation(1/2/3/4/5)",
col = c("lightblue"),
beside = TRUE,
ylim = c(0, 90))
text(bp, 0, round(tab3, 2),cex = 1, pos = 3) library(data.table)
FifaF.dt <- data.table(FifaF.df)
tab1 <- FifaF.dt[, .(N = .N,
MeanWageK = round(mean(WageK),1),
SdWageK = round(sd(WageK),1)),
by = (Position)][order(-MeanWageK)]
tab1## Position N MeanWageK SdWageK
## 1: Forward 3044 11.4 29.5
## 2: MidField 6261 10.0 21.8
## 3: Defence 5438 9.2 19.4
## 4: GoalKeeper 1900 6.7 16.9
library(ggpubr)
p <- ggboxplot(FifaF.df, x = "Position", y = "log(WageK)",
color = "Position", palette = "jco")
plibrary(data.table)
FifaF.dt <- data.table(FifaF.df)
tab1 <- FifaF.dt[, .(N = .N,
MeanWageK = round(mean(WageK),1),
SdWageK = round(sd(WageK),1)),
by = (Reputation)][order(-MeanWageK)]
tab1## Reputation N MeanWageK SdWageK
## 1: 5 6 310.0 207.3
## 2: 4 49 173.0 110.8
## 3: 3 293 83.2 62.2
## 4: 2 1154 32.0 28.0
## 5: 1 15141 5.8 8.8
library(ggpubr)
p <- ggboxplot(FifaF.df, x = "Reputation", y = "log(WageK)",
color = "Reputation", palette = "jco")
p library(data.table)
FifaF.dt <- data.table(FifaF.df)
tab1 <- FifaF.dt[, .(N = .N,
MeanReleaseClauseM = round(mean(ReleaseClauseM),1),
SdReleaseClauseM = round(sd(ReleaseClauseM),1)),
by = (Position)][order(-MeanReleaseClauseM)]
tab1## Position N MeanReleaseClauseM SdReleaseClauseM
## 1: Forward 3044 5.7 14.8
## 2: MidField 6261 5.2 11.7
## 3: Defence 5438 3.8 8.2
## 4: GoalKeeper 1900 3.0 9.2
library(ggpubr)
p <- ggboxplot(FifaF.df, x = "Position", y = "log(ReleaseClauseM)",
color = "Position", palette = "jco")
p library(data.table)
FifaF.dt <- data.table(FifaF.df)
tab1 <- FifaF.dt[, .(N = .N,
MeanReleaseClauseM = round(mean(ReleaseClauseM),1),
SdReleaseClauseM = round(sd(ReleaseClauseM),1)),
by = (Reputation)][order(-MeanReleaseClauseM)]
tab1## Reputation N MeanReleaseClauseM SdReleaseClauseM
## 1: 5 6 138.2 85.0
## 2: 4 49 72.8 49.0
## 3: 3 293 42.0 33.4
## 4: 2 1154 15.1 15.2
## 5: 1 15141 2.8 5.1
library(ggpubr)
p <- ggboxplot(FifaF.df, x = "Reputation", y = "log(ReleaseClauseM)",
color = "Reputation", palette = "jco")
p library(data.table)
FifaF.dt <- data.table(FifaF.df)
tab1 <- FifaF.dt[, .(N = .N,
MeanOverall = round(mean(Overall),1),
SdOverall = round(sd(Overall),1)),
by = (Position)][order(-MeanOverall)]
tab1## Position N MeanOverall SdOverall
## 1: MidField 6261 66.5 7.1
## 2: Defence 5438 66.4 6.5
## 3: Forward 3044 66.3 7.2
## 4: GoalKeeper 1900 64.5 7.7
library(ggpubr)
p <- ggboxplot(FifaF.df, x = "Position", y = "Overall",
color = "Position", palette = "jco")
# # Add horizontal line at base mean
p + geom_hline(yintercept = mean(FifaF.dt$Overall), linetype = 2)library(data.table)
FifaF.dt <- data.table(FifaF.df)
tab1 <- FifaF.dt[, .(N = .N,
MeanOverall = round(mean(Overall),1),
SdOverall = round(sd(Overall),1)),
by = (Reputation)][order(-MeanOverall)]
tab1## Reputation N MeanOverall SdOverall
## 1: 5 6 90.8 3.4
## 2: 4 49 86.1 3.2
## 3: 3 293 81.6 3.7
## 4: 2 1154 75.6 4.2
## 5: 1 15141 65.1 6.2
FifaF.df$Reputation <- as.factor(FifaF.df$Reputation)
ggplot(FifaF.df, aes(x = Age, y = WageK,
shape = Reputation,
color = Reputation)) + geom_point()ggplot(FifaF.df, aes(x = Age, y = ReleaseClauseM,
shape = Position,
color = Position)) + geom_point()ggplot(FifaF.df, aes(x = Age, y = ReleaseClauseM,
shape = Reputation,
color = Reputation)) + geom_point()ggplot(FifaF.df, aes(x = Overall, y = WageK,
shape = Position,
color = Position)) +
geom_point() + geom_smooth(method=lm, se=FALSE)# selecting the variables for correlation matrix
FifaF.df2 <- FifaF.df[,c("WageK", "ReleaseClauseM","Overall","Reputation","Age")]
# taking reputation as numeric
FifaF.df2$Reputation <- as.numeric(FifaF.df2$Reputation)
library(Hmisc)
rcorr(as.matrix(FifaF.df2))## WageK ReleaseClauseM Overall Reputation Age
## WageK 1.00 0.86 0.57 0.68 0.15
## ReleaseClauseM 0.86 1.00 0.62 0.64 0.06
## Overall 0.57 0.62 1.00 0.50 0.46
## Reputation 0.68 0.64 0.50 1.00 0.25
## Age 0.15 0.06 0.46 0.25 1.00
##
## n= 16643
##
##
## P
## WageK ReleaseClauseM Overall Reputation Age
## WageK 0 0 0 0
## ReleaseClauseM 0 0 0 0
## Overall 0 0 0 0
## Reputation 0 0 0 0
## Age 0 0 0 0
## corrplot 0.84 loaded