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_mbb_schedule(
seasons = most_recent_mbb_season(),
...,
dbConnection = NULL,
tablename = NULL
)A vector of 4-digit years associated with given men's college basketball seasons. (Min: 2002)
Additional arguments passed to an underlying function that writes
the season data into a database (used by update_mbb_db()).
A DBIConnection object, as returned by
The name of the play by play data table within the database
Returns a tibble
# \donttest{
load_mbb_schedule(2021)
#> # A tibble: 5,208 × 66
#> id uid date attendance timeValid neutralSite conferenceCompe… recent
#> <int> <chr> <chr> <int> <lgl> <lgl> <lgl> <lgl>
#> 1 4.01e8 s:40… 2021… 1027 TRUE TRUE FALSE FALSE
#> 2 4.01e8 s:40… 2021… 0 TRUE TRUE FALSE FALSE
#> 3 4.01e8 s:40… 2021… 0 TRUE TRUE FALSE FALSE
#> 4 4.01e8 s:40… 2021… 0 TRUE TRUE FALSE FALSE
#> 5 4.01e8 s:40… 2021… 737 TRUE TRUE FALSE FALSE
#> 6 4.01e8 s:40… 2021… 935 TRUE TRUE FALSE FALSE
#> 7 4.01e8 s:40… 2021… 0 TRUE TRUE FALSE FALSE
#> 8 4.01e8 s:40… 2021… 0 TRUE TRUE FALSE FALSE
#> 9 4.01e8 s:40… 2021… 751 TRUE TRUE FALSE FALSE
#> 10 4.01e8 s:40… 2021… 1044 TRUE TRUE FALSE FALSE
#> # … with 5,198 more rows, and 58 more variables: notes <chr>, startDate <chr>,
#> # type.id <int>, type.abbreviation <chr>, venue.id <int>,
#> # venue.fullName <chr>, venue.address.city <chr>, venue.address.state <chr>,
#> # venue.capacity <int>, venue.indoor <lgl>, status.clock <int>,
#> # status.displayClock <chr>, status.period <int>, status.type.id <int>,
#> # status.type.name <chr>, status.type.state <chr>,
#> # status.type.completed <lgl>, status.type.description <chr>, …
# }