Description Usage Arguments Details Examples
This function creates a win probability chart over the game duration.
1 | gg_wp_chart(.data, home_col, away_col, show_gei)
|
.data |
Play-by-play data returned from w_get_pbp_game |
home_col |
Color of home team for chart. Defaults to primary, with a backup if nothing is found. |
away_col |
Color of away team for chart. Defaults to primary, with a backup if nothing is found. |
show_gei |
Logical whether Game Exictement Index and Minimum Win Probability metrics should be displayed on the plot. Default = TRUE. |
This function takes play-by-play data returned from w_get_pbp_game and returns a ggplot2 object to show each teams win probability during the game.
1 2 | pbp_data <- w_get_pbp_game("401176897")
gg_wp_chart(pbp_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.