Skip to contents

Pull in vegas odds (overs, unders, spreads, moneylines, etc.) for college basketball games.

Usage

load_lines(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 betting information for all games for the specified season(s).

See also

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

dictionary_lines 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_lines()
})
#>       game_id season season_type               start_date home_team_id
#>         <int>  <int>      <char>                   <char>        <int>
#>    1:      27   2025     regular 2024-11-04T12:00:00.000Z          273
#>    2:      29   2025     regular 2024-11-04T15:00:00.000Z          261
#>    3:      31   2025     regular 2024-11-04T16:00:00.000Z          281
#>    4:      35   2025     regular 2024-11-04T17:00:00.000Z          107
#>    5:      36   2025     regular 2024-11-04T17:00:00.000Z          142
#>   ---                                                                 
#> 5436:  209747   2025  postseason 2025-04-05T20:00:00.000Z          338
#> 5437:  209731   2025  postseason 2025-04-05T22:09:00.000Z           16
#> 5438:  209732   2025  postseason 2025-04-06T01:28:00.000Z           72
#> 5439:  209749   2025  postseason 2025-04-06T21:30:00.000Z          312
#> 5440:  209751   2025  postseason 2025-04-08T00:50:00.000Z          113
#>          home_team_name home_conference_short_name home_score away_team_id
#>                  <char>                     <char>      <int>        <int>
#>    1: Southern Illinois                        MVC         80           46
#>    2:       Santa Clara                        WCC         85          252
#>    3:          Stanford                        ACC         85           68
#>    4:           Harvard                        Ivy         79          156
#>    5:           Liberty                       CUSA         83          335
#>   ---                                                                     
#> 5436:         Villanova                   Big East         98          312
#> 5437:            Auburn                        SEC         73           87
#> 5438:              Duke                        ACC         67          113
#> 5439:               UCF                     Big 12         66          188
#> 5440:           Houston                     Big 12         63           87
#>       away_team_name away_conference_short_name away_score provider spread
#>               <char>                     <char>      <int>   <char>  <num>
#>    1:     Charleston                        CAA         90 ESPN BET    3.5
#>    2:    Saint Louis                       A-10         78 ESPN BET   -1.5
#>    3:         Denver                     Summit         62 ESPN BET  -17.5
#>    4:         Marist                       MAAC         66 ESPN BET   -2.5
#>    5:     Valparaiso                        MVC         63 ESPN BET  -10.5
#>   ---                                                                     
#> 5436:            UCF                     Big 12        104 ESPN BET   -3.5
#> 5437:        Florida                        SEC         79 ESPN BET    2.5
#> 5438:        Houston                     Big 12         70 ESPN BET   -4.5
#> 5439:       Nebraska                    Big Ten         77 ESPN BET    3.5
#> 5440:        Florida                        SEC         65 ESPN BET    1.5
#>       over_under home_moneyline away_moneyline spread_open over_under_open
#>            <num>          <int>          <int>       <num>           <num>
#>    1:      146.5            145           -170          NA              NA
#>    2:      157.5           -130            110          NA              NA
#>    3:      147.5          -3000           1200          NA              NA
#>    4:      131.5           -145            125          NA              NA
#>    5:      138.5           -750            475          NA              NA
#>   ---                                                                     
#> 5436:      156.5             NA             NA        -1.5           155.5
#> 5437:      158.5             NA             NA         2.5           159.5
#> 5438:      136.5             NA             NA        -4.5           135.5
#> 5439:      160.5             NA             NA         3.5           158.5
#> 5440:      140.5             NA             NA         1.5           140.5
# }