| cbbd_plays_game | R Documentation |
Get play-by-play data for a single game from the CollegeBasketballData API.
Get play-by-play data for a single player from the CollegeBasketballData API.
Get play-by-play data for a team-season from the CollegeBasketballData API.
Get play-by-play data for all games on a date from the CollegeBasketballData API.
Get play-by-play data for a tournament from the CollegeBasketballData API.
Get the list of play types from the CollegeBasketballData API.
cbbd_plays_game(game_id, shooting_plays_only = FALSE)
cbbd_plays_player(
player_id,
season = most_recent_mbb_season(),
shooting_plays_only = FALSE
)
cbbd_plays_team(
season = most_recent_mbb_season(),
team,
shooting_plays_only = FALSE
)
cbbd_plays_date(date, shooting_plays_only = FALSE, utc_offset = NULL)
cbbd_plays_tournament(
tournament,
season = most_recent_mbb_season(),
shooting_plays_only = FALSE
)
cbbd_play_types()
game_id |
(integer required): CollegeBasketballData game id. See
|
shooting_plays_only |
(logical optional): If |
player_id |
(integer required): Athlete id. |
season |
(integer required): Season, 4-digit ending-year (e.g. |
team |
(character required): Team name (e.g. |
date |
(character required): Date-time in ISO 8601 format
(e.g. |
utc_offset |
(numeric optional): UTC offset (hours) for the date. |
tournament |
(character required): Tournament name (e.g. |
A hoopR_data tibble with one row per play (key columns; shot_info
is flattened to shot_info_*, participants/on_floor are list-columns):
| col_name | types | description |
| id | integer | Play id. |
| game_id | integer | Game id. |
| season | numeric | Season (4-digit ending-year). |
| play_type | character | Play type description. |
| team_id | integer | Team id of the team on the play. |
| team | character | Team on the play. |
| period | integer | Period number. |
| clock | character | Game clock. |
| seconds_remaining | integer | Seconds remaining in the period. |
| home_score | integer | Home score after the play. |
| away_score | integer | Away score after the play. |
| scoring_play | logical | Whether the play scored. |
| shooting_play | logical | Whether the play was a shot. |
| score_value | numeric | Point value of the play. |
| play_text | character | Play description text. |
A hoopR_data tibble with one row per play (same columns as
cbbd_plays_game()).
A hoopR_data tibble with one row per play (same columns as
cbbd_plays_game()).
A hoopR_data tibble with one row per play (same columns as
cbbd_plays_game()).
A hoopR_data tibble with one row per play (same columns as
cbbd_plays_game()).
A hoopR_data tibble with one row per play type:
| col_name | types | description |
| id | integer | Play type id. |
| name | character | Play type name. |
try(cbbd_plays_game(game_id = 5881))
try(cbbd_plays_player(player_id = 160, season = 2024))
try(cbbd_plays_team(season = 2024, team = "Duke"))
try(cbbd_plays_date(date = "2024-02-01T00:00:00.000Z"))
try(cbbd_plays_tournament(tournament = "NCAA", season = 2024))
try(cbbd_play_types())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.