Skip to contents

This function allows for data, that can be from Opta or Statsbomb, to be used for plotting pass networks.

Usage

plot_passnet(
  data,
  data_type = "statsbomb",
  team_name,
  scale_stat = "xT",
  scale_color = "#E74C3C",
  subtitle = "",
  theme = "dark"
)

Arguments

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"

Value

a ggplot2 object

Examples

if (FALSE) {
plot <- plot_passnet(data, data_type = "opta", team_name = "Arsenal")
plot
}