Get ESPN NBA's Standings

espn_nba_standings(year)

Arguments

year

Either numeric or character (YYYY)

Value

A standings data frame

Examples

# \donttest{
try(espn_nba_standings(year = 2021))
#>    team_id                   team playoffseed wins losses        winpercent
#> 1       26              Utah Jazz           1   52     20 0.722222208976746
#> 2       21           Phoenix Suns           2   51     21 0.708333313465118
#> 3       20     Philadelphia 76ers           1   49     23 0.680555582046509
#> 4       17          Brooklyn Nets           2   48     24 0.666666686534882
#> 5        7         Denver Nuggets           3   47     25 0.652777791023254
#> 6       12            LA Clippers           4   47     25 0.652777791023254
#> 7       15        Milwaukee Bucks           3   46     26 0.638888895511627
#> 8        6       Dallas Mavericks           5   42     30 0.583333313465118
#> 9       13     Los Angeles Lakers           7   42     30 0.583333313465118
#> 10      22 Portland Trail Blazers           6   42     30 0.583333313465118
#> 11       1          Atlanta Hawks           5   41     31 0.569444417953491
#> 12      18        New York Knicks           4   41     31 0.569444417953491
#> 13      14             Miami Heat           6   40     32 0.555555582046509
#> 14       9  Golden State Warriors           9   39     33 0.541666686534882
#> 15      29      Memphis Grizzlies           8   38     34 0.527777791023254
#> 16       2         Boston Celtics           7   36     36               0.5
#> 17      27     Washington Wizards           8   34     38 0.472222208976746
#> 18      11         Indiana Pacers           9   34     38 0.472222208976746
#> 19      24      San Antonio Spurs          10   33     39 0.458333343267441
#> 20      30      Charlotte Hornets          10   33     39 0.458333343267441
#> 21       3   New Orleans Pelicans          11   31     41 0.430555552244186
#> 22       4          Chicago Bulls          11   31     41 0.430555552244186
#> 23      23       Sacramento Kings          12   31     41 0.430555552244186
#> 24      28        Toronto Raptors          12   27     45             0.375
#> 25      16 Minnesota Timberwolves          13   23     49 0.319444447755814
#> 26       5    Cleveland Cavaliers          13   22     50 0.305555552244186
#> 27      25  Oklahoma City Thunder          14   22     50 0.305555552244186
#> 28      19          Orlando Magic          14   21     51 0.291666656732559
#> 29       8        Detroit Pistons          15   20     52 0.277777791023254
#> 30      10        Houston Rockets          15   17     55 0.236111104488373
#>    gamesbehind     avgpointsfor avgpointsagainst       differential streak
#> 1            0 116.416664123535 107.166664123535                9.2      2
#> 2            1 115.277778625488 109.458335876465                5.8      3
#> 3            3 113.638885498047 108.055557250977                5.5      2
#> 4            4 118.569442749023 114.069442749023                4.5      5
#> 5            5 115.055557250977          110.125                  5     -1
#> 6            5 114.013885498047 107.833335876465                6.2     -2
#> 7            6          120.125 114.236114501953   5.89999999999999     -1
#> 8           10 112.416664123535 110.180557250977                2.2     -1
#> 9           10 109.541664123535           106.75                2.7      5
#> 10          10 116.111114501953 114.319442749023                1.8      1
#> 11          11 113.694442749023          111.375                2.3      4
#> 12          11 107.027778625488 104.722221374512                2.3      3
#> 13          12 108.069442749023 108.041664123535 0.0999999999999943      1
#> 14          13 113.708335876465 112.652778625488                  1      6
#> 15          14 113.291664123535 112.263885498047                  1     -1
#> 16          16          112.625 111.166664123535   1.39999999999999     -1
#> 17          18 116.638885498047 118.472221374512  -1.90000000000001      2
#> 18          18 115.305557250977 115.319442749023                  0      1
#> 19          19 111.083335876465 112.819442749023               -1.7     -4
#> 20          19 109.458335876465 111.388885498047  -1.90000000000001     -5
#> 21          21 114.597221374512 114.888885498047 -0.300000000000011     -4
#> 22          21 110.680557250977 111.569442749023 -0.899999999999991      1
#> 23          21 113.736114501953 117.416664123535               -3.7     -3
#> 24          25 111.263885498047 111.736114501953 -0.400000000000006     -7
#> 25          29          112.125 117.680557250977  -5.60000000000001      1
#> 26          30 103.833335876465 112.277778625488               -8.5     -2
#> 27          30              105 115.638885498047              -10.6      1
#> 28          31              104 113.305557250977               -9.3     -7
#> 29          32 106.611114501953 111.083335876465               -4.5     -5
#> 30          35 108.791664123535 116.694442749023  -7.90000000000001     -1
#>    clincher divisionwinpercent  leaguewinpercent leaguestandings  home  road
#> 1         5  0.583333313465118 0.666666686534882           52-20  31-5 21-15
#> 2         2  0.583333313465118 0.714285731315613           51-21  27-9 24-12
#> 3         3  0.833333313465118 0.738095223903656           49-23  29-7 20-16
#> 4         1  0.666666686534882  0.61904764175415           48-24  28-8 20-16
#> 5         1               0.75  0.61904764175415           47-25 25-11 22-14
#> 6         1               0.75 0.642857134342194           47-25 26-10 21-15
#> 7         2  0.916666686534882 0.714285731315613           46-26 26-10 20-16
#> 8         2  0.583333313465118               0.5           42-30 21-15 21-15
#> 9         7  0.333333343267441 0.595238089561462           42-30 21-15 21-15
#> 10        1                0.5 0.547619044780731           42-30 20-16 22-14
#> 11        2               0.75 0.571428596973419           41-31 25-11 16-20
#> 12        1  0.333333343267441 0.595238089561462           41-31 25-11 16-20
#> 13        1                0.5 0.571428596973419           40-32 21-15 19-17
#> 14        6  0.416666656732559 0.595238089561462           39-33 25-11 14-22
#> 15        7                0.5 0.452380955219269           38-34 18-18 20-16
#> 16        7  0.333333343267441 0.476190477609634           36-36 21-15 15-21
#> 17        7               0.25 0.380952388048172           34-38 19-17 15-21
#> 18        6  0.583333313465118 0.476190477609634           34-38 13-23 21-15
#> 19        6                0.5 0.404761910438538           33-39 14-22 19-17
#> 20        6  0.666666686534882 0.476190477609634           33-39 18-18 15-21
#> 21        4                0.5 0.428571432828903           31-41 18-18 13-23
#> 22        4  0.583333313465118               0.5           31-41 15-21 16-20
#> 23        4  0.416666656732559 0.428571432828903           31-41 16-20 15-21
#> 24        4  0.333333343267441 0.404761910438538           27-45 16-20 11-25
#> 25        4  0.416666656732559 0.357142865657806           23-49 13-23 10-26
#> 26        4  0.333333343267441 0.380952388048172           22-50 13-23  9-27
#> 27        4               0.25  0.28571429848671           22-50 10-26 12-24
#> 28        4  0.333333343267441 0.309523820877075           21-51 11-25 10-26
#> 29        4 0.0833333358168602  0.28571429848671           20-52 13-23  7-29
#> 30        4  0.416666656732559 0.261904776096344           17-55  9-27  8-28
#>    vsdiv vsconf lasttengames
#> 1    7-5  28-14          7-3
#> 2    7-5  30-12          7-3
#> 3   10-2  31-11          8-2
#> 4    8-4  26-16          6-4
#> 5    9-3  26-16          6-4
#> 6    9-3  27-15          4-6
#> 7   11-1  30-12          8-2
#> 8    7-5  21-21          8-2
#> 9    4-8  25-17          6-4
#> 10   6-6  23-19          8-2
#> 11   9-3  24-18          7-3
#> 12   4-8  25-17          7-3
#> 13   6-6  24-18          8-2
#> 14   5-7  25-17          8-2
#> 15   6-6  19-23          6-4
#> 16   4-8  20-22          4-6
#> 17   3-9  16-26          6-4
#> 18   7-5  20-22          5-5
#> 19   6-6  17-25          2-8
#> 20   8-4  20-22          3-7
#> 21   6-6  18-24          4-6
#> 22   7-5  21-21          5-5
#> 23   5-7  18-24          6-4
#> 24   4-8  17-25          1-9
#> 25   5-7  15-27          5-5
#> 26   4-8  16-26          1-9
#> 27   3-9  12-30          1-9
#> 28   4-8  13-29          2-8
#> 29  1-11  12-30          1-9
#> 30   5-7  11-31          2-8
# }