Skip to contents

Pull in statistics aggregated by player 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 USG%, ORTG). For more information on each stat, see the data dictionary dictionary_player_stats.

Usage

load_player_stats(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 player statistics for college basketball players

See also

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

dictionary_player_stats 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_player_stats()
})
#>       season season_label team_id            team_name conference_short_name
#>        <int>       <char>   <int>               <char>                <char>
#>    1:   2025     20242025       1    Abilene Christian                   WAC
#>    2:   2025     20242025       1    Abilene Christian                   WAC
#>    3:   2025     20242025       1    Abilene Christian                   WAC
#>    4:   2025     20242025       1    Abilene Christian                   WAC
#>    5:   2025     20242025       1    Abilene Christian                   WAC
#>   ---                                                                       
#> 9813:   2025     20242025     830 Washington Adventist                  <NA>
#> 9814:   2025     20242025     830 Washington Adventist                  <NA>
#> 9815:   2025     20242025     830 Washington Adventist                  <NA>
#> 9816:   2025     20242025     830 Washington Adventist                  <NA>
#> 9817:   2025     20242025     830 Washington Adventist                  <NA>
#>       athlete_id athlete_source_id       athlete_name athlete_position games
#>            <int>            <char>             <char>           <char> <int>
#>    1:       6045           4896505   Leonardo Bettiol                F    32
#>    2:       6046           5177704       Nasir DeGruy                G    32
#>    3:       6047           5106274     Quion Williams                G    30
#>    4:       6048           4897572     Joseph Venzant                G     8
#>    5:       6049           4701572 Hunter Jack Madden                G    32
#>   ---                                                                       
#> 9813:      15168           5264286     Emanuel Hylton              ATH     1
#> 9814:      15169           5264285  Jayden Rowe-Perry              ATH     1
#> 9815:      15170           5264300       Mateo Cataid              ATH     1
#> 9816:      15171           5264299        James Quinn              ATH     1
#> 9817:      15172           5264294       Felix Mcghee              ATH     1
#>       starts minutes points turnovers fouls assists steals blocks
#>        <int>   <int>  <int>     <int> <int>   <int>  <int>  <int>
#>    1:     31     828    419        61   111      37     33     13
#>    2:      9     579    117        49    59      42     42      3
#>    3:     30     888    411        77    69      75     35     22
#>    4:      6     157     13         8    17       4      7      1
#>    5:     29     883    285        65    45      68     41      4
#>   ---                                                            
#> 9813:      1      34     15         4     1       1      1      0
#> 9814:      1      29      8         4     4       0      2      0
#> 9815:      0       3      0         1     1       1      0      0
#> 9816:      0      23      4         3     2       3      0      0
#> 9817:      0      34     10         5     1       0      2      0
#>       offensive_rating defensive_rating net_rating porpag usage
#>                  <num>            <num>      <num>  <num> <num>
#>    1:            107.3            103.0        4.3    2.1 0.260
#>    2:             76.6            100.4      -23.8   -0.5 0.163
#>    3:            102.0            103.1       -1.1    1.7 0.262
#>    4:             70.1            110.9      -40.8   -0.4 0.071
#>    5:             98.1            104.6       -6.5    0.9 0.195
#>   ---                                                          
#> 9813:             59.1            127.3      -68.2   -5.4 0.336
#> 9814:             46.8            121.2      -74.4   -5.5 0.281
#> 9815:               NA            130.9         NA     NA 0.148
#> 9816:             75.2            129.7      -54.5   -0.5 0.113
#> 9817:             78.0            124.2      -46.2   -0.8 0.148
#>       assists_turnover_ratio offensive_rebound_pct free_throw_rate
#>                        <num>                 <num>           <num>
#>    1:                   0.61                 0.381           0.409
#>    2:                   0.86                 0.157           0.213
#>    3:                   0.97                 0.327           0.357
#>    4:                   0.50                 0.125           1.200
#>    5:                   1.05                 0.253           0.277
#>   ---                                                             
#> 9813:                   0.25                 0.200           0.200
#> 9814:                   0.00                 0.167           1.000
#> 9815:                   1.00                    NA              NA
#> 9816:                   1.00                 0.250           1.000
#> 9817:                   0.00                 0.000           0.600
#>       effective_field_goal_pct true_shooting_pct field_goals_made
#>                          <num>             <num>            <int>
#>    1:                    0.526             0.006              164
#>    2:                    0.382             0.004               46
#>    3:                    0.492             0.005              155
#>    4:                    0.400             0.004                4
#>    5:                    0.446             0.005               85
#>   ---                                                            
#> 9813:                    0.325             0.003                5
#> 9814:                    0.150             0.003                1
#> 9815:                       NA                NA                0
#> 9816:                    0.750             0.007                1
#> 9817:                    0.700             0.008                3
#>       field_goals_attempted field_goals_pct two_point_field_goals_made
#>                       <int>           <num>                      <int>
#>    1:                   313           0.524                        163
#>    2:                   127           0.362                         41
#>    3:                   333           0.465                        137
#>    4:                    10           0.400                          4
#>    5:                   249           0.341                         33
#>   ---                                                                 
#> 9813:                    20           0.250                          2
#> 9814:                    10           0.100                          0
#> 9815:                     0           0.000                          0
#> 9816:                     2           0.500                          0
#> 9817:                     5           0.600                          2
#>       two_point_field_goals_attempted two_point_field_goals_pct
#>                                 <int>                     <num>
#>    1:                             304                     0.536
#>    2:                              98                     0.418
#>    3:                             279                     0.491
#>    4:                              10                     0.400
#>    5:                              78                     0.423
#>   ---                                                          
#> 9813:                              11                     0.182
#> 9814:                               6                     0.000
#> 9815:                               0                     0.000
#> 9816:                               1                     0.000
#> 9817:                               2                     1.000
#>       three_point_field_goals_made three_point_field_goals_attempted
#>                              <int>                             <int>
#>    1:                            1                                 9
#>    2:                            5                                29
#>    3:                           18                                54
#>    4:                            0                                 0
#>    5:                           52                               171
#>   ---                                                               
#> 9813:                            3                                 9
#> 9814:                            1                                 4
#> 9815:                            0                                 0
#> 9816:                            1                                 1
#> 9817:                            1                                 3
#>       three_point_field_goals_pct free_throws_made free_throws_attempted
#>                             <num>            <int>                 <int>
#>    1:                       0.111               90                   128
#>    2:                       0.172               20                    27
#>    3:                       0.333               83                   119
#>    4:                       0.000                5                    12
#>    5:                       0.304               63                    69
#>   ---                                                                   
#> 9813:                       0.333                2                     4
#> 9814:                       0.250                5                    10
#> 9815:                       0.000                0                     0
#> 9816:                       1.000                1                     2
#> 9817:                       0.333                3                     3
#>       free_throws_pct rebounds_offensive rebounds_defensive rebounds_total
#>                 <num>              <int>              <int>          <int>
#>    1:           0.703                 48                 78            126
#>    2:           0.741                  8                 43             51
#>    3:           0.697                 50                103            153
#>    4:           0.417                  4                 28             32
#>    5:           0.913                 19                 56             75
#>   ---                                                                     
#> 9813:           0.500                  1                  4              5
#> 9814:           0.500                  1                  5              6
#> 9815:           0.000                  0                  0              0
#> 9816:           0.500                  1                  3              4
#> 9817:           1.000                  0                  4              4
#>       win_shares_offensive win_shares_defensive win_shares_total
#>                      <num>                <num>            <num>
#>    1:                  1.5                  1.2              2.7
#>    2:                 -0.7                  1.0              0.3
#>    3:                  1.1                  1.2              2.3
#>    4:                 -0.1                  0.1              0.0
#>    5:                  0.5                  1.1              1.6
#>   ---                                                           
#> 9813:                 -0.2                  0.0             -0.2
#> 9814:                 -0.2                  0.0             -0.2
#> 9815:                   NA                  0.0               NA
#> 9816:                  0.0                  0.0              0.0
#> 9817:                  0.0                  0.0              0.0
#>       win_shares_total_per40
#>                        <num>
#>    1:                  0.130
#>    2:                  0.021
#>    3:                  0.104
#>    4:                  0.000
#>    5:                  0.072
#>   ---                       
#> 9813:                 -0.235
#> 9814:                 -0.276
#> 9815:                     NA
#> 9816:                  0.000
#> 9817:                  0.000
# }