Learn R Programming

hoopR (version 3.1.0)

cbbd_stats_team_season: CBD Team Season Stats

Description

Get team season statistics from the CollegeBasketballData API.

Get the team statistics leaderboard from the CollegeBasketballData API.

Get team season shooting statistics from the CollegeBasketballData API.

Get player season statistics from the CollegeBasketballData API.

Get player season shooting statistics from the CollegeBasketballData API.

Usage

cbbd_stats_team_season(
  season = most_recent_mbb_season(),
  season_type = NULL,
  team = NULL,
  conference = NULL,
  start_date_range = NULL,
  end_date_range = NULL
)

cbbd_stats_team_leaderboard( season = most_recent_mbb_season(), team = NULL, conference = NULL )

cbbd_stats_team_shooting_season( season = most_recent_mbb_season(), season_type = NULL, team = NULL, conference = NULL, start_date_range = NULL, end_date_range = NULL )

cbbd_stats_player_season( season = most_recent_mbb_season(), season_type = NULL, team = NULL, conference = NULL, start_date_range = NULL, end_date_range = NULL )

cbbd_stats_player_shooting_season( season = most_recent_mbb_season(), season_type = NULL, team = NULL, conference = NULL, start_date_range = NULL, end_date_range = NULL )

Value

A hoopR_data tibble with one row per team-season. The team_stats

and opponent_stats objects are flattened into team_stats_* / opponent_stats_* columns. Key identifying columns:

col_nametypesdescription
seasonintegerSeason (4-digit ending-year).
team_idintegerTeam id.
teamcharacterTeam name.
conferencecharacterConference name.
gamesintegerGames played.
winsnumericWins.
lossesnumericLosses.
total_minutesnumericTotal minutes played.
pacenumericAverage pace (possessions).

A hoopR_data tibble with one row per team. Nested statistic objects (record, summary, team_stats, opponent_stats, shot_profile, adjusted_efficiency) are flattened into prefixed columns. Key identifying columns:

col_nametypesdescription
seasonintegerSeason (4-digit ending-year).
team_idintegerTeam id.
teamcharacterTeam name.

A hoopR_data tibble with one row per team-season. Shot-type objects (dunks, layups, tip_ins, two_point_jumpers, three_point_jumpers, free_throws, attempts_breakdown) are flattened into prefixed columns. Key identifying columns:

col_nametypesdescription
seasonintegerSeason (4-digit ending-year).
team_idintegerTeam id.
teamcharacterTeam name.
conferencecharacterConference name.
tracked_shotsintegerNumber of tracked shots.
assisted_pctnumericAssisted field-goal percentage.

A hoopR_data tibble with one row per player-season. Nested statistic objects (field_goals, two_point_field_goals, three_point_field_goals, free_throws, rebounds, win_shares) are flattened into prefixed columns. Key identifying columns:

col_nametypesdescription
seasonintegerSeason (4-digit ending-year).
team_idintegerTeam id.
teamcharacterTeam name.
conferencecharacterConference name.
athlete_idintegerAthlete id.
namecharacterPlayer name.
positioncharacterPlayer position.
gamesnumericGames played.
minutesnumericMinutes played.
pointsnumericTotal points.

A hoopR_data tibble with one row per player-season. Shot-type objects are flattened into prefixed columns. Key identifying columns:

col_nametypesdescription
seasonintegerSeason (4-digit ending-year).
team_idintegerTeam id.
teamcharacterTeam name.
conferencecharacterConference name.
athlete_idintegerAthlete id.
athlete_namecharacterPlayer name.
tracked_shotsintegerNumber of tracked shots.
assisted_pctnumericAssisted field-goal percentage.

Arguments

season

(integer optional): Season, 4-digit ending-year (e.g. 2024). Defaults to most_recent_mbb_season().

season_type

(character optional): One of regular, postseason, preseason.

team

(character optional): Team name filter.

conference

(character optional): Conference abbreviation filter.

start_date_range

(character optional): ISO 8601 start of date range.

end_date_range

(character optional): ISO 8601 end of date range.

Examples

Run this code
# \donttest{
  try(cbbd_stats_team_season(season = 2024, team = "Duke"))
# }
# \donttest{
  try(cbbd_stats_team_leaderboard(season = 2024))
# }
# \donttest{
  try(cbbd_stats_team_shooting_season(season = 2024, team = "Duke"))
# }
# \donttest{
  try(cbbd_stats_player_season(season = 2024, team = "Duke"))
# }
# \donttest{
  try(cbbd_stats_player_shooting_season(season = 2024, team = "Duke"))
# }

Run the code above in your browser using DataLab