-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
86 lines (86 loc) · 2.98 KB
/
.Rhistory
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
library(tidyverse) # dataframe manipulation
library(StatsBombR)
Comp <- FreeCompetitions()
Matches <- FreeMatches(Comp)
event <- get.matchFree(Matches[1,])
View(event)
StatsBombData <- StatsBombFreeEvents()
Comp <- FreeCompetitions()
Matches <- FreeMatches(Comp)
events <- get.matchFree(Matches[1,])
View(events)
View(Matches)
View(Matches[[27]][[1]])
Matches <- FreeMatches(Comp) %>%
filter(competition.competition_name == "La Liga")
View(Matches)
events <- get.matchFree(Matches[1,])
View(events)
events <- events %>%
filter(type.name == "Shot")
View(events)
events <- get.matchFree(Matches[2,])
events <- events %>%
filter(type.name == "Shot")
events <- events %>%
allclean() %>%
filter(type.name == "Shot")
events <- events %>%
allclean() %>%
filter(shot.type.name == "Free Kick")
View(events)
events <- events %>%
allclean() %>%
filter(shot.type.name == "Free Kick")
View(events)
events <- events %>%
allclean() %>%
filter(shot.type.name == "Free Kick") %>%
select(id, player.id, match_id, competition_id, minute, second, location.x, location.y, shot.end_location.x, shot.end_location.y,
shot.end_location.z, shot.type.name, shot.body_part.name, shot.outcome.name, shot.statsbomb_xg)
events <- get.matchFree(Matches[2,])
View(events)
events <- events %>%
allclean() %>%
filter(shot.type.name == "Free Kick") %>%
select(id, player.id, match_id, competition_id, minute, second, location.x, location.y, shot.end_location.x, shot.end_location.y,
shot.end_location.z, shot.type.name, shot.body_part.name, shot.outcome.name, shot.statsbomb_xg)
View(events)
events <- get.matchFree(Matches[2,])
events <- events %>%
allclean() %>%
filter(shot.type.name == "Free Kick") %>%
select(id, player.id, match_id, competition_id, minute, second, location.x, location.y, shot.end_location.x, shot.end_location.y,
shot.end_location.z, shot.type.name, shot.body_part.name, shot.outcome.name, shot.statsbomb_xg, shot.freeze_frame)
View(events)
View(events[[16]][[1]])
event_filtered <- events %>%
filter(id == "c4ada3e2-9be1-4b0b-aaec-effb0c701185")
event_filtered$shot.freeze_frame
test <- event_filtered$shot.freeze_frame[[1]]
View(test)
test <- event_filtered$shot.freeze_frame[[1]] %>%
mutate(id == "c4ada3e2-9be1-4b0b-aaec-effb0c701185")
test <- event_filtered$shot.freeze_frame[[1]] %>%
mutate(id = "c4ada3e2-9be1-4b0b-aaec-effb0c701185")
test <- event_filtered$shot.freeze_frame[[1]] %>%
mutate(id = "c4ada3e2-9be1-4b0b-aaec-effb0c701185") %>%
mutate(freeze_x = location[[1]])
test <- event_filtered$shot.freeze_frame[[1]] %>%
mutate(id = "c4ada3e2-9be1-4b0b-aaec-effb0c701185") %>%
rowwise() %>%
mutate(freeze_x = location[[1]])
View(test)
test <- event_filtered$shot.freeze_frame[[1]] %>%
mutate(id = "c4ada3e2-9be1-4b0b-aaec-effb0c701185") %>%
rowwise() %>%
mutate(freeze_x = location[[1]],
freeze_y = location[[2]])
View(test)
test <- event_filtered$shot.freeze_frame[[1]] %>%
mutate(id = "c4ada3e2-9be1-4b0b-aaec-effb0c701185") %>%
rowwise() %>%
mutate(freeze_x = location[[1]],
freeze_y = location[[2]],
teammate = as.character(teammate))
View(test)