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_schedule(
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: 2002)
- ...
Additional arguments passed to an underlying function that writes the season data into a database (used by
update_mbb_db()).- dbConnection
A
DBIConnectionobject, as returned by- tablename
The name of the play by play data table within the database
Value
Returns a tibble
| col_name | types | description |
| id | integer | Id. |
| uid | character | ESPN UID string (universal identifier). |
| date | character | Date in YYYY-MM-DD format. |
| attendance | integer | Reported attendance. |
| time_valid | logical | Time valid. |
| neutral_site | logical | Neutral site. |
| conference_competition | logical | Conference competition. |
| recent | logical | Recent. |
| start_date | character | Start date (YYYY-MM-DD). |
| notes_type | character | Notes type. |
| notes_headline | character | Notes headline. |
| type_id | character | Type identifier (numeric). |
| type_abbreviation | character | Type abbreviation. |
| venue_id | character | Unique venue identifier. |
| venue_full_name | character | Venue full name. |
| venue_address_city | character | Venue address city. |
| venue_address_state | character | Venue address state / region. |
| venue_capacity | integer | Venue seating capacity. |
| venue_indoor | logical | TRUE if the venue is indoors. |
| status_clock | numeric | Status clock. |
| status_display_clock | character | Status display clock. |
| status_period | integer | Status period. |
| status_type_id | character | Unique identifier for status type. |
| status_type_name | character | Status type name. |
| status_type_state | character | Status type state. |
| status_type_completed | logical | Status type completed. |
| status_type_description | character | Status type description. |
| status_type_detail | character | Status type detail. |
| status_type_short_detail | character | Status type short detail. |
| format_regulation_periods | integer | Format regulation periods. |
| home_id | character | Unique identifier for home. |
| home_uid | character | Home team's uid. |
| home_location | character | Home team's location. |
| home_name | character | Home name. |
| home_abbreviation | character | Home team's abbreviation. |
| home_display_name | character | Home display name. |
| home_short_display_name | character | Home short display name. |
| home_color | character | Color code (hex) for home. |
| home_alternate_color | character | Color code (hex) for home alternate. |
| home_is_active | logical | Home team's is active. |
| home_venue_id | character | Unique identifier for home venue. |
| home_logo | character | Home team logo URL. |
| home_conference_id | character | Unique identifier for home conference. |
| home_score | character | Home team score at the time of the play. |
| home_winner | logical | Home team's winner. |
| away_id | character | Unique identifier for away. |
| away_uid | character | Away team's uid. |
| away_location | character | Away team's location. |
| away_name | character | Away name. |
| away_abbreviation | character | Away team's abbreviation. |
| away_display_name | character | Away display name. |
| away_short_display_name | character | Away short display name. |
| away_color | character | Color code (hex) for away. |
| away_alternate_color | character | Color code (hex) for away alternate. |
| away_is_active | logical | Away team's is active. |
| away_venue_id | character | Unique identifier for away venue. |
| away_logo | character | Away team logo URL. |
| away_conference_id | character | Unique identifier for away conference. |
| away_score | character | Away team score at the time of the play. |
| away_winner | logical | Away team's winner. |
| game_id | integer | Unique game identifier. |
| season | integer | Season identifier (4-digit year or 'YYYY-YY' string). |
| season_type | integer | Season type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN; or string label for WNBA Stats). |
| status_type_alt_detail | character | Status type alt detail. |
| groups_id | character | Unique identifier for groups. |
| groups_name | character | Groups name. |
| groups_short_name | character | Groups short name. |
| groups_is_conference | logical | Groups is conference. |
| tournament_id | numeric | Unique identifier for tournament. |
| game_date_time | POSIXct | Game start date/time (ISO 8601). |
| game_date | Date | Game date (YYYY-MM-DD). |
| PBP | logical | |
| team_box | logical | Team box. |
| player_box | logical | Player box. |
See also
Other hoopR Loader Functions:
load_mbb_pbp(),
load_mbb_player_box(),
load_mbb_team_box(),
load_nba_pbp(),
load_nba_player_box(),
load_nba_schedule(),
load_nba_team_box()
Examples
# \donttest{
load_mbb_schedule(seasons = most_recent_mbb_season())
#> ── ESPN MBB Schedule from hoopR data repository ───────────────── hoopR 3.1.0 ──
#> ℹ Data updated: 2026-04-30 11:55:01 UTC
#> # A tibble: 6,318 × 87
#> id uid date attendance time_valid neutral_site conference_competition
#> <int> <chr> <chr> <dbl> <lgl> <lgl> <lgl>
#> 1 4.02e8 s:40… 2026… 70720 TRUE TRUE FALSE
#> 2 4.02e8 s:40… 2026… 9670 TRUE TRUE FALSE
#> 3 4.02e8 s:40… 2026… 3109 TRUE TRUE FALSE
#> 4 4.02e8 s:40… 2026… 72111 TRUE TRUE FALSE
#> 5 4.02e8 s:40… 2026… 72111 TRUE TRUE FALSE
#> 6 4.02e8 s:40… 2026… 2947 TRUE TRUE FALSE
#> 7 4.02e8 s:40… 2026… 2947 TRUE TRUE FALSE
#> 8 4.02e8 s:40… 2026… 0 TRUE TRUE FALSE
#> 9 4.02e8 s:40… 2026… 4625 TRUE TRUE FALSE
#> 10 4.02e8 s:40… 2026… 2310 TRUE TRUE FALSE
#> # ℹ 6,308 more rows
#> # ℹ 80 more variables: play_by_play_available <lgl>, recent <lgl>,
#> # start_date <chr>, broadcast <chr>, highlights <chr>, notes_type <chr>,
#> # notes_headline <chr>, broadcast_market <chr>, broadcast_name <chr>,
#> # type_id <int>, type_abbreviation <chr>, venue_id <int>,
#> # venue_full_name <chr>, venue_address_city <chr>, venue_address_state <chr>,
#> # venue_indoor <lgl>, status_clock <dbl>, status_display_clock <chr>, …
# }
