-
Notifications
You must be signed in to change notification settings - Fork 2
/
1_teamplaystyle.R
51 lines (48 loc) · 1.85 KB
/
1_teamplaystyle.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 1. 수비력이 좋은 팀 공격력이 좋은 팀을 찾아보고 20-21 시즌의 실제 득점 실점 과의 관계 프리미어 리그
# https://sports.daum.net/record/epl/team?season=20192020
library(dplyr)
library(stringr)
View(epl2020)
epl2020 <- read.csv("data/epl2020.csv",header=TRUE,encoding="UTF-8")
Liverpool <- epl2020 %>% filter(teamId == "Liverpool")
Norwich <- epl2020 %>% filter(teamId == "Norwich")
ManCity <- epl2020 %>% filter(teamId == "Man City")
WestHam<- epl2020 %>% filter(teamId == "West Ham")
Bournemouth <- epl2020 %>% filter(teamId == "Bournemouth")
Brighton <- epl2020 %>% filter(teamId == "Brighton")
Burnley <- epl2020 %>% filter(teamId == "Burnley")
CrystalPalace <- epl2020 %>% filter(teamId == "Crystal Palace")
Everton <- epl2020 %>% filter(teamId == "Everton")
SheffieldUnited <- epl2020 %>% filter(teamId == "Sheffield United")
Southampton <- epl2020 %>% filter(teamId == "Southampton")
Watford <- epl2020 %>% filter(teamId == "Watford")
AstonVilla <- epl2020 %>% filter(teamId == "Aston Villa")
Tottenham <- epl2020 %>% filter(teamId == "Tottenham")
Arsenal <- epl2020 %>% filter(teamId == "Arsenal")
Leicester <- epl2020 %>% filter(teamId == "Leicester")
NewcastleUnited <- epl2020 %>% filter(teamId == "Newcastle United")
Wolves <- epl2020 %>% filter(teamId == "Wolves")
Chelsea <- epl2020 %>% filter(teamId == "Chelsea")
ManUtd <- epl2020 %>% filter(teamId == "Man Utd")
View(Liverpool)
# 기대득점이 높은팀이 공격적이라 할 수 있는지. 팀 공격지표.
mean(Liverpool$xG)
mean(Norwich$xG)
mean(ManCity$xG)
mean(WestHam$xG)
mean(Bournemouth$xG)
mean(Brighton$xG)
mean(Burnley$xG)
mean(CrystalPalace$xG)
mean(Everton$xG)
mean(SheffieldUnited$xG)
mean(Southampton$xG)
mean(Watford$xG)
mean(AstonVilla$xG)
mean(Tottenham$xG)
mean(Arsenal$xG)
mean(Leicester$xG)
mean(NewcastleUnited$xG)
mean(Wolves$xG)
mean(Chelsea$xG)
mean(ManUtd$xG)