plot_passnet | R Documentation |
This function allows for data, that can be from Opta or Statsbomb, to be used for plotting pass networks.
plot_passnet(
data,
data_type = "statsbomb",
team_name,
scale_stat = "xT",
scale_color = "#E74C3C",
subtitle = "",
theme = "dark"
)
data |
Data frame that houses pass data |
data_type |
Type of data that is being put in: opta or statsbomb. Default set to "statsbomb" |
team_name |
The name of the team of which you want a pass network |
scale_stat |
Stat for the player node color scale. Choose between "xT" and "EPV" |
scale_color |
Color of higher end of xT/EPV color scale. Default set to "#E74C3C" |
subtitle |
Subtitle of the pass network plot |
theme |
The background theme -> "dark" or "light" |
a ggplot2 object
## Not run:
plot <- plot_passnet(data, data_type = "opta", team_name = "Arsenal")
plot
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.