Learn R Programming

nbastatR (version 0.1.110202031)

get_teams_players_seasons_summary_stats: NBA teams and player statisitcs

Description

Gets NBA summary statistics tables

Usage

get_teams_players_seasons_summary_stats(seasons = 2018, types = c("player",
  "team"), tables = c("defense"), season_types = "Regular Season",
  measures = "Base", modes = "PerGame", defenses = "Overall",
  is_plus_minus = F, is_pace_adjusted = F, periods = 0, is_rank = F,
  game_segments = NA, divisions_against = NA, conferences_against = NA,
  date_from = NA, date_to = NA, last_n_games = 0, locations = NA,
  months = 0, season_segments = NA, opponents = NA, countries = NA,
  weights = NA, outcomes = NA, playoff_rounds = 0,
  players_experience = NA, players_positions = NA, colleges = NA,
  draft_picks = NA, draft_years = NA, game_scopes = NA, heights = NA,
  shot_clock_ranges = NA, clutch_times = "Last 5 Minutes",
  ahead_or_behind = "Ahead or Behind", general_ranges = "Overall",
  dribble_ranges = "0 Dribbles", shot_distance_ranges = "By Zone",
  touch_time_ranges = NA, closest_defender_ranges = NA, point_diffs = 5,
  starters_bench = NA, assign_to_environment = TRUE, add_mode_names = T,
  return_message = TRUE)

Arguments

seasons

vector of seasons

types

type of data options include

  • player

  • team

tables

type of table options include

  • clutch

  • defense

  • general

  • hustle

  • shot locations

  • shots

  • splits

season_types

vector of season types options

  • Pre Season

  • Regular Season

  • Playoffs

  • All Star

measures

vector of measures options

  • Base

  • Advanced

  • Defense

  • Four Factors

  • Misc

  • Opponent

  • Scoring

  • Usage

modes

vector of modes options

  • Totals

  • MinutesPer

  • PerGame

  • Per48

  • Per40

  • Per36

  • PerMinute

  • PerPossession

  • PerPlay

  • Per100Possessions

  • Per100Plays

defenses

defense options include

  • Overall

  • 3 Pointers

  • 2 Pointers

  • Less Than 6Ft

  • Less Than 10Ft

  • Greater Than 15Ft

is_plus_minus

if `TRUE` uses plus minus

is_pace_adjusted

if `TRUE` is pace adjusted

periods

vector of periods

is_rank

if `TRUE` returns rank

game_segments

vector of game segments options

  • NA - All

  • First Half

  • Second Half

  • Overtime

divisions_against

vector of seasons options

  • NA - ALL

  • Atlantic

  • Central

  • Northwest

  • Pacific

  • Southeast

  • Southwest

  • East

  • West

conferences_against

vector of conferences against options

  • NA - ALL

  • East

  • West

date_from

dates from

date_to

dates to

last_n_games

vector games

locations

vector of locations

months

vector of months 0:12

season_segments

vector of seasons segments options

  • NA

  • Pre All-Star

  • Post All-Star

opponents

vector of opponent ids

countries

vector of countries

weights

vector of weights options

  • NA

  • LT 200

  • GT 200

  • LT 225

  • GT 225

  • LT 250

  • GT 250

  • LT 275

  • GT 275

  • LT 300

  • GT 300

outcomes

vector of outcomes options

  • NA - all

  • W

  • L

playoff_rounds

vector of playoff rounds options 0:4

players_experience

vector of experience options

  • NA

  • Rookie

  • Sophomore

  • Veteran

players_positions

vector of player positions options

  • NA

  • C

  • F

  • G

colleges

vector of colleges

draft_picks

vector of draft picks options

  • NA

  • 1st Round

  • 2nd Round

  • 1st Pick

  • Lottery Pick

  • Top 5 Pick

  • Top 10 Pick

  • Top 15 Pick

  • Top 20 Pick

  • Top 25 Pick

  • Picks 11 Thru 20

  • Picks 21 Thru 30

  • Undrafted

draft_years

numeric vector vector of draft years

game_scopes

vector game scopes options

  • NA

  • Last 10

  • Yesterday

heights

vector of heights options

  • NA

  • LT 6-0

  • GT 6-0

  • LT 6-4

  • GT 6-4

  • LT 6-7

  • GT 6-7

  • LT 6-10

  • GT 6-10

  • LT 7-0

  • GT 7-0

shot_clock_ranges

character vector of shot clock ranges options

  • NA

  • 24-22

  • 22-18 Very Early

  • 18-15 Early

  • 15-7 Average

  • 7-4 Late

  • 4-0 Very Late

  • ShotClock Off

clutch_times

clutch options options

  • NA

  • Last 5 Minutes

  • Last 4 Minutes

  • Last 3 Minutes

  • Last 2 Minutes

  • Last 1 Minute

  • Last 30 Seconds

  • Last 10 Seconds

ahead_or_behind

ahead of behind type options

  • Ahead or Behind

  • Behind or Tied

  • Ahead or Tied

general_ranges

general shop type ranges options include

  • Overall

  • Catch and Shoot

  • Less Than 10 ft

  • Pullups

dribble_ranges

range of dribbles options include

  • 0 Dribbles

  • 1 Dribble

  • 2 Dribbles

  • 3-6 Dribbles

  • 7+ Dribbles

shot_distance_ranges

shot distance

touch_time_ranges

touch time range options include

  • Touch < 2 Seconds

  • Touch 2-6 Seconds

  • Touch 6+ Seconds

closest_defender_ranges

closest defender range options include

  • NA

  • 0-2 Feet - Very Tight

  • 2-4 Feet - Tight

  • 4-6 Feet - Open

  • 6+ Feet - Wide Open

point_diffs

numeric vector between 1:5

starters_bench

vector of starter type options

  • NA

  • Bench

  • Starters

assign_to_environment

if `TRUE` assigns tables to environment

add_mode_names

if `TRUE` adds mode names

return_message

if `TRUE` returns a message

Value

a `data_frame`

See Also

Other players: get_nba_player_injuries, get_players_bios, get_seasons_metrics_league_leaders

Other teams: get_drafts, get_seasons_rosters, get_teams_franchise_leaders, get_teams_seasons_rankings

Examples

Run this code
# NOT RUN {
get_teams_players_seasons_summary_stats(seasons = 2018, types = c("player", "team"),
 modes = c("PerGame", "Totals"),
 tables = c("general", "defense", "clutch", "hustle", "shots", "shot locations"))
# }

Run the code above in your browser using DataLab