All available team tables from BREF for specified seasons using {nbastatR}
library(tidyverse)
library(nbastatR)
library(lubridate)
library(gt)
library(skimr)
The bref_team_stats()
function in nbastatR will, by default, assign several data frames to the environment: dataBREFShootingTeams
, dataBREFStandings
, dataBREFStandingsConfTeams
, dataBREFStandingsDivTeams
, dataBREFTeamJoined
, and dataBREFTotalsTeams
. All of these are summary tables for the teams over the course of the season.
bref_teams_stats(seasons = 2019)
#> Parsing https://www.basketball-reference.com/leagues/NBA_2019.html
#> StandingsConf
#> Assigning NBA player dictionary to df_dict_nba_players to your environment
#> StandingsDiv
#> PerGame
#> Totals
#> PerPoss
#> Misc
#> Shooting
#> # A tibble: 1 x 2
#> nameTable dataTable
#> <chr> <list>
#> 1 Team Data <tibble [30 × 228]>
Here I’ll use the glimpse()
function from the tibble package to see what variables are in the data frame.
glimpse(dataBREFTotalsTeams)
#> Observations: 30
#> Variables: 54
#> $ slugSeason <chr> "2018-19", "2018-19", "2018-19", "201…
#> $ yearSeason <dbl> 2019, 2019, 2019, 2019, 2019, 2019, 2…
#> $ urlSeasonBREF <chr> "https://www.basketball-reference.com…
#> $ nameTeam <chr> "Atlanta Hawks", "Boston Celtics", "B…
#> $ isPlayoffTeam <lgl> FALSE, TRUE, FALSE, FALSE, FALSE, FAL…
#> $ countGamesTeam <dbl> 80, 80, 80, 79, 80, 80, 79, 79, 79, 7…
#> $ slugTeamBREF <chr> "ATL", "BOS", "BRK", "CHO", "CHI", "C…
#> $ urlBREFTeamData <chr> "https://www.basketball-reference.com…
#> $ idTeamNBA <int> 1610612737, 1610612738, 1610612751, 1…
#> $ urlThumbnailTeam <chr> "https://stats.nba.com/media/img/team…
#> $ minutesTotalsTeam <dbl> 19375, 19300, 19500, 19110, 19425, 19…
#> $ minutesTotalsOpponent <dbl> 19375, 19300, 19500, 19110, 19425, 19…
#> $ fgmTotalsTeam <dbl> 3309, 3364, 3218, 3173, 3191, 3118, 3…
#> $ fgmTotalsOpponent <dbl> 3423, 3157, 3381, 3314, 3375, 3451, 3…
#> $ fgaTotalsTeam <dbl> 7321, 7235, 7156, 7118, 7027, 7016, 6…
#> $ fgaTotalsOpponent <dbl> 7228, 7035, 7398, 7042, 7130, 6988, 7…
#> $ pctFGTotalsTeam <dbl> 0.452, 0.465, 0.450, 0.446, 0.454, 0.…
#> $ pctFGTotalsOpponent <dbl> 0.474, 0.449, 0.457, 0.471, 0.473, 0.…
#> $ fg3mTotalsTeam <dbl> 1033, 1005, 1015, 937, 729, 828, 983,…
#> $ fg3mTotalsOpponent <dbl> 992, 918, 830, 960, 964, 953, 878, 85…
#> $ fg3aTotalsTeam <dbl> 2948, 2754, 2871, 2679, 2077, 2329, 2…
#> $ fg3aTotalsOpponent <dbl> 2749, 2676, 2418, 2647, 2643, 2524, 2…
#> $ pctFG3TotalsTeam <dbl> 0.350, 0.365, 0.354, 0.350, 0.351, 0.…
#> $ pctFG3TotalsOpponent <dbl> 0.361, 0.343, 0.343, 0.363, 0.365, 0.…
#> $ fg2mTotalsTeam <dbl> 2276, 2359, 2203, 2236, 2462, 2290, 2…
#> $ fg2mTotalsOpponent <dbl> 2431, 2239, 2551, 2354, 2411, 2498, 2…
#> $ fg2aTotalsTeam <dbl> 4373, 4481, 4285, 4439, 4950, 4687, 3…
#> $ fg2aTotalsOpponent <dbl> 4479, 4359, 4980, 4395, 4487, 4464, 4…
#> $ pctFG2TotalsTeam <dbl> 0.520, 0.526, 0.514, 0.504, 0.497, 0.…
#> $ pctFG2TotalsOpponent <dbl> 0.543, 0.514, 0.512, 0.536, 0.537, 0.…
#> $ ftmTotalsTeam <dbl> 1402, 1259, 1532, 1456, 1299, 1316, 1…
#> $ ftmTotalsOpponent <dbl> 1700, 1394, 1428, 1273, 1360, 1264, 1…
#> $ ftaTotalsTeam <dbl> 1861, 1561, 2059, 1828, 1651, 1659, 2…
#> $ ftaTotalsOpponent <dbl> 2248, 1832, 1850, 1617, 1777, 1641, 1…
#> $ pctFTTotalsTeam <dbl> 0.753, 0.807, 0.744, 0.796, 0.787, 0.…
#> $ pctFTTotalsOpponent <dbl> 0.756, 0.761, 0.772, 0.787, 0.765, 0.…
#> $ orbTotalsTeam <dbl> 924, 785, 863, 797, 703, 855, 796, 94…
#> $ orbTotalsOpponent <dbl> 847, 828, 889, 784, 804, 766, 813, 76…
#> $ drbTotalsTeam <dbl> 2747, 2779, 2836, 2682, 2725, 2567, 2…
#> $ drbTotalsOpponent <dbl> 2824, 2833, 2815, 2837, 2896, 2765, 2…
#> $ trbTotalsTeam <dbl> 3671, 3564, 3699, 3479, 3428, 3422, 3…
#> $ trbTotalsOpponent <dbl> 3671, 3661, 3704, 3621, 3700, 3531, 3…
#> $ astTotalsTeam <dbl> 2064, 2100, 1902, 1826, 1761, 1658, 1…
#> $ astTotalsOpponent <dbl> 2161, 1883, 1895, 2065, 2047, 2045, 1…
#> $ stlTotalsTeam <dbl> 668, 687, 525, 575, 592, 517, 518, 61…
#> $ stlTotalsOpponent <dbl> 790, 545, 623, 554, 596, 550, 620, 59…
#> $ blkTotalsTeam <dbl> 409, 428, 332, 391, 344, 192, 336, 35…
#> $ blkTotalsOpponent <dbl> 431, 307, 425, 481, 453, 447, 356, 39…
#> $ tovTotalsTeam <dbl> 1369, 1032, 1208, 976, 1144, 1074, 11…
#> $ tovTotalsOpponent <dbl> 1212, 1210, 1076, 1080, 1076, 994, 10…
#> $ pfTotalsTeam <dbl> 1879, 1634, 1737, 1510, 1632, 1608, 1…
#> $ pfTotalsOpponent <dbl> 1766, 1570, 1777, 1631, 1507, 1561, 1…
#> $ ptsTotalsTeam <dbl> 9053, 8992, 8983, 8739, 8410, 8380, 8…
#> $ ptsTotalsOpponent <dbl> 9538, 8626, 9020, 8861, 9074, 9119, 8…
To make these summaries a bit more visual, I like to use the skim()
function from the skimr package.
skimr::skim(dataBREFPerGameTeams) %>% skimr::kable()
#> Skim summary statistics
#> n obs: 30
#> n variables: 54
#>
#> Variable type: character
#>
#> variable missing complete n min max empty n_unique
#> ------------------ --------- ---------- ---- ----- ----- ------- ----------
#> nameTeam 0 30 30 9 22 0 30
#> slugSeason 0 30 30 7 7 0 1
#> slugTeamBREF 0 30 30 3 3 0 30
#> urlBREFTeamData 0 30 30 56 56 0 30
#> urlSeasonBREF 0 30 30 58 58 0 1
#> urlThumbnailTeam 0 30 30 56 56 0 30
#>
#> Variable type: integer
#>
#> variable missing complete n mean sd p0 p25 p50 p75 p100 hist
#> ----------- --------- ---------- ---- --------- -------- --------- --------- --------- --------- --------- ----------
#> idTeamNBA 0 30 30 1.6e+09 497.55 1.6e+09 1.6e+09 1.6e+09 1.6e+09 1.6e+09 ▁▁▁▁▁▁▁▇
#>
#> Variable type: logical
#>
#> variable missing complete n mean count
#> --------------- --------- ---------- ---- ------ -------------------------
#> isPlayoffTeam 0 30 30 0.43 FAL: 17, TRU: 13, NA: 0
#>
#> Variable type: numeric
#>
#> variable missing complete n mean sd p0 p25 p50 p75 p100 hist
#> ------------------------ --------- ---------- ---- -------- ------- ------- -------- ------- -------- ------- ----------
#> astPerGameOpponent 0 30 30 24.56 1.29 21.3 23.55 24.55 25.6 27 ▁▁▅▅▇▂▆▃
#> astPerGameTeam 0 30 30 24.56 2.11 20 23.2 24.55 26 29.4 ▃▁▆▇▆▇▁▁
#> blkPerGameOpponent 0 30 30 4.97 0.61 3.7 4.6 5.05 5.38 6.1 ▃▁▇▃▇▇▅▂
#> blkPerGameTeam 0 30 30 4.97 0.73 2.4 4.7 5 5.4 6.4 ▁▁▁▃▆▇▃▁
#> countGamesTeam 0 30 30 79.6 0.5 79 79 80 80 80 ▅▁▁▁▁▁▁▇
#> drbPerGameOpponent 0 30 30 34.77 1.11 32.5 34.12 34.75 35.62 36.8 ▂▃▃▇▃▇▇▂
#> drbPerGameTeam 0 30 30 34.78 1.8 31.2 33.9 34.75 35.72 40.3 ▂▂▇▇▅▁▁▁
#> fg2aPerGameOpponent 0 30 30 57.21 2.48 50.9 55.85 57.25 58.5 62.3 ▁▁▂▃▇▃▂▂
#> fg2aPerGameTeam 0 30 30 57.23 4.55 42.1 55.18 57.35 61.08 63.3 ▁▁▁▂▅▇▆▇
#> fg2mPerGameOpponent 0 30 30 29.72 1.49 25.8 29.33 30 30.48 31.9 ▂▁▂▂▃▇▃▅
#> fg2mPerGameTeam 0 30 30 29.73 2.16 23.1 28.33 30.2 31.28 33.4 ▁▁▂▂▇▇▇▃
#> fg3aPerGameOpponent 0 30 30 31.93 1.99 27.8 30.2 32.3 33.5 36 ▂▃▃▃▇▇▂▁
#> fg3aPerGameTeam 0 30 30 31.93 4.26 25.3 29.15 31.75 34.3 45.1 ▅▇▇▇▃▁▁▁
#> fg3mPerGameOpponent 0 30 30 11.33 0.87 9.6 10.62 11.55 11.9 12.9 ▂▅▅▃▅▇▅▂
#> fg3mPerGameTeam 0 30 30 11.32 1.5 9.1 10.05 11.15 12.25 16 ▆▅▇▅▃▁▁▁
#> fgaPerGameOpponent 0 30 30 89.14 2.44 83 87.75 89.3 90.57 93.4 ▁▁▅▆▆▇▃▅
#> fgaPerGameTeam 0 30 30 89.14 2.11 84.3 87.73 89.1 90.47 93.9 ▁▂▇▇▆▇▁▂
#> fgmPerGameOpponent 0 30 30 41.04 1.5 37.4 40.15 41.25 42 43.4 ▁▂▂▇▃▅▇▅
#> fgmPerGameTeam 0 30 30 41.05 1.66 37.8 39.95 41.35 42.27 43.9 ▂▅▂▇▇▇▃▃
#> ftaPerGameOpponent 0 30 30 23.15 1.96 20.2 22.13 22.95 24.03 28.1 ▅▂▇▅▃▁▁▂
#> ftaPerGameTeam 0 30 30 23.13 2.22 19.2 21.2 23.15 24.4 28.5 ▂▅▂▇▃▃▁▂
#> ftmPerGameOpponent 0 30 30 17.74 1.51 15.3 16.77 17.8 18.3 21.3 ▃▃▃▇▂▁▁▂
#> ftmPerGameTeam 0 30 30 17.74 1.72 14.9 16.5 17.7 18.5 22.7 ▃▆▆▇▃▁▁▁
#> minutesPerGameOpponent 0 30 30 241.64 0.83 240.3 241 241.6 242.2 243.8 ▅▂▇▂▅▂▁▁
#> minutesPerGameTeam 0 30 30 241.64 0.83 240.3 241 241.6 242.2 243.8 ▅▂▇▂▅▂▁▁
#> orbPerGameOpponent 0 30 30 10.34 0.76 8.9 9.9 10.3 10.9 11.8 ▅▂▅▇▅▃▇▂
#> orbPerGameTeam 0 30 30 10.34 0.99 8.7 9.7 10.1 11.07 12.5 ▂▅▇▂▃▃▂▁
#> pctFG2PerGameOpponent 0 30 30 0.52 0.018 0.48 0.51 0.52 0.53 0.56 ▁▂▅▇▃▇▂▁
#> pctFG2PerGameTeam 0 30 30 0.52 0.02 0.48 0.51 0.52 0.53 0.56 ▂▂▇▅▅▃▂▂
#> pctFG3PerGameOpponent 0 30 30 0.35 0.011 0.34 0.34 0.35 0.36 0.38 ▇▅▂▃▇▂▁▂
#> pctFG3PerGameTeam 0 30 30 0.36 0.015 0.33 0.35 0.35 0.36 0.39 ▂▆▇▇▂▂▁▂
#> pctFGPerGameOpponent 0 30 30 0.46 0.013 0.43 0.45 0.46 0.47 0.49 ▁▂▇▆▇▂▂▁
#> pctFGPerGameTeam 0 30 30 0.46 0.013 0.43 0.45 0.46 0.47 0.49 ▁▃▇▂▅▇▂▁
#> pctFTPerGameOpponent 0 30 30 0.77 0.011 0.74 0.76 0.77 0.77 0.79 ▁▁▇▃▇▇▅▅
#> pctFTPerGameTeam 0 30 30 0.77 0.033 0.69 0.75 0.77 0.79 0.82 ▂▂▂▅▇▇▇▅
#> pfPerGameOpponent 0 30 30 20.98 1.27 18.8 20.1 20.8 21.88 24 ▂▇▇▆▃▆▁▂
#> pfPerGameTeam 0 30 30 20.97 1.32 18.2 20.15 21.05 21.65 23.7 ▂▂▃▆▇▃▁▃
#> ptsPerGameOpponent 0 30 30 111.15 3.87 104.3 107.97 111 113.88 119.2 ▅▅▃▇▅▇▃▁
#> ptsPerGameTeam 0 30 30 111.14 4.07 103 107.5 112.1 114.1 118.2 ▃▂▆▁▇▇▅▂
#> stlPerGameOpponent 0 30 30 7.66 0.71 6.5 7.17 7.55 7.8 9.9 ▂▂▇▃▂▁▁▁
#> stlPerGameTeam 0 30 30 7.66 0.85 6.1 6.9 7.6 8.38 9.5 ▂▇▁▇▁▇▂▁
#> tovPerGameOpponent 0 30 30 14.14 1.21 12.2 13.33 13.8 15.1 16.9 ▃▅▇▃▃▃▂▁
#> tovPerGameTeam 0 30 30 14.14 1.02 12 13.53 14 14.73 17.1 ▂▂▆▇▃▂▁▁
#> trbPerGameOpponent 0 30 30 45.1 1.47 42.2 44.02 45.25 45.88 47.9 ▃▂▅▇▇▇▂▃
#> trbPerGameTeam 0 30 30 45.12 2.1 40.4 44.15 45.3 46.27 49.6 ▂▂▃▅▇▆▃▁
#> yearSeason 0 30 30 2019 0 2019 2019 2019 2019 2019 ▁▁▁▇▁▁▁▁
Since there’s not much in the way of missing data, and I’d like to be able to see the histograms generated by skimr, I’m going to use skim_to_list()
and be a bit more selective about which summary statistics I want to show.
skimmed_list_per_poss <- skim_to_list(dataBREFPerPossTeams)
numeric_skim_per_poss <- skimmed_list_per_poss$numeric
numeric_skim_per_poss %>%
select(one_of(c("variable", "mean", "sd", "p0", "p25", "p50", "p75", "p100", "hist"))) %>%
mutate(mean = as.numeric(mean),
sd = as.numeric(sd)) %>%
mutate_at(vars(starts_with("p")), as.numeric) %>%
select(-p0) %>%
skimr::kable() %>%
kableExtra::kable_styling(row_label_position = "l")
variable | mean | sd | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|
astPerPossOpponent | 24.39 | 1.180 | 23.70 | 24.15 | 25.48 | 26.30 | ▁▁▃▅▇▃▅▅ |
astPerPossTeam | 24.37 | 1.980 | 23.20 | 24.50 | 25.75 | 29.00 | ▁▃▇▆▇▇▁▂ |
blkPerPossOpponent | 4.93 | 0.620 | 4.53 | 4.90 | 5.27 | 6.10 | ▃▁▃▃▇▅▃▃ |
blkPerPossTeam | 4.93 | 0.700 | 4.53 | 5.00 | 5.27 | 6.30 | ▁▁▁▃▂▇▃▁ |
countGamesTeam | 79.60 | 0.500 | 79.00 | 80.00 | 80.00 | 80.00 | ▅▁▁▁▁▁▁▇ |
drbPerPossOpponent | 34.54 | 1.100 | 33.70 | 34.50 | 35.35 | 36.60 | ▃▅▇▇▃▅▂▃ |
drbPerPossTeam | 34.53 | 1.590 | 33.70 | 34.65 | 35.45 | 38.90 | ▂▂▃▇▇▅▁▁ |
fg2aPerPossOpponent | 56.80 | 2.110 | 55.42 | 56.85 | 57.77 | 60.80 | ▁▂▇▇▇▇▁▅ |
fg2aPerPossTeam | 56.80 | 4.470 | 54.45 | 57.20 | 60.05 | 63.80 | ▁▁▁▃▃▇▇▃ |
fg2mPerPossOpponent | 29.52 | 1.380 | 29.02 | 29.85 | 30.55 | 32.20 | ▃▁▃▇▆▇▅▁ |
fg2mPerPossTeam | 29.51 | 1.970 | 28.50 | 29.70 | 30.78 | 32.70 | ▁▁▂▂▅▇▅▃ |
fg3aPerPossOpponent | 31.69 | 1.860 | 30.10 | 32.55 | 33.00 | 34.70 | ▂▁▅▂▁▇▇▁ |
fg3aPerPossTeam | 31.70 | 4.250 | 28.82 | 31.55 | 34.00 | 45.80 | ▃▇▅▇▂▁▁▁ |
fg3mPerPossOpponent | 11.24 | 0.840 | 10.60 | 11.45 | 11.88 | 12.60 | ▃▃▇▁▇▅▇▃ |
fg3mPerPossTeam | 11.23 | 1.490 | 9.93 | 11.00 | 12.28 | 16.20 | ▇▆▅▇▂▁▁▁ |
fgaPerPossOpponent | 88.49 | 1.440 | 87.70 | 88.95 | 89.50 | 90.70 | ▂▁▂▆▃▅▇▃ |
fgaPerPossTeam | 88.51 | 1.690 | 87.32 | 88.40 | 90.17 | 91.90 | ▅▁▇▆▃▇▃▁ |
fgmPerPossOpponent | 40.75 | 1.280 | 39.75 | 40.65 | 41.68 | 44.40 | ▃▇▇▇▇▁▁▁ |
fgmPerPossTeam | 40.74 | 1.300 | 39.73 | 40.70 | 41.85 | 43.30 | ▂▂▇▅▆▆▂▃ |
ftaPerPossOpponent | 22.95 | 1.770 | 22.00 | 22.70 | 24.00 | 27.30 | ▃▃▇▅▆▁▁▂ |
ftaPerPossTeam | 22.96 | 2.040 | 21.50 | 22.70 | 24.23 | 27.90 | ▃▆▇▇▃▅▁▂ |
ftmPerPossOpponent | 17.60 | 1.370 | 17.00 | 17.40 | 18.28 | 20.50 | ▂▂▂▇▃▂▁▃ |
ftmPerPossTeam | 17.59 | 1.620 | 16.20 | 17.40 | 18.48 | 22.10 | ▃▆▇▅▃▁▁▁ |
minutesPerPossOpponent | 19234.00 | 144.440 | 19116.25 | 19275.00 | 19325.00 | 19500.00 | ▅▅▅▁▇▅▅▂ |
minutesPerPossTeam | 19234.00 | 144.440 | 19116.25 | 19275.00 | 19325.00 | 19500.00 | ▅▅▅▁▇▅▅▂ |
orbPerPossOpponent | 10.25 | 0.660 | 9.90 | 10.30 | 10.70 | 11.60 | ▁▃▃▇▇▆▅▁ |
orbPerPossTeam | 10.26 | 0.960 | 9.53 | 10.15 | 10.93 | 12.20 | ▇▇▃▇▃▃▃▂ |
pctFG2PerPossOpponent | 0.52 | 0.018 | 0.51 | 0.52 | 0.53 | 0.56 | ▁▂▅▇▃▇▂▁ |
pctFG2PerPossTeam | 0.52 | 0.020 | 0.51 | 0.52 | 0.53 | 0.56 | ▂▂▇▅▅▃▂▂ |
pctFG3PerPossOpponent | 0.35 | 0.011 | 0.34 | 0.35 | 0.36 | 0.38 | ▇▅▂▃▇▂▁▂ |
pctFG3PerPossTeam | 0.36 | 0.015 | 0.35 | 0.35 | 0.36 | 0.39 | ▂▆▇▇▂▂▁▂ |
pctFGPerPossOpponent | 0.46 | 0.013 | 0.45 | 0.46 | 0.47 | 0.49 | ▁▂▇▆▇▂▂▁ |
pctFGPerPossTeam | 0.46 | 0.013 | 0.45 | 0.46 | 0.47 | 0.49 | ▁▃▇▂▅▇▂▁ |
pctFTPerPossOpponent | 0.77 | 0.011 | 0.76 | 0.77 | 0.77 | 0.79 | ▁▁▇▃▇▇▅▅ |
pctFTPerPossTeam | 0.77 | 0.033 | 0.75 | 0.77 | 0.79 | 0.82 | ▂▂▂▅▇▇▇▅ |
pfPerPossOpponent | 20.82 | 1.150 | 20.22 | 20.70 | 21.78 | 23.50 | ▃▂▇▇▁▆▁▂ |
pfPerPossTeam | 20.82 | 1.200 | 20.22 | 20.75 | 21.35 | 23.30 | ▃▁▃▇▇▁▃▂ |
ptsPerPossOpponent | 110.34 | 2.940 | 108.12 | 110.20 | 112.55 | 117.40 | ▃▆▆▇▅▅▁▁ |
ptsPerPossTeam | 110.33 | 3.010 | 108.20 | 110.35 | 112.62 | 115.80 | ▅▁▇▇▅▇▃▃ |
stlPerPossOpponent | 7.59 | 0.620 | 7.25 | 7.50 | 7.90 | 9.40 | ▃▅▇▇▃▁▁▁ |
stlPerPossTeam | 7.59 | 0.820 | 6.93 | 7.45 | 8.17 | 9.10 | ▂▇▇▅▂▇▃▃ |
tovPerPossOpponent | 14.03 | 1.170 | 13.12 | 13.75 | 15.05 | 16.30 | ▃▇▅▁▃▃▃▂ |
tovPerPossTeam | 14.02 | 0.880 | 13.53 | 14.05 | 14.38 | 16.30 | ▂▂▅▇▅▂▁▁ |
trbPerPossOpponent | 44.78 | 1.220 | 44.02 | 44.80 | 45.85 | 47.20 | ▃▁▇▇▅▇▇▁ |
trbPerPossTeam | 44.78 | 1.850 | 44.00 | 44.75 | 45.98 | 47.90 | ▁▁▂▁▇▅▃▃ |
yearSeason | 2019.00 | 0.000 | 2019.00 | 2019.00 | 2019.00 | 2019.00 | ▁▁▁▇▁▁▁▁ |
I’ll use the same approach as I did above for the “Miscellaneous” stats.
variable | mean | sd | p25 | p50 | p75 | p100 | hist |
---|---|---|---|---|---|---|---|
ageMeanMisc | 26.2800 | 1.380 | 25.45 | 26.30 | 27.00 | 29.20 | ▃▁▃▇▇▃▁▃ |
attendanceArenaTeam | 709709.4000 | 66261.380 | 662416.50 | 725228.50 | 752094.75 | 818145.00 | ▅▃▂▅▇▇▂▅ |
attendancePerGameTeam | 17827.4000 | 1662.730 | 16560.25 | 18130.50 | 19258.00 | 20454.00 | ▇▂▅▇▆▆▆▆ |
drtgTeamMisc | 110.3400 | 2.940 | 108.12 | 110.20 | 112.55 | 117.40 | ▃▆▆▇▅▅▁▁ |
lossesPythagTeam | 39.6700 | 11.330 | 29.50 | 40.50 | 43.75 | 61.00 | ▂▆▃▃▇▂▁▃ |
lossesTeam | 39.8000 | 11.680 | 30.50 | 40.00 | 47.75 | 64.00 | ▅▅▇▇▃▅▁▃ |
marginVictoryTeam | 0.0033 | 4.870 | -1.72 | -0.33 | 4.01 | 9.13 | ▃▁▂▇▂▅▃▁ |
nrtgTeamMisc | -0.0033 | 4.820 | -1.73 | -0.35 | 4.05 | 8.80 | ▃▁▂▇▃▃▆▁ |
ortgTeamMisc | 110.3300 | 3.010 | 108.20 | 110.35 | 112.62 | 115.80 | ▅▁▇▇▅▇▃▃ |
paceTeamMisc | 100.0500 | 2.120 | 98.15 | 100.00 | 101.55 | 103.80 | ▂▇▅▂▇▃▁▇ |
pct3PRateMisc | 0.3600 | 0.048 | 0.33 | 0.35 | 0.38 | 0.52 | ▃▇▃▆▂▁▁▁ |
pctDRBOpponentMisc | 77.0700 | 1.730 | 76.25 | 77.00 | 78.10 | 80.40 | ▁▂▁▅▇▅▂▂ |
pctEFGTeamMisc | 0.5200 | 0.015 | 0.51 | 0.53 | 0.53 | 0.56 | ▁▂▆▃▇▂▁▁ |
pctEFGTeamOppMisc | 0.5200 | 0.014 | 0.51 | 0.52 | 0.53 | 0.56 | ▂▇▃▃▂▃▁▁ |
pctFTRateMisc | 0.2600 | 0.026 | 0.24 | 0.26 | 0.27 | 0.33 | ▂▅▅▇▂▂▁▂ |
pctORBTeamMisc | 22.9000 | 1.880 | 21.90 | 22.50 | 24.50 | 26.90 | ▂▅▇▇▂▅▃▂ |
pctTOVOpponentMisc | 12.4500 | 1.000 | 11.70 | 12.25 | 13.33 | 14.50 | ▆▇▅▁▆▆▁▃ |
pctTOVTeamMisc | 12.4600 | 0.790 | 12.00 | 12.45 | 12.90 | 14.40 | ▃▃▆▇▅▃▁▁ |
pctTrueShootingeTeamMisc | 0.5600 | 0.015 | 0.55 | 0.56 | 0.57 | 0.60 | ▁▇▇▇▅▇▁▁ |
ratingSimpleSystemMisc | 0.0040 | 4.680 | -1.59 | -0.57 | 3.88 | 8.31 | ▃▁▁▇▂▂▅▂ |
ratingStrengthOfScheduleMisc | 0.0000 | 0.370 | -0.34 | 0.06 | 0.27 | 0.69 | ▁▃▃▂▃▇▂▂ |
ratioFTtoFGAOpponent | 0.2000 | 0.017 | 0.19 | 0.20 | 0.21 | 0.24 | ▂▃▇▇▇▂▁▃ |
ratioFTtoFGATeam | 0.2000 | 0.020 | 0.18 | 0.20 | 0.21 | 0.26 | ▅▇▇▇▅▁▁▁ |
winsPythagTeam | 39.9300 | 11.280 | 36.00 | 39.00 | 49.75 | 60.00 | ▃▁▂▇▂▂▆▁ |
winsTeam | 39.8000 | 11.660 | 32.00 | 39.50 | 48.75 | 59.00 | ▃▁▂▇▇▇▇▃ |
yearSeason | 2019.0000 | 0.000 | 2019.00 | 2019.00 | 2019.00 | 2019.00 | ▁▁▁▇▁▁▁▁ |
You can also see all of the variables in the data frame, dataBREFTeamJoined
, but, with 220+ variables and different units of observation (e.g. per game versus per possession), I prefer to look at things separately.
Since I like to include the date in things, I’ll create a yesterday
object. I’m also sourcing a string of footnote glyphs I like to use, since they’re annoying to type.
Let’s make some pretty tables using Rich Iannone’s {gt}. For some reason, basketball-reference has the incorrect logo for Denver, so I’ll use case_when()
to fix that particular instance of urlThumbnailTeam
.
NBA Team Ratings | ||||||||
---|---|---|---|---|---|---|---|---|
NBA 2018-2019 Regular Season through 2019-04-07 | ||||||||
Team | Wins | Losses | Ratings | Pace † | ||||
Offensive | Defensive | Net* | ||||||
Milwaukee Bucks | 59 | 21 | 114.0 | 105.2 | 8.8 | 103.2 | ||
Toronto Raptors | 56 | 24 | 113.1 | 107.3 | 5.8 | 100.2 | ||
Golden State Warriors | 55 | 24 | 115.8 | 109.5 | 6.3 | 100.8 | ||
Denver Nuggets | 53 | 26 | 113.2 | 108.8 | 4.4 | 97.7 | ||
Houston Rockets | 52 | 28 | 115.2 | 110.7 | 4.5 | 97.8 | ||
Portland Trail Blazers | 50 | 29 | 114.5 | 110.3 | 4.2 | 99.1 | ||
Philadelphia 76ers | 50 | 30 | 112.7 | 109.9 | 2.8 | 101.7 | ||
Utah Jazz | 49 | 30 | 110.7 | 105.3 | 5.4 | 100.3 | ||
Boston Celtics | 48 | 32 | 112.3 | 107.7 | 4.6 | 99.6 | ||
Indiana Pacers | 47 | 33 | 109.8 | 106.2 | 3.6 | 98.1 | ||
Los Angeles Clippers | 47 | 33 | 112.4 | 111.3 | 1.1 | 101.6 | ||
Oklahoma City Thunder | 46 | 33 | 109.9 | 106.8 | 3.1 | 102.9 | ||
San Antonio Spurs | 46 | 34 | 112.9 | 111.6 | 1.3 | 98.3 | ||
Orlando Magic | 40 | 40 | 108.5 | 108.0 | 0.5 | 98.1 | ||
Brooklyn Nets | 40 | 40 | 109.6 | 110.1 | -0.5 | 100.8 | ||
Detroit Pistons | 39 | 40 | 108.9 | 109.4 | -0.5 | 97.6 | ||
Sacramento Kings | 39 | 41 | 110.0 | 111.0 | -1.0 | 103.2 | ||
Miami Heat | 38 | 41 | 107.5 | 107.7 | -0.2 | 98.1 | ||
Charlotte Hornets | 37 | 42 | 110.9 | 112.4 | -1.5 | 99.0 | ||
Minnesota Timberwolves | 36 | 43 | 111.6 | 112.8 | -1.2 | 100.2 | ||
Los Angeles Lakers | 36 | 44 | 107.7 | 109.5 | -1.8 | 103.3 | ||
New Orleans Pelicans | 32 | 48 | 111.3 | 112.6 | -1.3 | 103.3 | ||
Memphis Grizzlies | 32 | 47 | 105.7 | 108.5 | -2.8 | 96.6 | ||
Washington Wizards | 32 | 48 | 111.1 | 113.9 | -2.8 | 101.4 | ||
Dallas Mavericks | 31 | 48 | 109.4 | 110.7 | -1.3 | 98.9 | ||
Atlanta Hawks | 29 | 51 | 108.1 | 113.8 | -5.7 | 103.8 | ||
Chicago Bulls | 22 | 58 | 104.9 | 113.2 | -8.3 | 99.0 | ||
Phoenix Suns | 19 | 61 | 105.9 | 114.7 | -8.8 | 100.4 | ||
Cleveland Cavaliers | 19 | 61 | 107.9 | 117.4 | -9.5 | 96.7 | ||
New York Knicks | 15 | 64 | 104.5 | 113.8 | -9.3 | 99.8 | ||
source: basketball-reference.com via nbastatR | ||||||||
* Net Rating: an estimate of point differential per 100 possessions. † Pace: an estimate of possessions per 48 minutes. |
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".