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_pbp(
  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: 2006)

...

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_pbp(2021)
#> # A tibble: 1,273,763 × 53 #> shooting_play sequence_number period_display_value period_number home_score #> <lgl> <chr> <chr> <int> <int> #> 1 TRUE 101805201 1st Half 1 0 #> 2 FALSE 101805501 1st Half 1 0 #> 3 TRUE 101805701 1st Half 1 0 #> 4 FALSE 101807701 1st Half 1 0 #> 5 FALSE 101807702 1st Half 1 0 #> 6 FALSE 101807901 1st Half 1 0 #> 7 TRUE 101809101 1st Half 1 0 #> 8 FALSE 101809601 1st Half 1 0 #> 9 TRUE 101809801 1st Half 1 2 #> 10 TRUE 101815401 1st Half 1 2 #> # … with 1,273,753 more rows, and 48 more variables: scoring_play <lgl>, #> # clock_display_value <chr>, team_id <chr>, type_id <chr>, type_text <chr>, #> # away_score <int>, id <dbl>, text <chr>, score_value <int>, #> # participants_0_athlete_id <chr>, participants_1_athlete_id <chr>, #> # season <int>, season_type <int>, away_team_id <int>, away_team_name <chr>, #> # away_team_mascot <chr>, away_team_abbrev <chr>, away_team_name_alt <chr>, #> # home_team_id <int>, home_team_name <chr>, home_team_mascot <chr>, …
# }