library(readxl)
library(flextable)
library(corrplot)
## corrplot 0.92 loaded
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(readr)
FifaData <- read_csv("C:/Users/usuario/Desktop/Base_de_dados-master/FifaData.csv")
## Rows: 17588 Columns: 53
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (12): Name, Nationality, National_Position, Club, Club_Position, Club_Jo...
## dbl (41): National_Kit, Club_Kit, Contract_Expiry, Rating, Age, Weak_foot, S...
##
## ℹ 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.
View(FifaData)
head(FifaData) %>% flextable()
Name | Nationality | National_Position | National_Kit | Club | Club_Position | Club_Kit | Club_Joining | Contract_Expiry | Rating | Height | Weight | Preffered_Foot | Birth_Date | Age | Preffered_Position | Work_Rate | Weak_foot | Skill_Moves | Ball_Control | Dribbling | Marking | Sliding_Tackle | Standing_Tackle | Aggression | Reactions | Attacking_Position | Interceptions | Vision | Composure | Crossing | Short_Pass | Long_Pass | Acceleration | Speed | Stamina | Strength | Balance | Agility | Jumping | Heading | Shot_Power | Finishing | Long_Shots | Curve | Freekick_Accuracy | Penalties | Volleys | GK_Positioning | GK_Diving | GK_Kicking | GK_Handling | GK_Reflexes |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cristiano Ronaldo | Portugal | LS | 7 | Real Madrid | LW | 7 | 07/01/2009 | 2,021 | 94 | 185 cm | 80 kg | Right | 02/05/1985 | 32 | LW/ST | High / Low | 4 | 5 | 93 | 92 | 22 | 23 | 31 | 63 | 96 | 94 | 29 | 85 | 86 | 84 | 83 | 77 | 91 | 92 | 92 | 80 | 63 | 90 | 95 | 85 | 92 | 93 | 90 | 81 | 76 | 85 | 88 | 14 | 7 | 15 | 11 | 11 |
Lionel Messi | Argentina | RW | 10 | FC Barcelona | RW | 10 | 07/01/2004 | 2,018 | 93 | 170 cm | 72 kg | Left | 06/24/1987 | 29 | RW | Medium / Medium | 4 | 4 | 95 | 97 | 13 | 26 | 28 | 48 | 95 | 93 | 22 | 90 | 94 | 77 | 88 | 87 | 92 | 87 | 74 | 59 | 95 | 90 | 68 | 71 | 85 | 95 | 88 | 89 | 90 | 74 | 85 | 14 | 6 | 15 | 11 | 8 |
Neymar | Brazil | LW | 10 | FC Barcelona | LW | 11 | 07/01/2013 | 2,021 | 92 | 174 cm | 68 kg | Right | 02/05/1992 | 25 | LW | High / Medium | 5 | 5 | 95 | 96 | 21 | 33 | 24 | 56 | 88 | 90 | 36 | 80 | 80 | 75 | 81 | 75 | 93 | 90 | 79 | 49 | 82 | 96 | 61 | 62 | 78 | 89 | 77 | 79 | 84 | 81 | 83 | 15 | 9 | 15 | 9 | 11 |
Luis Suárez | Uruguay | LS | 9 | FC Barcelona | ST | 9 | 07/11/2014 | 2,021 | 92 | 182 cm | 85 kg | Right | 01/24/1987 | 30 | ST | High / Medium | 4 | 4 | 91 | 86 | 30 | 38 | 45 | 78 | 93 | 92 | 41 | 84 | 83 | 77 | 83 | 64 | 88 | 77 | 89 | 76 | 60 | 86 | 69 | 77 | 87 | 94 | 86 | 86 | 84 | 85 | 88 | 33 | 27 | 31 | 25 | 37 |
Manuel Neuer | Germany | GK | 1 | FC Bayern | GK | 1 | 07/01/2011 | 2,021 | 92 | 193 cm | 92 kg | Right | 03/27/1986 | 31 | GK | Medium / Medium | 4 | 1 | 48 | 30 | 10 | 11 | 10 | 29 | 85 | 12 | 30 | 70 | 70 | 15 | 55 | 59 | 58 | 61 | 44 | 83 | 35 | 52 | 78 | 25 | 25 | 13 | 16 | 14 | 11 | 47 | 11 | 91 | 89 | 95 | 90 | 89 |
De Gea | Spain | GK | 1 | Manchester Utd | GK | 1 | 07/01/2011 | 2,019 | 90 | 193 cm | 82 kg | Right | 11/07/1990 | 26 | GK | Medium / Medium | 3 | 1 | 31 | 13 | 13 | 13 | 21 | 38 | 88 | 12 | 30 | 68 | 60 | 17 | 31 | 32 | 56 | 56 | 25 | 64 | 43 | 57 | 67 | 21 | 31 | 13 | 12 | 21 | 19 | 40 | 13 | 86 | 88 | 87 | 85 | 90 |
names(FifaData)
## [1] "Name" "Nationality" "National_Position"
## [4] "National_Kit" "Club" "Club_Position"
## [7] "Club_Kit" "Club_Joining" "Contract_Expiry"
## [10] "Rating" "Height" "Weight"
## [13] "Preffered_Foot" "Birth_Date" "Age"
## [16] "Preffered_Position" "Work_Rate" "Weak_foot"
## [19] "Skill_Moves" "Ball_Control" "Dribbling"
## [22] "Marking" "Sliding_Tackle" "Standing_Tackle"
## [25] "Aggression" "Reactions" "Attacking_Position"
## [28] "Interceptions" "Vision" "Composure"
## [31] "Crossing" "Short_Pass" "Long_Pass"
## [34] "Acceleration" "Speed" "Stamina"
## [37] "Strength" "Balance" "Agility"
## [40] "Jumping" "Heading" "Shot_Power"
## [43] "Finishing" "Long_Shots" "Curve"
## [46] "Freekick_Accuracy" "Penalties" "Volleys"
## [49] "GK_Positioning" "GK_Diving" "GK_Kicking"
## [52] "GK_Handling" "GK_Reflexes"
plot(FifaData$Short_Pass, FifaData$Long_Pass, col="royalblue",
pch=16, cex= 0.8, main="Diagrama de dispersão",
xlab="Passe curto",
ylab="Passe longo")
abline(lsfit(FifaData$Short_Pass, FifaData$Long_Pass),col="black")
cor(FifaData$Short_Pass, FifaData$Long_Pass)
## [1] 0.9007456
FifaData %>% select(Short_Pass,Long_Pass,Long_Shots,Shot_Power,Volleys) %>%
cor() %>% corrplot(method = "circle")
FifaData %>% select(Short_Pass,Long_Pass,Long_Shots,Shot_Power,Volleys) %>%
cor() %>% corrplot(method = "number")
Analisamos a base de dados fifadata.csv e chegamos na conclusão no qual o Diagrama de dispersão, que pode ter indices positiva, negativa, forte,fraca e sem correlação, entretanto as variáveis Shortpass(passe curto) e Longpass(passe longo) aprensenta uma correlação positiva forte, com altos índices de aproximadamente 0.90, com isso chegamos que as duas variáveis que são extremamente importantes, apresenta grande ligamento.
Já analisamos que na matriz de correlação na qual usamos bolas e números chegamos que a conclusão que as variáveis escolhidas, todas tem grande semelhança uma a outra, mas a menor correlção é entre o passe longo(longpass) e o voleio(volleys), já tambem vimos que o passe longo e o passe curto são extremamente semelhantes um ao outro, assim como o shotpower(força do chute) e longsshots(chutes de longe), uma vez que para ter um bom chute de longe precisa ter força no chute, para a bola chegar no gol