Skip to contents

Pull in statistics aggregated by team and game for specified season(s)

This data includes both traditional box score stats (such as points, OREB, AST) as well as more advanced stats (such as ORTG, OREB%). For more information on each stat, see the data dictionary dictionary_player_box_scores.

Usage

load_team_box_scores(seasons = most_recent_season())

Arguments

seasons

an integer or vector of integers of seasons to fetch data for. Defaults to the most recent season. Pass in TRUE to fetch all seasons.

Value

a dataframe of team box scores.

See also

https://john-b-edwards.github.io/cbbreadr/articles/dictionary_team_box_scores.html for a web version of the data dictionary

dictionary_team_box_scores for the data dictionary as bundled within the package

Issues with this data should be filed here: https://github.com/john-b-edwards/cbbd-data/issues

Examples

# \donttest{
try({ # avoid cran errors
load_team_box_scores()
})
#>       game_id season season_label season_type tournament
#>         <int>  <int>       <char>      <char>     <char>
#>    1:      24   2025     20242025     regular       <NA>
#>    2:      25   2025     20242025     regular       <NA>
#>    3:      26   2025     20242025     regular       <NA>
#>    4:      27   2025     20242025     regular       <NA>
#>    5:      28   2025     20242025     regular       <NA>
#>   ---                                                   
#> 6294:  209747   2025     20242025  postseason       <NA>
#> 6295:  209731   2025     20242025  postseason       NCAA
#> 6296:  209732   2025     20242025  postseason       NCAA
#> 6297:  209749   2025     20242025  postseason       <NA>
#> 6298:  209751   2025     20242025  postseason       NCAA
#>                     start_date start_time_tbd team_id   team_name
#>                         <char>         <lgcl>   <int>      <char>
#>    1: 2024-11-04T11:00:00.000Z          FALSE     492 IU Columbus
#>    2: 2024-11-04T12:00:00.000Z          FALSE     493  Oglethorpe
#>    3: 2024-11-04T12:00:00.000Z          FALSE     494  UNT Dallas
#>    4: 2024-11-04T12:00:00.000Z          FALSE      46  Charleston
#>    5: 2024-11-04T12:30:00.000Z          FALSE     495    LaGrange
#>   ---                                                            
#> 6294: 2025-04-05T20:00:00.000Z          FALSE     312         UCF
#> 6295: 2025-04-05T22:09:00.000Z          FALSE      87     Florida
#> 6296: 2025-04-06T01:28:00.000Z          FALSE     113     Houston
#> 6297: 2025-04-06T21:30:00.000Z          FALSE     188    Nebraska
#> 6298: 2025-04-08T00:50:00.000Z          FALSE      87     Florida
#>       team_conference_short_name team_seed opponent_team_id opponent_team_name
#>                           <char>     <int>            <int>             <char>
#>    1:                       <NA>        NA              115    IU Indianapolis
#>    2:                       <NA>        NA              171   Middle Tennessee
#>    3:                       <NA>        NA              324       UT Arlington
#>    4:                        CAA        NA              273  Southern Illinois
#>    5:                       <NA>        NA              128 Jacksonville State
#>   ---                                                                         
#> 6294:                     Big 12        NA              338          Villanova
#> 6295:                        SEC        NA               16             Auburn
#> 6296:                     Big 12        NA               72               Duke
#> 6297:                    Big Ten        NA              312                UCF
#> 6298:                        SEC        NA              113            Houston
#>       opponent_conference_short_name opponent_seed neutral_site is_home
#>                               <char>         <int>       <lgcl>  <lgcl>
#>    1:                        Horizon            NA        FALSE   FALSE
#>    2:                           CUSA            NA        FALSE   FALSE
#>    3:                            WAC            NA        FALSE   FALSE
#>    4:                            MVC            NA         TRUE   FALSE
#>    5:                           CUSA            NA        FALSE   FALSE
#>   ---                                                                  
#> 6294:                       Big East            NA         TRUE   FALSE
#> 6295:                            SEC            NA         TRUE   FALSE
#> 6296:                            ACC            NA         TRUE   FALSE
#> 6297:                         Big 12            NA         TRUE   FALSE
#> 6298:                         Big 12            NA         TRUE   FALSE
#>       conference_game game_type
#>                <lgcl>    <char>
#>    1:           FALSE       STD
#>    2:           FALSE       STD
#>    3:           FALSE       STD
#>    4:           FALSE    TRNMNT
#>    5:           FALSE       STD
#>   ---                          
#> 6294:           FALSE    TRNMNT
#> 6295:           FALSE    TRNMNT
#> 6296:           FALSE    TRNMNT
#> 6297:           FALSE    TRNMNT
#> 6298:           FALSE    TRNMNT
#>                                                  game_notes game_minutes
#>                                                      <char>        <int>
#>    1:                                                  <NA>           40
#>    2:                                                  <NA>           40
#>    3:                                                  <NA>           40
#>    4:                                  Field of 68 Showcase           40
#>    5:                                                  <NA>           40
#>   ---                                                                   
#> 6294:                 College Basketball Crown - Semifinals           45
#> 6295:            Men's Basketball Championship - Final Four           40
#> 6296:            Men's Basketball Championship - Final Four           40
#> 6297:            College Basketball Crown Championship Game           40
#> 6298: Men's Basketball Championship - National Championship           40
#>       game_pace possessions assists steals blocks true_shooting
#>           <num>       <int>   <int>  <int>  <int>         <num>
#>    1:      73.0          74       7      3      3          35.0
#>    2:      75.5          76       6      4      1          39.2
#>    3:      81.0          80       5      8      4          35.6
#>    4:      76.5          76      17      3      4          66.0
#>    5:      77.0          77      10      5      3          31.1
#>   ---                                                          
#> 6294:      69.8          79      14      2      3          64.5
#> 6295:      71.0          70       7      7      3          59.7
#> 6296:      60.0          60      10      6      6          50.8
#> 6297:      70.5          70      20      8      3          56.2
#> 6298:      67.0          67      14      7      5          52.2
#>       offensive_rating game_score points points_1h points_2h points_1ot
#>                  <num>      <num>  <int>     <int>     <int>      <int>
#>    1:             59.5        5.5     44        21        23         NA
#>    2:             67.1       15.0     51        22        29         NA
#>    3:             68.8       18.6     55        25        30         NA
#>    4:            118.4       65.6     90        45        45         NA
#>    5:             62.3       15.9     48        20        28         NA
#>   ---                                                                  
#> 6294:            131.6       81.9    104        48        40         16
#> 6295:            112.9       56.8     79        38        41         NA
#> 6296:            116.7       56.5     70        28        42         NA
#> 6297:            110.0       67.6     77        35        42         NA
#> 6298:             97.0       52.8     65        28        37         NA
#>       points_2ot points_3ot points_4ot largest_lead points_fast_break
#>            <int>      <int>      <int>        <int>             <int>
#>    1:         NA         NA         NA            0                 4
#>    2:         NA         NA         NA            0                12
#>    3:         NA         NA         NA            0                 9
#>    4:         NA         NA         NA           12                 0
#>    5:         NA         NA         NA            0                13
#>   ---                                                                
#> 6294:         NA         NA         NA           11                26
#> 6295:         NA         NA         NA            8                 4
#> 6296:         NA         NA         NA            3                 0
#> 6297:         NA         NA         NA           12                 2
#> 6298:         NA         NA         NA            2                 2
#>       points_in_paint points_off_turnovers two_point_field_goals_made
#>                 <int>                <int>                      <int>
#>    1:              24                    7                         14
#>    2:              24                    6                         13
#>    3:              24                   10                         16
#>    4:              40                    8                         22
#>    5:              24                    7                         14
#>   ---                                                                
#> 6294:              26                    4                         15
#> 6295:              30                   16                         17
#> 6296:              20                    8                         13
#> 6297:              30                   13                         20
#> 6298:              28                   10                         15
#>       two_point_field_goals_attempted two_point_field_goals_pct
#>                                 <int>                     <num>
#>    1:                              39                     0.359
#>    2:                              35                     0.371
#>    3:                              58                     0.276
#>    4:                              35                     0.629
#>    5:                              39                     0.359
#>   ---                                                          
#> 6294:                              28                     0.536
#> 6295:                              32                     0.531
#> 6296:                              39                     0.333
#> 6297:                              40                     0.500
#> 6298:                              29                     0.517
#>       three_point_field_goals_made three_point_field_goals_attempted
#>                              <int>                             <int>
#>    1:                            4                                19
#>    2:                            3                                20
#>    3:                            5                                14
#>    4:                            9                                20
#>    5:                            5                                36
#>   ---                                                               
#> 6294:                           15                                35
#> 6295:                            8                                21
#> 6296:                           10                                22
#> 6297:                            9                                21
#> 6298:                            6                                24
#>       three_point_field_goals_pct free_throws_made free_throws_attempted
#>                             <num>            <int>                 <int>
#>    1:                       0.211                4                    11
#>    2:                       0.150               16                    23
#>    3:                       0.357                8                    12
#>    4:                       0.450               19                    30
#>    5:                       0.139                5                     5
#>   ---                                                                   
#> 6294:                       0.429               29                    40
#> 6295:                       0.381               21                    30
#> 6296:                       0.455               14                    18
#> 6297:                       0.429               10                    17
#> 6298:                       0.250               17                    21
#>       free_throws_pct field_goals_made field_goals_attempted field_goals_pct
#>                 <num>            <int>                 <int>           <num>
#>    1:           0.364               18                    58           0.310
#>    2:           0.696               16                    55           0.291
#>    3:           0.667               21                    72           0.292
#>    4:           0.633               31                    55           0.564
#>    5:           1.000               19                    75           0.253
#>   ---                                                                       
#> 6294:           0.725               30                    63           0.476
#> 6295:           0.700               25                    53           0.472
#> 6296:           0.778               23                    61           0.377
#> 6297:           0.588               29                    61           0.475
#> 6298:           0.810               21                    53           0.396
#>       turnovers team_turnovers rebounds_offensive rebounds_defensive
#>           <int>          <int>              <int>              <int>
#>    1:        16              0                  5                 22
#>    2:        15              1                  6                 24
#>    3:        21              3                 19                 26
#>    4:        17              2                  8                 30
#>    5:         7              0                  7                 20
#>   ---                                                               
#> 6294:         7              0                 12                 29
#> 6295:        16              0                 12                 27
#> 6296:         9              1                 18                 24
#> 6297:         9              0                  9                 29
#> 6298:        13              1                  8                 32
#>       rebounds_total fouls technical_fouls flagrant_fouls
#>                <int> <int>           <int>          <int>
#>    1:             27    16               0              0
#>    2:             30    16               0              0
#>    3:             45    18               0              0
#>    4:             38    23               0              0
#>    5:             27    13               0              0
#>   ---                                                    
#> 6294:             41    24               0              0
#> 6295:             39    15               0              0
#> 6296:             42    16               1              0
#> 6297:             38    14               0              0
#> 6298:             40    11               2              0
#>       effective_field_goal_pct free_throw_rate assists_turnover_ratio
#>                          <num>           <num>                  <num>
#>    1:                    0.345           0.190                   21.6
#>    2:                    0.318           0.418                   19.7
#>    3:                    0.326           0.167                   26.3
#>    4:                    0.645           0.545                   22.4
#>    5:                    0.287           0.067                    9.1
#>   ---                                                                
#> 6294:                    0.595           0.635                    8.9
#> 6295:                    0.547           0.566                   22.9
#> 6296:                    0.459           0.295                   15.0
#> 6297:                    0.549           0.279                   12.9
#> 6298:                    0.453           0.396                   19.4
#>       offensive_rebound_pct opponent_possessions opponent_assists
#>                       <num>                <int>            <int>
#>    1:                 0.185                   72               20
#>    2:                 0.200                   75               16
#>    3:                 0.422                   82               16
#>    4:                 0.211                   77               12
#>    5:                 0.259                   77               20
#>   ---                                                            
#> 6294:                 0.293                   78               12
#> 6295:                 0.308                   72               11
#> 6296:                 0.429                   60               14
#> 6297:                 0.237                   71                8
#> 6298:                 0.200                   67                5
#>       opponent_steals opponent_blocks opponent_true_shooting
#>                 <int>           <int>                  <num>
#>    1:               7               0                   54.9
#>    2:              10               7                   60.2
#>    3:              13               4                   56.1
#>    4:              11               1                   52.3
#>    5:               6               2                   69.2
#>   ---                                                       
#> 6294:               4               3                   55.5
#> 6295:              11               3                   54.4
#> 6296:               7               4                   53.1
#> 6297:               7               5                   46.7
#> 6298:               5               6                   41.9
#>       opponent_offensive_rating opponent_game_score opponent_points
#>                           <num>               <num>           <int>
#>    1:                     138.9                94.9             100
#>    2:                     129.3                89.3              97
#>    3:                     109.8                78.0              90
#>    4:                     103.9                57.8              80
#>    5:                     145.5               112.9             112
#>   ---                                                              
#> 6294:                     125.6                73.9              98
#> 6295:                     101.4                50.9              73
#> 6296:                     111.7                55.8              67
#> 6297:                      93.0                43.0              66
#> 6298:                      94.0                36.1              63
#>       opponent_points_1h opponent_points_2h opponent_points_1ot
#>                    <int>              <int>               <int>
#>    1:                 48                 52                  NA
#>    2:                 51                 46                  NA
#>    3:                 48                 42                  NA
#>    4:                 42                 38                  NA
#>    5:                 55                 57                  NA
#>   ---                                                          
#> 6294:                 44                 44                  10
#> 6295:                 46                 27                  NA
#> 6296:                 34                 33                  NA
#> 6297:                 35                 31                  NA
#> 6298:                 31                 32                  NA
#>       opponent_points_2ot opponent_points_3ot opponent_points_4ot
#>                     <int>               <int>               <int>
#>    1:                  NA                  NA                  NA
#>    2:                  NA                  NA                  NA
#>    3:                  NA                  NA                  NA
#>    4:                  NA                  NA                  NA
#>    5:                  NA                  NA                  NA
#>   ---                                                            
#> 6294:                  NA                  NA                  NA
#> 6295:                  NA                  NA                  NA
#> 6296:                  NA                  NA                  NA
#> 6297:                  NA                  NA                  NA
#> 6298:                  NA                  NA                  NA
#>       opponent_largest_lead opponent_points_fast_break opponent_points_in_paint
#>                       <int>                      <int>                    <int>
#>    1:                    58                         11                       48
#>    2:                    48                         24                       54
#>    3:                    35                         23                       44
#>    4:                     3                         17                       38
#>    5:                    64                         24                       66
#>   ---                                                                          
#> 6294:                     6                         11                       34
#> 6295:                     9                          2                       34
#> 6296:                    14                          0                       24
#> 6297:                    14                          2                       32
#> 6298:                    12                          4                       24
#>       opponent_points_off_turnovers opponent_two_point_field_goals_made
#>                               <int>                               <int>
#>    1:                            25                                  25
#>    2:                            26                                  28
#>    3:                            26                                  24
#>    4:                            15                                  20
#>    5:                            16                                  34
#>   ---                                                                  
#> 6294:                            11                                  21
#> 6295:                             6                                  18
#> 6296:                            12                                  14
#> 6297:                             8                                  20
#> 6298:                             9                                  18
#>       opponent_two_point_field_goals_attempted
#>                                          <int>
#>    1:                                       50
#>    2:                                       46
#>    3:                                       45
#>    4:                                       41
#>    5:                                       47
#>   ---                                         
#> 6294:                                       41
#> 6295:                                       32
#> 6296:                                       36
#> 6297:                                       39
#> 6298:                                       44
#>       opponent_two_point_field_goals_pct opponent_three_point_field_goals_made
#>                                    <num>                                 <int>
#>    1:                              0.500                                    12
#>    2:                              0.609                                     9
#>    3:                              0.533                                     9
#>    4:                              0.488                                     5
#>    5:                              0.723                                     9
#>   ---                                                                         
#> 6294:                              0.512                                     8
#> 6295:                              0.563                                     7
#> 6296:                              0.389                                     7
#> 6297:                              0.513                                     7
#> 6298:                              0.409                                     6
#>       opponent_three_point_field_goals_attempted
#>                                            <int>
#>    1:                                         31
#>    2:                                         24
#>    3:                                         26
#>    4:                                         21
#>    5:                                         26
#>   ---                                           
#> 6294:                                         31
#> 6295:                                         25
#> 6296:                                         17
#> 6297:                                         29
#> 6298:                                         25
#>       opponent_three_point_field_goals_pct opponent_free_throws_made
#>                                      <num>                     <int>
#>    1:                                0.387                        14
#>    2:                                0.375                        14
#>    3:                                0.346                        15
#>    4:                                0.238                        25
#>    5:                                0.346                        17
#>   ---                                                               
#> 6294:                                0.258                        32
#> 6295:                                0.280                        16
#> 6296:                                0.412                        18
#> 6297:                                0.241                         5
#> 6298:                                0.240                         9
#>       opponent_free_throws_attempted opponent_free_throws_pct
#>                                <int>                    <num>
#>    1:                             23                    0.609
#>    2:                             24                    0.583
#>    3:                             21                    0.714
#>    4:                             33                    0.758
#>    5:                             18                    0.944
#>   ---                                                        
#> 6294:                             37                    0.865
#> 6295:                             23                    0.696
#> 6296:                             23                    0.783
#> 6297:                              6                    0.833
#> 6298:                             14                    0.643
#>       opponent_field_goals_made opponent_field_goals_attempted
#>                           <int>                          <int>
#>    1:                        37                             81
#>    2:                        37                             70
#>    3:                        33                             71
#>    4:                        25                             62
#>    5:                        43                             73
#>   ---                                                         
#> 6294:                        29                             72
#> 6295:                        25                             57
#> 6296:                        21                             53
#> 6297:                        27                             68
#> 6298:                        24                             69
#>       opponent_field_goals_pct opponent_turnovers opponent_team_turnovers
#>                          <num>              <int>                   <int>
#>    1:                    0.457                  5                       0
#>    2:                    0.529                  7                       0
#>    3:                    0.465                 14                       3
#>    4:                    0.403                  9                       0
#>    5:                    0.589                  7                       0
#>   ---                                                                    
#> 6294:                    0.403                  7                       1
#> 6295:                    0.439                 14                       2
#> 6296:                    0.396                  7                       0
#> 6297:                    0.397                 12                       0
#> 6298:                    0.348                  9                       1
#>       opponent_rebounds_offensive opponent_rebounds_defensive
#>                             <int>                       <int>
#>    1:                          25                          39
#>    2:                          14                          36
#>    3:                          14                          31
#>    4:                           9                          18
#>    5:                          11                          49
#>   ---                                                        
#> 6294:                          17                          27
#> 6295:                           9                          21
#> 6296:                          10                          21
#> 6297:                          13                          26
#> 6298:                          15                          24
#>       opponent_rebounds_total opponent_fouls opponent_technical_fouls
#>                         <int>          <int>                    <int>
#>    1:                      64             12                        0
#>    2:                      50             23                        0
#>    3:                      45             13                        0
#>    4:                      27             21                        0
#>    5:                      60              4                        0
#>   ---                                                                
#> 6294:                      44             27                        0
#> 6295:                      30             22                        0
#> 6296:                      31             16                        1
#> 6297:                      39             17                        1
#> 6298:                      39             19                        0
#>       opponent_flagrant_fouls opponent_effective_field_goal_pct
#>                         <int>                             <num>
#>    1:                       0                             0.531
#>    2:                       0                             0.593
#>    3:                       0                             0.528
#>    4:                       0                             0.444
#>    5:                       0                             0.651
#>   ---                                                          
#> 6294:                       0                             0.458
#> 6295:                       0                             0.500
#> 6296:                       0                             0.462
#> 6297:                       0                             0.449
#> 6298:                       0                             0.391
#>       opponent_free_throw_rate opponent_assists_turnover_ratio
#>                          <num>                           <num>
#>    1:                    0.284                             6.9
#>    2:                    0.343                             9.3
#>    3:                    0.296                            17.1
#>    4:                    0.532                            11.7
#>    5:                    0.247                             9.1
#>   ---                                                         
#> 6294:                    0.514                             9.0
#> 6295:                    0.404                            19.4
#> 6296:                    0.434                            11.7
#> 6297:                    0.088                            16.9
#> 6298:                    0.203                            13.4
#>       opponent_offensive_rebound_pct team_stats_points_by_period_7
#>                                <num>                         <int>
#>    1:                          0.391                            NA
#>    2:                          0.280                            NA
#>    3:                          0.311                            NA
#>    4:                          0.333                            NA
#>    5:                          0.183                            NA
#>   ---                                                             
#> 6294:                          0.386                            NA
#> 6295:                          0.300                            NA
#> 6296:                          0.323                            NA
#> 6297:                          0.333                            NA
#> 6298:                          0.385                            NA
#>       opponent_stats_points_by_period_7
#>                                   <int>
#>    1:                                NA
#>    2:                                NA
#>    3:                                NA
#>    4:                                NA
#>    5:                                NA
#>   ---                                  
#> 6294:                                NA
#> 6295:                                NA
#> 6296:                                NA
#> 6297:                                NA
#> 6298:                                NA
# }