Get some of Lee Sharpe's datasets from GitHub
get_sharpe_data(dataset = "games")
Character only, one of "airports", "closing_lines", "draft_picks", "draft_values", "games", "logos", "pff_pfr_map_v1", "positions", "rosters", "sc_lines", "standings", "teamcolors", "teams", "trades", "win_totals"
tibble
# Get NFL games and their outcomes
get_sharpe_data(dataset = "games")
#> Rows: 6409 Columns: 45
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (19): game_id, game_type, weekday, away_team, home_team, location, nfl_...
#> dbl (24): season, week, away_score, home_score, result, total, overtime, ol...
#> date (1): gameday
#> time (1): gametime
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> # A tibble: 6,409 × 45
#> game_id season game_…¹ week gameday weekday gamet…² away_…³ away_…⁴
#> <chr> <dbl> <chr> <dbl> <date> <chr> <time> <chr> <dbl>
#> 1 1999_01_MIN_… 1999 REG 1 1999-09-12 Sunday NA MIN 17
#> 2 1999_01_KC_C… 1999 REG 1 1999-09-12 Sunday NA KC 17
#> 3 1999_01_PIT_… 1999 REG 1 1999-09-12 Sunday NA PIT 43
#> 4 1999_01_OAK_… 1999 REG 1 1999-09-12 Sunday NA OAK 24
#> 5 1999_01_BUF_… 1999 REG 1 1999-09-12 Sunday NA BUF 14
#> 6 1999_01_SF_J… 1999 REG 1 1999-09-12 Sunday NA SF 3
#> 7 1999_01_CAR_… 1999 REG 1 1999-09-12 Sunday NA CAR 10
#> 8 1999_01_NE_N… 1999 REG 1 1999-09-12 Sunday NA NE 30
#> 9 1999_01_ARI_… 1999 REG 1 1999-09-12 Sunday NA ARI 25
#> 10 1999_01_DET_… 1999 REG 1 1999-09-12 Sunday NA DET 28
#> # … with 6,399 more rows, 36 more variables: home_team <chr>, home_score <dbl>,
#> # location <chr>, result <dbl>, total <dbl>, overtime <dbl>,
#> # old_game_id <dbl>, gsis <dbl>, nfl_detail_id <chr>, pfr <chr>, pff <dbl>,
#> # espn <dbl>, away_rest <dbl>, home_rest <dbl>, away_moneyline <dbl>,
#> # home_moneyline <dbl>, spread_line <dbl>, away_spread_odds <dbl>,
#> # home_spread_odds <dbl>, total_line <dbl>, under_odds <dbl>,
#> # over_odds <dbl>, div_game <dbl>, roof <chr>, surface <chr>, temp <dbl>, …
# Get team abbreviations/names/etc by year
get_sharpe_data(dataset = "teams")
#> Rows: 672 Columns: 18
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (14): team, nfl, nfl_team_id, espn, pfr, pfflabel, fo, full, location, s...
#> dbl (4): season, pff, sbr, sbr_wins
#>
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> # A tibble: 672 × 18
#> season team nfl nfl_team_id espn pfr pff pfflabel fo full locat…¹
#> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <chr> <chr> <chr> <chr>
#> 1 2002 ARI ARI 3800 ARI CRD NA NA ARI Ariz… Arizona
#> 2 2002 ATL ATL 0200 ATL ATL NA NA ATL Atla… Atlanta
#> 3 2002 BAL BAL 0325 BAL RAV NA NA BAL Balt… Baltim…
#> 4 2002 BUF BUF 0610 BUF BUF NA NA BUF Buff… Buffalo
#> 5 2002 CAR CAR 0750 CAR CAR NA NA CAR Caro… Caroli…
#> 6 2002 CHI CHI 0810 CHI CHI NA NA CHI Chic… Chicago
#> 7 2002 CIN CIN 0920 CIN CIN NA NA CIN Cinc… Cincin…
#> 8 2002 CLE CLE 1050 CLE CLE NA NA CLE Clev… Clevel…
#> 9 2002 DAL DAL 1200 DAL DAL NA NA DAL Dall… Dallas
#> 10 2002 DEN DEN 1400 DEN DEN NA NA DEN Denv… Denver
#> # … with 662 more rows, 7 more variables: short_location <chr>, nickname <chr>,
#> # hyphenated <chr>, sbr <dbl>, sbr_wins <dbl>, sbr_name <chr>,
#> # draft_kings <chr>, and abbreviated variable name ¹location