Description Usage Arguments Details Value Examples
Creates a game flow chart with ggplot2.
1 | game_flow(.data, home_col, away_col)
|
.data |
Play-by-play data returned from w_get_pbp_game |
home_col |
Color of home team for chart. Can be selected but defaults to primary team color. |
away_col |
Color of away team for chart. Can be selected but defaults to primary team color. |
This function takes play-by-play data returned from w_get_pbp_game and returns a ggplot2 object to show the game flow.
A ggplot2 object
1 2 | pbp_data <- w_get_pbp_game("401176897")
game_flow(pbp_data, "red", "black")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.