Scrape about plays during a volleyball game from the NCAA website.
ncaa_vb_pbp(game_id)
the ID for the game's play_by_play data from the box score page
a data frame of play_by_play data for the specified game
How to get a game ID:
find the game you want to view data for via stats.ncaa.org's scoreboard
open up its box score page
Click the play-by-play tab
Copy the string of numbers at the end of the URL from your browser's address bar.
Note: there are at least two HTML table types available from the NCAA website,
and the code below handles each differently (see if statements checking for html_columns
).
HTML table type 1 (three columns): Ohio State vs Georgia Tech, play-by-play ID: 5174968
HTML table type 2 (four columns): Miami vs Florida, play-by-play ID: 5172096