Skip to contents

Get ESPN NBA team stats data

Usage

espn_nba_team_stats(team_id, year, season_type = "regular", total = FALSE)

Arguments

team_id

Team ID

year

Year

season_type

(character, default: regular): Season type - regular or postseason

total

(boolean, default: FALSE): Totals

Value

Returns a tibble with the team stats data

col_nametypes
team_idinteger
team_guidcharacter
team_uidcharacter
team_slugcharacter
team_locationcharacter
team_namecharacter
team_abbreviationcharacter
team_display_namecharacter
team_short_display_namecharacter
team_colorcharacter
team_alternate_colorcharacter
team_is_activelogical
team_is_all_starlogical
logo_hrefcharacter
logo_dark_hrefcharacter
logos_href_2character
logos_href_3character
defensive_blocksnumeric
defensive_defensive_reboundsnumeric
defensive_stealsnumeric
defensive_turnover_pointsnumeric
defensive_def_rebound_ratenumeric
defensive_avg_defensive_reboundsnumeric
defensive_avg_blocksnumeric
defensive_avg_stealsnumeric
defensive_avg48defensive_reboundsnumeric
defensive_avg48blocksnumeric
defensive_avg48stealsnumeric
general_disqualificationsnumeric
general_flagrant_foulsnumeric
general_foulsnumeric
general_rebound_ratenumeric
general_ejectionsnumeric
general_technical_foulsnumeric
general_reboundsnumeric
general_minutesnumeric
general_avg_minutesnumeric
general_fantasy_ratingnumeric
general_nba_ratingnumeric
general_plus_minusnumeric
general_avg_reboundsnumeric
general_avg_foulsnumeric
general_avg_flagrant_foulsnumeric
general_avg_technical_foulsnumeric
general_avg_ejectionsnumeric
general_avg_disqualificationsnumeric
general_assist_turnover_rationumeric
general_steal_foul_rationumeric
general_block_foul_rationumeric
general_avg_team_reboundsnumeric
general_total_reboundsnumeric
general_total_technical_foulsnumeric
general_team_assist_turnover_rationumeric
general_team_reboundsnumeric
general_steal_turnover_rationumeric
general_avg48reboundsnumeric
general_avg48foulsnumeric
general_avg48flagrant_foulsnumeric
general_avg48technical_foulsnumeric
general_avg48ejectionsnumeric
general_avg48disqualificationsnumeric
general_r40numeric
general_games_playednumeric
general_games_startednumeric
general_double_doublenumeric
general_triple_doublenumeric
offensive_assistsnumeric
offensive_effective_fg_pctnumeric
offensive_field_goalsnumeric
offensive_field_goals_attemptednumeric
offensive_field_goals_madenumeric
offensive_field_goal_pctnumeric
offensive_free_throwsnumeric
offensive_free_throw_pctnumeric
offensive_free_throws_attemptednumeric
offensive_free_throws_madenumeric
offensive_offensive_reboundsnumeric
offensive_pointsnumeric
offensive_turnoversnumeric
offensive_three_point_pctnumeric
offensive_three_point_field_goals_attemptednumeric
offensive_three_point_field_goals_madenumeric
offensive_true_shooting_pctnumeric
offensive_team_turnoversnumeric
offensive_total_turnoversnumeric
offensive_assist_rationumeric
offensive_points_in_paintnumeric
offensive_off_rebound_ratenumeric
offensive_turnover_rationumeric
offensive_fast_break_pointsnumeric
offensive_possessionsnumeric
offensive_pace_factornumeric
offensive_avg_field_goals_madenumeric
offensive_avg_field_goals_attemptednumeric
offensive_avg_three_point_field_goals_madenumeric
offensive_avg_three_point_field_goals_attemptednumeric
offensive_avg_free_throws_madenumeric
offensive_avg_free_throws_attemptednumeric
offensive_avg_pointsnumeric
offensive_avg_offensive_reboundsnumeric
offensive_avg_assistsnumeric
offensive_avg_turnoversnumeric
offensive_offensive_rebound_pctnumeric
offensive_estimated_possessionsnumeric
offensive_avg_estimated_possessionsnumeric
offensive_points_per_estimated_possessionsnumeric
offensive_avg_team_turnoversnumeric
offensive_avg_total_turnoversnumeric
offensive_three_point_field_goal_pctnumeric
offensive_two_point_field_goals_madenumeric
offensive_two_point_field_goals_attemptednumeric
offensive_avg_two_point_field_goals_madenumeric
offensive_avg_two_point_field_goals_attemptednumeric
offensive_two_point_field_goal_pctnumeric
offensive_shooting_efficiencynumeric
offensive_scoring_efficiencynumeric
offensive_avg48field_goals_madenumeric
offensive_avg48field_goals_attemptednumeric
offensive_avg48three_point_field_goals_madenumeric
offensive_avg48three_point_field_goals_attemptednumeric
offensive_avg48free_throws_madenumeric
offensive_avg48free_throws_attemptednumeric
offensive_avg48pointsnumeric
offensive_avg48offensive_reboundsnumeric
offensive_avg48assistsnumeric
offensive_avg48turnoversnumeric
offensive_p40numeric
offensive_a40numeric

Author

Saiem Gilani

Examples

# \donttest{
  try(espn_nba_team_stats(team_id = 18, year = 2020))
#> ── ESPN NBA Team Season Stats from ESPN.com ───────────────────── hoopR 2.1.0 ──
#>  Data updated: 2023-11-28 22:10:07 UTC
#> # A tibble: 1 × 128
#>   team_id team_guid team_uid team_slug team_location team_name team_abbreviation
#>     <int> <chr>     <chr>    <chr>     <chr>         <chr>     <chr>            
#> 1      18 61719eb2… s:40~l:… new-york… New York      Knicks    NY               
#> # ℹ 121 more variables: team_display_name <chr>, team_short_display_name <chr>,
#> #   team_color <chr>, team_alternate_color <chr>, team_is_active <lgl>,
#> #   team_is_all_star <lgl>, logo_href <chr>, logo_dark_href <chr>,
#> #   logos_href_2 <chr>, logos_href_3 <chr>, defensive_blocks <dbl>,
#> #   defensive_defensive_rebounds <dbl>, defensive_steals <dbl>,
#> #   defensive_turnover_points <dbl>, defensive_def_rebound_rate <dbl>,
#> #   defensive_avg_defensive_rebounds <dbl>, defensive_avg_blocks <dbl>, …
# }