get_pass.R 987 Bytes
Newer Older
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
library(tidyverse)

source("R/make_data.R")
source("R/read_rcl.R")
source("R/read_rcg.R")

path_rcg <- "data/json/20221005141342-Alice2021_0-vs-HELIOS2021_1.rcg"
path_rcl <- "data/json/20221005141342-Alice2021_0-vs-HELIOS2021_1.rcl"
rcg <- read_rcg(path_rcg)
rcl <- read_rcl(path_rcl)

path_rcg <- "data/sep/20231218134000-HELIOS_base_6-vs-HELIOS_enemy_4.rcg"
path_csv <-"data/sep/20231218134000-HELIOS_base_6-vs-HELIOS_enemy_4.csv"
path_rcl <- "data/sep/20231218134000-HELIOS_base_6-vs-HELIOS_enemy_4.rcl"
rcg <- read_rcg_csv(path_csv)
rcl <- read_rcl(path_rcl)

name <- get_name(path_rcg)
ball <- get_ball(rcg)
referee <- get_referee(rcl)
goal <- read_goal(referee,name)
players <- get_player(rcg,name)
action <- get_action(rcl,ball,players)
kick <- get_kick_log(action,goal)
pass <- get_pass(kick)
26
27
28
29
30
31

pass_data <- pass |>
    dplyr::filter(team=="HELIOS_base") |> # パスのテーブルからstepとteamとpass_sccの列を抽出
    dplyr::select(step,team,pass_scc)

View(pass_data)