load_nba_pbp {hoopR} | R Documentation |
Load hoopR NBA play-by-play
Description
helper that loads multiple seasons from the data repo either into memory or writes it into a db using some forwarded arguments in the dots
Usage
load_nba_pbp(
seasons = most_recent_nba_season(),
...,
dbConnection = NULL,
tablename = NULL
)
Arguments
seasons |
A vector of 4-digit years associated with given NBA seasons. (Min: 2002) |
... |
Additional arguments passed to an underlying function that writes
the season data into a database (used by |
dbConnection |
A |
tablename |
The name of the play by play data table within the database |
Value
Returns a tibble
col_name | types |
id | numeric |
sequence_number | character |
type_id | integer |
type_text | character |
text | character |
away_score | integer |
home_score | integer |
period_number | integer |
period_display_value | character |
clock_display_value | character |
scoring_play | logical |
score_value | integer |
team_id | integer |
athlete_id_1 | integer |
athlete_id_2 | integer |
athlete_id_3 | integer |
wallclock | character |
shooting_play | logical |
coordinate_x_raw | numeric |
coordinate_y_raw | numeric |
season | integer |
season_type | integer |
away_team_id | integer |
away_team_name | character |
away_team_mascot | character |
away_team_abbrev | character |
away_team_name_alt | character |
home_team_id | integer |
home_team_name | character |
home_team_mascot | character |
home_team_abbrev | character |
home_team_name_alt | character |
home_team_spread | numeric |
game_spread | numeric |
home_favorite | logical |
game_spread_available | logical |
game_id | integer |
qtr | integer |
time | character |
clock_minutes | integer |
clock_seconds | numeric |
half | character |
game_half | character |
lead_qtr | integer |
lead_game_half | character |
start_quarter_seconds_remaining | integer |
start_half_seconds_remaining | integer |
start_game_seconds_remaining | integer |
game_play_number | integer |
end_quarter_seconds_remaining | integer |
end_half_seconds_remaining | integer |
end_game_seconds_remaining | integer |
period | integer |
lag_qtr | integer |
lag_game_half | character |
coordinate_x | numeric |
coordinate_y | numeric |
game_date | Date |
game_date_time | POSIXct |
type_abbreviation | character |
See Also
Other hoopR Loader Functions:
load_mbb_pbp()
,
load_mbb_player_box()
,
load_mbb_schedule()
,
load_mbb_team_box()
,
load_nba_player_box()
,
load_nba_schedule()
,
load_nba_team_box()
Examples
load_nba_pbp(seasons = most_recent_nba_season())
[Package hoopR version 2.1.0 Index]