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
Examples
# \donttest{
load_mbb_player_box(seasons = most_recent_nba_season())
#> ── ESPN MBB Player Boxscore Information from hoopR data repository ─────────────
#> ℹ Data updated: 2023-03-24 09:56:17 UTC
#> # A tibble: 125,033 × 34
#> athlete_display_name team_short_display_name min fg fg3 ft oreb
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Anton Watson Gonzaga 0 3-6 1-1 1-3 5
#> 2 Drew Timme Gonzaga 0 16-24 1-1 3-6 5
#> 3 Nolan Hickman Gonzaga 0 0-4 0-1 0-0 0
#> 4 Julian Strawther Gonzaga 0 5-15 3-8 3-5 2
#> 5 Rasir Bolton Gonzaga 0 0-1 0-1 0-0 0
#> 6 Ben Gregg Gonzaga 0 0-0 0-0 0-0 0
#> 7 Hunter Sallis Gonzaga 0 2-3 0-0 1-1 1
#> 8 Malachi Smith Gonzaga 0 6-11 1-4 1-2 3
#> 9 Kenneth Nwuba UCLA 0 1-2 0-0 0-0 1
#> 10 Amari Bailey UCLA 34 7-13 2-2 3-4 0
#> # ℹ 125,023 more rows
#> # ℹ 27 more variables: dreb <chr>, reb <chr>, 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>, …
# }