game_flow: Game Flow Chart

Description Usage Arguments Details Value Examples

View source: R/game_flow.R

Description

Creates a game flow chart with ggplot2.

Usage

1
game_flow(.data, home_col, away_col)

Arguments

.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.

Details

This function takes play-by-play data returned from w_get_pbp_game and returns a ggplot2 object to show the game flow.

Value

A ggplot2 object

Examples

1
2
pbp_data <- w_get_pbp_game("401176897")
game_flow(pbp_data, "red", "black")

snestler/wncaahoopR documentation built on Oct. 18, 2021, 2:11 p.m.