# NOT RUN {
data(tromso_extra)
# resample movement dataset to plot 100 movement directions
# (in absence of pass / shot event data as yet)
id8 <- tromso_extra %>%
dplyr::filter(id == 8) %>%
dplyr::sample_n(100)
# 10x10 x,y-bins, 8 angle-bins, grass pitch
soccerSpokes(id8, xBins = 5, angleBins = 8, grass = TRUE, minLength = 0.3, minAlpha = 0.7)
# 5x5 x,y-bins, 16 angle-bins, blank pitch w/ grey lines
soccerSpokes(id8, xBins = 5, angleBins = 16, line_col = "grey40")
# draw spokes over player heatmap
p <- soccerHeatmap(id8, xBins = 5)
soccerSpokes(id8, xBins = 5, plot = p)
# }
Run the code above in your browser using DataLab