plot_wpa: Plot the WPA for a specific game

Description Usage Arguments Examples

View source: R/plot_wpa.R

Description

Plot the WPA for a specific game

Usage

1
2
3
4
5
6
7
8
plot_wpa(
  dat,
  game_id = NULL,
  away_color,
  home_color,
  winner = "home",
  bet = FALSE
)

Arguments

dat

(data.frame required) Play-by-Play data.frame as can be retrieved from cfb_pbp_data()

game_id

(Integer optional) Game ID filter for querying a single game Can be found using the cfb_game_info() function

away_color

color selection for the away team

home_color

color selection for the home team

winner

Winner of contest, home or away.

bet

TRUE or FALSE to use initial Win Probability converted from betting lines.

Examples

1
2
df = cfb_pbp_data(year = 2019, week = 12, team = 'Baylor', epa_wpa = TRUE)
plot_wpa(df, away_color=c(OU="#841617"), home_color=c(BU="#003015"), winner="away")

saiemgilani/cfbscrapR documentation built on April 11, 2021, 4:57 p.m.