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
load_nba_team_box(
seasons = most_recent_nba_season(),
...,
dbConnection = NULL,
tablename = NULL
)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()).
A DBIConnection object, as returned by
The name of the play by play data table within the database
Returns a tibble
# \donttest{
load_nba_team_box(2021)
#> # A tibble: 2,442 × 43
#> team_short_display_name team_uid team_alternate_… team_color team_display_na…
#> <chr> <chr> <chr> <chr> <chr>
#> 1 Magic s:40~l:… c4ced3 0860A8 Orlando Magic
#> 2 Hawks s:40~l:… 002b5c 002B5C Atlanta Hawks
#> 3 Knicks s:40~l:… f58426 225EA8 New York Knicks
#> 4 Pistons s:40~l:… 006bb6 FA002C Detroit Pistons
#> 5 Rockets s:40~l:… c4ced3 D40026 Houston Rockets
#> 6 Bulls s:40~l:… 000000 000000 Chicago Bulls
#> 7 Clippers s:40~l:… f1f2f3 FA0028 LA Clippers
#> 8 Lakers s:40~l:… 552582 542582 Los Angeles Lak…
#> 9 Kings s:40~l:… 8e9090 393996 Sacramento Kings
#> 10 Trail Blazers s:40~l:… bac3c9 000000 Portland Trail …
#> # … with 2,432 more rows, and 38 more variables: team_name <chr>,
#> # team_logo <chr>, team_location <chr>, team_id <chr>,
#> # team_abbreviation <chr>, team_slug <chr>,
#> # field_goals_made_field_goals_attempted <chr>, field_goal_pct <chr>,
#> # three_point_field_goals_made_three_point_field_goals_attempted <chr>,
#> # three_point_field_goal_pct <chr>,
#> # free_throws_made_free_throws_attempted <chr>, free_throw_pct <chr>, …
# }