Returns NBA team data for specified teams and parameters by seasons

teams_tables(
  teams = NULL,
  team_ids = NULL,
  all_active_teams = F,
  seasons = NULL,
  tables = NULL,
  measures = NULL,
  modes = NULL,
  season_types = "Regular Season",
  playoff_rounds = NA,
  is_plus_minus = F,
  is_rank = F,
  is_pace_adjusted = F,
  outcomes = NA,
  locations = NA,
  months = NA,
  season_segments = NA,
  date_from = NA,
  date_to = NA,
  opponent_ids = NA,
  vs_confs = NA,
  vs_divisions = NA,
  game_segments = NA,
  periods = NA,
  shot_clocks = NA,
  last_n_games = NA,
  assign_to_environment = TRUE,
  return_message = TRUE
)

Arguments

teams

vector of NBA team names

team_ids

vector of team ids

all_active_teams

if TRUE returns data for all active teams

seasons

vector of seasons

tables

vector of table names options include

  • splits

  • passes

  • clutch

  • lineup

  • opponent

  • performance

  • player on off details

  • player on off summary

  • player

  • rebounding

  • shooting

  • shots

  • team vs player

  • year over year

measures

vector of measure types options include

  • Base

  • Advanced

  • Misc

  • Scoring

  • Four Factors

  • Opponent

  • Usage

  • Defense

modes

vector of modes options include

  • PerGame

  • Totals

  • MinutesPer

  • Per48

  • Per40

  • Per36

  • PerMinute

  • PerPossession

  • PerPlay

  • Per100Possessions

  • Per100Plays

#'

season_types

vector of season types options include

  • Regular Season

  • Playoffs

  • Pre Season

  • PlayIn

playoff_rounds

vector of playoff rounds options include code0:4

is_plus_minus

TRUE returns plus minus

is_rank

if TRUE returns rank

is_pace_adjusted

if TRUE adjusts for pace

outcomes

vector of outcomes options include

  • NA

  • Wins

  • Losses

locations

vector of locations options include

  • NA

  • Home

  • Road

months

vector of game months options include 0:12

season_segments

vector of season segments, options include

  • NA

  • Post All-Star

  • Pre All-Star

date_from

NA or date from

date_to

NA or date to

opponent_ids

vector of opponent ids

vs_confs

vector of conferences against options include

  • NA

  • East

  • West

vs_divisions

vector of divisions against options include

  • NA

  • Atlantic

  • Central

  • Northwest

  • Pacific

  • Southeast

  • Southwest

game_segments

vector of game segments options include

  • NA

  • First Half

  • Second Half

  • Overtime

periods

vector of periods 0:12

last_n_games

vector of last_n games 0:82

assign_to_environment

if TRUE assigns data to environment

shot_clock_ranges

vector of shot clock ranges options include

  • NA,

  • 24-22

  • 22-18 Very Early

  • 18-15 Early

  • 15-7 Average

  • 7-4 Late

  • 4-0 Very Late

  • ShotClock Off

return_messages

if TRUE returns message

Value

a tibble

Examples

teams_tables(teams = c("Brooklyn Nets", "New York Knicks"),
 seasons = 2017:2018, tables = c("splits", "shooting"), measures = "Base", modes = c("PerGame", "Totals"))