extractPbp | R Documentation |
extractPbp
returns a data frame with the play-by-play data for
the specified game.
extractPbp(game_code, season, lineups = TRUE)
game_code |
Integer scalar specifying the game code |
season |
Integer scalar specifying the season |
lineups |
Logical scalar indicating whether to include lineup information. Defaults to TRUE. |
Each game is uniquely identified by the game code and the season. Game codes
can be found in the included data set gameresults
or using
extractResults
.
Columns indicating the 10 players that were on the court at each event of the play-by-play data are included by default.
A play-by-play data frame with the following variables:
Starting year of the season
Game code
Identifying event number
Team code of involved player
Full player name (Last name, First name)
Play type. See Details.
Time remaining in the quarter
Quarter
Home team's score
Away team's score
Event description
Seconds elapsed since the start of the game
Full name of home team
Full name of away team
Whether player involved plays at home
Full team name of involved player
Whether event corresponds to a last free throw in a trip to the line
Whether event corresponds to an additional free throw
Home players on the floor
Away players on the floor
All 10 players on the floor
Euroleague's API documentation asks for a delay of 15 secods per request. Take this into consideration when requesting a large number of games.
Other extract functions: extractResults
extractPbp(game_code = 1, season = 2018)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.