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

Arguments

seasons

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

...

Additional arguments passed to an underlying function that writes the season data into a database (used by update_wbb_db()).

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the play by play data table within the database

Value

Returns a tibble

Examples

# \donttest{
  try(load_wbb_player_box())
#> ──────────────────────────────────────────────────────────────── wehoop 2.0.0 ──
#> # A tibble: 28,488 × 55
#>      game_id season season_type game_date  game_date_time      athlete_id
#>        <int>  <int>       <int> <date>     <dttm>                   <int>
#>  1 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    4900197
#>  2 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    4899544
#>  3 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    5177982
#>  4 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    4900196
#>  5 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    4705405
#>  6 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    4682854
#>  7 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    4434001
#>  8 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    5177985
#>  9 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    5177984
#> 10 401604382   2024           2 2023-11-24 2023-11-24 23:59:00    5177983
#> # ℹ 28,478 more rows
#> # ℹ 49 more variables: athlete_display_name <chr>, team_id <int>,
#> #   team_name <chr>, team_location <chr>, team_short_display_name <chr>,
#> #   minutes <dbl>, field_goals_made <int>, field_goals_attempted <int>,
#> #   three_point_field_goals_made <int>,
#> #   three_point_field_goals_attempted <int>, free_throws_made <int>,
#> #   free_throws_attempted <int>, offensive_rebounds <int>, …
# }