This function allows you to plot various types of plots that have passes as some sort of input. Data entered must have columns for which you want to plot with. Compatible with StatsBomb and Opta data.
Usage
plot_pass(
data,
data_type = "statsbomb",
type = "sep",
progressive_pass = FALSE,
cross = FALSE,
shot = FALSE,
switch = FALSE,
outcome = "all",
theme = "dark"
)
Arguments
- data
The data frame that stores your passing data. Opta data frame must contain at least the following columns:
x
,y
,finalX
,finalY
- data_type
Type of data that is being put in: opta or statsbomb. Default set to "statsbomb"
- type
indicates the type of plot to pass. "sep" separates successful and unsuccessful passes. "all" plots all passes on one pitch. Default = "sep". Only available for StatsBomb data
- progressive_pass
indicates whether to map out progressive passes. Only available for StatsBomb data
- cross
indicates whether to map out crosses. Only available for StatsBomb data
- shot
indicates whether to map out shot assists. Only available for StatsBomb data
- switch
indicates whether to map out switches of play. Only available for StatsBomb data
- outcome
indicates whether you want successful ("suc"), unsuccessful ("unsuc"), or all ("all"). Only available for StatsBomb data
- theme
indicates what theme the map must be shown in: dark (default), white, rose, almond