load_nba_schedule {hoopR}R Documentation

Load hoopR NBA schedules

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_schedule(
  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 update_nba_db()).

dbConnection

A DBIConnection object, as returned by

tablename

The name of the play by play data table within the database

Value

Returns a tibble

col_name types
id integer
uid character
date character
attendance integer
time_valid logical
neutral_site logical
conference_competition logical
recent logical
start_date character
notes_type character
notes_headline character
type_id integer
type_abbreviation character
venue_id integer
venue_full_name character
venue_address_city character
venue_capacity integer
venue_indoor logical
status_clock integer
status_display_clock character
status_period integer
status_type_id integer
status_type_name character
status_type_state character
status_type_completed logical
status_type_description character
status_type_detail character
status_type_short_detail character
format_regulation_periods integer
home_id integer
home_uid character
home_location character
home_name character
home_abbreviation character
home_display_name character
home_short_display_name character
home_color character
home_alternate_color character
home_is_active logical
home_venue_id integer
home_logo character
home_score integer
home_winner logical
away_id integer
away_uid character
away_location character
away_name character
away_abbreviation character
away_display_name character
away_short_display_name character
away_color character
away_alternate_color character
away_is_active logical
away_venue_id integer
away_logo character
away_score integer
away_winner logical
game_id integer
season integer
season_type integer
venue_address_state character
status_type_alt_detail character
PBP logical
team_box logical
player_box logical
game_date_time POSIXct
game_date Date

See Also

Other hoopR Loader Functions: load_mbb_pbp(), load_mbb_player_box(), load_mbb_schedule(), load_mbb_team_box(), load_nba_pbp(), load_nba_player_box(), load_nba_team_box()

Examples


  load_nba_schedule(seasons = most_recent_nba_season())


[Package hoopR version 2.1.0 Index]