extractPbp: Extracts play-by-play data for a single game

Description Usage Arguments Details Value Warning See Also Examples

View source: R/extractPbp.R

Description

extractPbp returns a data frame with the play-by-play data for the specified game.

Usage

1
extractPbp(game_code, season, lineups = TRUE)

Arguments

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.

Details

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.

Value

A play-by-play data frame with the following variables:

season

Starting year of the season

game_code

Game code

play_number

Identifying event number

team_code

Team code of involved player

player_name

Full player name (Last name, First name)

play_type

Play type. See Details.

time_remaining

Time remaining in the quarter

quarter

Quarter

points_home

Home team's score

points_away

Away team's score

play_info

Event description

seconds

Seconds elapsed since the start of the game

home_team

Full name of home team

away_team

Full name of away team

home

Whether player involved plays at home

team_name

Full team name of involved player

last_ft

Whether event corresponds to a last free throw in a trip to the line

and1

Whether event corresponds to an additional free throw

home_player1:home_player5

Home players on the floor

away_player1:away_player5

Away players on the floor

lineups

All 10 players on the floor

Warning

Euroleague's API documentation asks for a delay of 15 secods per request. Take this into consideration when requesting a large number of games.

See Also

Other extract functions: extractResults

Examples

1
extractPbp(game_code = 1, season = 2018)

solmos/euroleaguer documentation built on Jan. 30, 2022, 3:16 p.m.