Skip to contents

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_mbb_player_box(
  seasons = most_recent_mbb_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years associated with given men's college basketball seasons. (Min: 2003)

...

Additional arguments passed to an underlying function that writes the season data into a database (used by update_mbb_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

Examples

# \donttest{
load_mbb_player_box(2021)
#> ── ESPN MBB Player Boxscore Information from hoopR data repository ─────────────
#>  Data updated: 2022-03-27 22:08:34 UTC
#> # A tibble: 85,458 × 34
#>    athlete_display_n… team_short_disp… min   fg    fg3   ft    oreb  dreb  reb  
#>    <chr>              <chr>            <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#>  1 Radshad Davis      Florida Int'l    32    3-11  1-5   4-4   3     3     6    
#>  2 DJ Mitchell        Florida Int'l    26    4-11  2-6   4-5   1     1     2    
#>  3 Tevin Brewer       Florida Int'l    33    9-13  5-8   0-0   0     1     1    
#>  4 Dante Wilcox       Florida Int'l    20    2-6   0-0   0-1   2     2     4    
#>  5 Antonio Daye Jr.   Florida Int'l    33    5-13  0-1   2-3   1     4     5    
#>  6 Dimon Carrigan     Florida Int'l    20    4-5   0-0   2-2   4     7     11   
#>  7 Petar Krivokapic   Florida Int'l    5     0-0   0-0   0-0   0     0     0    
#>  8 Javaunte Hawkins   Florida Int'l    10    1-3   1-3   0-0   0     0     0    
#>  9 Jonathan Nunez     Florida Int'l    3     0-0   0-0   0-0   0     0     0    
#> 10 Cameron Corcoran   Florida Int'l    18    0-5   0-3   0-0   1     0     1    
#> # … with 85,448 more rows, and 25 more variables: ast <chr>, stl <chr>,
#> #   blk <chr>, to <chr>, pf <chr>, pts <chr>, starter <lgl>, ejected <lgl>,
#> #   did_not_play <lgl>, active <lgl>, athlete_jersey <chr>, athlete_id <chr>,
#> #   athlete_short_name <chr>, athlete_headshot_href <chr>,
#> #   athlete_position_name <chr>, athlete_position_abbreviation <chr>,
#> #   team_name <chr>, team_logo <chr>, team_id <chr>, team_abbreviation <chr>,
#> #   team_color <chr>, game_id <int>, season <int>, season_type <int>, …
# }