Introdução

Vamos fazer uma interpretação das estatísticas abaixo

  1. Diagrama de dispersão de variáveis quantitativas.

  2. Matriz de Correlação de variáveis quantitativas.

library(readxl)
library(flextable)
library(corrplot)
## corrplot 0.92 loaded
library(readr)
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

Carregar base de dados

FifaData <- read_csv("C:/Users/Kim Fonseca Coquet/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.

Tabela da base de dados Fifa

library(flextable)
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

1. Diagrama de dispersão de variáveis quantitativas.

plot(FifaData$Skill_Moves,FifaData$Rating, col="green",
     pch=25,main="Diagrama de dispersão",
     xlab="Skill",
     ylab="Overall")
abline(lsfit(FifaData$Skill_Moves,FifaData$Rating),col="red")

correlação

cor(FifaData$Skill_Moves,FifaData$Rating)
## [1] 0.252

2. Matriz de Correlação de variáveis quantitativas.

library(corrplot)
FifaData %>% select(Rating,Skill_Moves,Speed,Freekick_Accuracy,Penalties,Short_Pass) %>% 
  cor() %>% corrplot(method = "number")

Conclusão

Foi usada a base de dados chamada de FifaData. Ela possui 41 variáveis quantitativas e 8 variáveis qualitativas. Conseguimos mostrar a relação entre as variáveis Skill Moves que seria basicamente o quanto um jogador consegue driblar e Overall que seria a “nota” do jogador.

A partir do índice de correlação podemos ver que as duas variáveis possuem uma correlação pequena já que é apenas de 0.252. Já com o diagrama de dispersão, conseguimos ver que a maioria dos jogadores de todas “notas” se encontram com os niveis de Skill mais baixo e enquanto isso poucos atletas com “notas” mais altas tem o nivel 4 e 5 de Skill. Apesar de ter uma correlação baixa, isso faz sentido já que poucos atletas tem o nível 5 de Skill mas quase todos eles se encontram com notas mais altas