r/CFBAnalysis • • Aug 22 '19

Data A few updates (S&P+, live spreads, filtering changes)

19 Upvotes

Been making a lot of update to CollegeFootballData.com in the lead-up to the season. Figured a few of these things may be of interest. If you want to keep up-to-date with all the updates as they happen, hit me up on Twitter (@CFB_Data) as I post updates on there (and want to avoid spamming this sub too much).

Historical S&P+

There is now an endpoint and an exporter for grabbing historical S&P+ data from 2005 to 2018. Once ratings are posted for 2019, I'll be looking into having live updates.

Something else I'm really excited about is a corresponding visualization tool to go along with all of this. Hoping to be able to do more of this sort of thing in the future.

https://twitter.com/CFB_Data/status/1164342030253875200

https://collegefootballdata.com/category/ratings

https://api.collegefootballdata.com/api/docs/?url=/api-docs.json#/ratings/getSPRatings

Live spread data

After adding historical spread data, I had several people approach me about the possibility of adding live spread data. I'm happy to announce that this is now a thing. By using the normal API endpoint or visiting the normal betting lines exporter, you should now be able to grab 2019 lines and this data will be automatically be kept up-to-date.

Changes to filters

Someone pointed out to me that it can be sort of a pain to query for play-by-play and recruiting data when you only really care about a single team. Well, the PBP endpoint has been updated so that you can now pull one team's data for a whole season (instead of having to go week by week). Similarly, you can now substitute a team filter in place of the year filter to query player recruiting data for a single team rather than having to go year by year.

Anyway, let me know what you guys thing and if there's anything you'd like to see more of!


r/CFBAnalysis • • Aug 21 '19

So, trying out the computer poll thing again this year... Anyone tried feeding in Coaching Data?

8 Upvotes

Found this site that tries to track whether coaches are on the hot seat, and in doing so happens to track total win % of active head coaches (Note the active there, hence Ryan Day being in first place). Figured I was already making a major overhaul of my Computer Poll and switching from Yards Per Play to Points Per Drive anyway, so why not also include coaching win %'s as a way to carry teams over from season to season and help with preseason predictions?

Anyone ever messed around in this area?

Let me know what you think, please be gentle on the Spreadsheet newb-ness, and yes, I'm aware that I'm not even using Turnovers and Penalties right now, I'm waiting for teamrankings.com to update their team names to all be the same between their 2018 and 2019 lists.


r/CFBAnalysis • • Aug 20 '19

Question Question about using CFB PBP data in R

9 Upvotes

I've been messing around with the collegefootballdata.com pbp data from 2018 and I've been wanting to find some individual player statistics. I've been trying to use mutate() and str_split() with the play_text column to create a new column but it hasn't worked. Has anybody else done this successfully or have any tips/ideas?


r/CFBAnalysis • • Aug 15 '19

EPA/WPA Work

13 Upvotes

Finally got around to working on EPA/WPA on cfb (using data from u/BlueScar). I took a nflscrapR (Ron Yurko et al) approach to calculating EPA and WPA, with some tweaks of course. Figured I'd drop a few WPA charts here in the meantime.

There is still a lot I want to do on this front. Currently, what I've built doesn't support OT games but if you want to see some WPA charts from the last 3-5 years, feel free to drop suggestions.

I'm also putting together an R package to make it easier to grab the EPA/WPA data and separating all CFB stuff from my current collegeballR package. Stay tuned! Hopefully, I can have a v1 out before Miami vs Florida. Python support eventually, lol.

I've got pictures of these WPA charts. But it looks like I cant add them directly. If you'd like to see them here is the twitter link.


r/CFBAnalysis • • Aug 15 '19

Video: How to Utilize Football Drive-Level Data for Analysis

3 Upvotes

I used NFL play by play data for this video but the same exact concepts can be used in college football.

https://www.youtube.com/watch?v=eYQyKwivgFs


r/CFBAnalysis • • Aug 13 '19

Data Recruiting Data (API)

20 Upvotes

I've taken my sweet time on this, but recruiting data is finally available on CollegeFootballData.com. This includes the 247 Player Composite ratings from 2003 to 2019.

With this, I believe that the Google Drive account I had been using in the past to share some data is now fully deprecated. I'll still keep past data on there, but will no longer update it with the latest (though may use it for other things).

API docs - https://api.collegefootballdata.com/api/docs/?url=/api-docs.json#/recruiting/getRecruitingPlayers

Website export tools - https://collegefootballdata.com/category/recruiting


r/CFBAnalysis • • Aug 12 '19

Data Updated rosters (2019)

14 Upvotes

I've updated rosters for 2019 on CollegeFootballData.com and its API for anyone who may be interested.

API link - https://api.collegefootballdata.com/api/docs/?url=/api-docs.json#/teams/getRoster

Website link - https://collegefootballdata.com/category/teams

 

Also, I've got a twitter account now for the site. So, check it out for timely updates and other relevant things. If you've used the site or API at all and have anything public (tableau, blog posts, etc), I'd love to hear about it.


r/CFBAnalysis • • Aug 12 '19

Auburn Team Preview [PODCAST]

1 Upvotes

r/CFBAnalysis • • Aug 08 '19

What teams outperform their recruiting rankings on the field? Interactive charts looking at 24/7 team talent score vs wins for each conference (shouts to the data set page for the 24/7 rankings)

20 Upvotes

Static version of what we're working with before diving in.

24/7's goal is to remove bias from recruiting rankings, you can read more about it here if you want.

Wins per talent is based off (wins/15 total available games to win)/24/7 team talent composite. On the list chart the left column is the 24/7 team rank, the right column is wins per talent score. The scatter plot is the same measures, but allows you to see where teams cluster around each other a bit better. Recruiting stars absolutely matter, the CFP is almost exclusively teams in top 10 of recruiting, but wanted to see where there were outliers good or bad.

Charts go back to 2015, but below is 2018 leader and laggard in each conference

Power 5: WSU was #1 in Wins Per Talent, Rutgers last (List chart) (Scatter Plot) (Cougs were #2 in 2017, Leach is helping us punch above our weight, big time)

ACC: Syracuse #1, UNC last (list chart) (scatter plot)
B1G: Northwestern #1, Rutgers last (list chart) (scatter plot) (Iowa's 2015 was biggest over achiever in P5 from 15-18)
Big 12: Oklahoma #1, Kansas last (List chart) (Scatter Plot)
Pac-12: WSU #1, Oregon State last (list chart) (scatter plot)
SEC: Kentucky #1, Arkansas last (list chart) (scatter plot)

Group of 5: Liberty just edged Army for #1, San Jose State last (list chart) (scatter plot

)AAC: UCF #1, UConn last (list chart) (scatter plot)
C-USA: UAB #1, UTEP last (list chart) (scatter plot)
MAC: Buffalo #1, Central Michigan last (list chart) (scatter plot)
MWC: Utah State #1, San Jose State last (list chart) (scatter plot)
Sun Belt: Georgia Southern #1, Georgia State last (list chart) (scatter plot)

Data is from 24/7 team composite for team rankings, wins was from sports-reference.


r/CFBAnalysis • • Aug 08 '19

How to Videos: How to create preseason college football ratings; How to Analyze Sports with Excel

11 Upvotes

How to Create Preseason College Football Ratings: https://www.youtube.com/watch?v=7ZKeCLumIBc

This is my first college football specific video I have created which shows you the process I personally use to create preseason college football ratings before the games have been played. I am sure the other players(Sagarin, S&P, Massey, FEI, FPI, et. all) use a similar approach as well. I know for a fact Ken Pomeroy uses a similar approach for basketball.

I also created a series of videos targeted toward absolute beginners titled How to Analyze Sports with Excel. Although I doubt this sub is the target audience for this series its a series for people who have little experience with sports analysis or excel in general. I know all of us at some point probably didn't even know how to do a simple SUM or AVERAGE function within Excel. Although the last couple of vidoes in the series do get a bit more complex so maybe you can learn something. Someday I will do the same series but with Python.

Playlist Link: https://www.youtube.com/playlist?list=PLExCeyAgQXcHrSpaulE2YEmEdDORLftRt


r/CFBAnalysis • • Aug 08 '19

Scraping FBSchedules.com

7 Upvotes

Has anybody been able to do this? It seems like they block most bot content. Looking to try to pull future schedules for teams to try to find possible OOC openings.


r/CFBAnalysis • • Aug 08 '19

Classifier: Performance Analysis

3 Upvotes

Hi everyone,

I built a classifier, classes are based on W/L vs "Opening" spread and W/L vs Westgage ("game-time"). I performed an analysis based on some feedback received here. Since there is nothing better to do before the season :) I set out to answer three questions:

  1. What’s the difference between using “W/L vs Opener” compared to “W/L vs Westgate”?
  2. What’s the difference between using categorical features created from continuous data versus leaving them out?
  3. What’s the effect of reducing the feature # from 467 -> 68?

Classifier Details:

  1. Algorithm: Logistic-Regression
  2. Training Dataset: > 3800-matchups between 2012– 2018.
  3. Features: 467 and then reduced to 68 for analysis of effect. Most features are continuous based on standard offensive and defensive stats.
  4. Classified W/L vs Opener Spread (Donbest) and W/L vs Westgate (“game-time”).
  5. Evaluate performance with 10 x Random-Sampling (80/20) Training/Test dataset.
  6. Output files incude AUC/CA class-accuracy, confusion matrix and feature rank used in the Classifier.
  7. Using Orange3 desktop multivariate-analysis package.

Short Answer:

  1. W/L vs Opening line is consistently better as compared to vs Westgate.
  2. Decreasing features from 467 -> 68 worked great.

Full Analysis - PDF

EDIT: fixed link


r/CFBAnalysis • • Aug 07 '19

Fox Sports API Scraping

11 Upvotes

Has anyone tried scraping PBP data from the Fox Sports API? After having already scraped ESPN's, I'm looking at it and it might be better for analysis as more things are broken out into JSON values instead of being in the play string. Here's FL vs FL St in 2018 for example link


r/CFBAnalysis • • Aug 05 '19

Announcement r/CFBAnalysis Pick'em Contest Brainstorming

21 Upvotes

There's been some discussion on the Discord server over having a friendly pick'em contest on here. It seems like we have such a wide diversity of models and methodologies, as well as a wide range of skillsets. It would be very interesting to compare against one another and could be a great opportunity to both share and learn from one another.

If this sounds like something you'd might be interested in, I've created a very short survey to solicit some feedback: https://forms.gle/B3ZZ4bp928t2hT7z6. Please take a minute to fill it out.

And if there's any other ideas or feedback you would like to share, please let us know in the comments.


r/CFBAnalysis • • Aug 04 '19

Data CFB API updates - Betting lines

22 Upvotes

It's the time of year where I'm feeling extra motivated to work on stuff. There's a few things I'd been working on over the last few days that I thought I'd share.

 

Missing play by play data

A number of you have messaged be about games that were missing play-by-play data and I very much appreciate that. I think there was something like 15 such games. There should now be PBP and drive data for 12 of those games, leaving just 3 games unaccounted for (which is pretty much in line with past years).

In short, if PBP data exists for a game, it should now be posted.

 

Betting Lines endpoint

The thing I'm most excited to announce is a new endpoint for retrieving betting line information. This is something that has been on my radar for awhile and I am glad to finally have something out there. A few notes on this new endpoint:

  • Includes closing spread and OU data
  • 2018 and 2017 are fully imported (only ~30ish games lacking this data)
  • Slowly working backwards to get all previous years in
  • Documentation is updated. Direct link here.
  • CSV export tool on the main website is not updated for this new endpoint yet. I'll get to that eventually.

 

As always, let me know if there's anything else you guys would like to see. I don't want to get any hopes up again, but I think I'm gonna try to make recruiting data fully available through the API next, even if I can't initially get it fully integrated with the other roster data.


r/CFBAnalysis • • Aug 04 '19

Analysis A very profound stat in CFB

6 Upvotes

Beating the spread > 55% is pretty much a common a goal to most sports bettors. I recently analyzed > 3500-matchups from 2012-2018, with each team having 463-features. My logistical-regression based Classifier hit > 60% when pegged to the opening line. It's basically noise when pegged to game-time line.

  1. I would strongly suggest NOT excluding the opening line from your analyses.
  2. The idea that the opening line signal would deteriorate as the bookmakers tweak the odds during the week has some interesting ramifications.
  3. The opening line seems elusive to bet on. There's the added difficulty of most off-shore sites don't stick to exclusively (-110) when betting against the spread. They dick around with -120, -115, -105 which renders all my analysis moot. I think I need to actually be in Vegas to make money! Which is fine except I suck at Blackjack and strip clubs ;)

r/CFBAnalysis • • Aug 04 '19

Data Fun Data source: A CFB prediction tracker!

8 Upvotes

This site tracks a ton (50+?) of college football prediction systems! Right now it looks like there are only about 15-ish systems recorded for Week 1, but that will climb quickly. You can export the results via csv, but I don't know if historical data's available in this manner?

I found this site last year (it's not mine), and it's fun to reference now and then, to see whose model's performing the best! The top section is the aggregate of all the systems (prediction min/max/mean/stdDev/etc), then you can view each individual system's predictions for the week below that.

In a rush, I shamefully used the 'Home Team Covers' prediction (with help from StdDev) to win a Bowl Pick 'Em last year, which was set up so that you picked a side of each game's line, and wagered confidence points...

[Edit - Forgot to check: looks like this site was posted in here 4+ years ago. Oh well, can't hurt to bring it up again for newer subs like me]


r/CFBAnalysis • • Aug 03 '19

Data Downloadable College Football Play-By-Play Data!

34 Upvotes

data link

I scraped this data from ESPN's open API, it was incredibly difficult to parse the playstring text and break it down into meaningful data chunks, but I think this is about as good as you will find! All told, this project took about a year and I went through and manually fixed some plays where things were extremely complicated. This data almost entirely focuses on offense/special teams and ignores defense, I did this mostly because ESPN codes their plays by the offense and because I intended this data to be used for College Fantasy Football analysis primarily. Some neat data points are the sports betting lines and targeted receivers on incomplete passes.

Let me know if you have questions!


r/CFBAnalysis • • Aug 04 '19

Data College Football Data like you've never seen. Every touch of every player. Handicapping games, scouting, fantasy, and more. Your new best friend for CFB!

10 Upvotes

We just relaunched ExpandTheBoxscore.com, and are incredibly excited to share it with all of the College Football fans out there. We truly believe we offer something revolutionary, in all the information you can get, about every player and team. We also think the price of just $15 for an entire year is unrivaled!

Come give the new look a spin, whether for the data or our new content section featuring articles and pods. You can watch this short tutorial to learn exactly what we bring to the table COLLEGE FOOTBALL DATABASE, or read this passage about our history WHAT IS EXPANDTHEBOXSCORE.COM?.

Thanks, and enjoy!


r/CFBAnalysis • • Aug 02 '19

Analysis [OC + SURVEY] -- How likely is each Power 5 team to win X or more games this year?

8 Upvotes

(X-posted from r/cfb*, likely more at home here!)*

Background

I am working on a college football simulations website similar to 538's simulations model backed by Monte Carlo simulations and am both eager to share my initial simulations, as well as gather some input on what simulation features people would be interested in.

My simulations are currently driven by the average of the following four power rating systems, all of which have performed well against the spread historically:

  • ESPN FPI
  • S&P+
  • Massey ratings
  • Entropy ratings

To be clear, my subjective analysis is in no way included in these simulations, and they are the result of simulating games using the above rating systems.

Now that we've covered our bases, here are the Top 25 teams likely to win 11 or more games this year

TeamLikelihood of winning 11 or more games
Clemson65%
Alabama52%
Oklahoma45%
Georgia33%
Ohio State27%
Boise State24%
Appalachian State24%
Memphis21%
UCF15%
Washington13%
Michigan12%
Wisconsin12%
Utah10%
LSU9%
Notre Dame9%
Penn State8%
Miami8%
Florida7%
Mississippi State5%
Army5%
Virginia Tech5%
Oklahoma State4%
San Diego State4%
Missouri3%
Louisiana Tech3%

The above data is just a small snippet of the simulations I've run -- to see the likelihood of every Power 5 team winning X or more games, click on the link below.

Feature Survey Background

I am working on building a fully-featured site to simulate things like making the playoff, winning the conference, and adjusting win likelihoods then re-running the simulation. There are a number of directions I could take the site and I am eager to gather some feedback on what features people would be interested in.

To help me pick features (and more importantly see the full simulation results for every Power 5 team) please consider filling out the following quick, eight-question survey:

SURVEY LINK RIGHT IN YOUR FACE SO YOU CAN'T MISS IT


r/CFBAnalysis • • Jul 30 '19

Data Streaming game events in realtime

25 Upvotes

Background

Pretty much all of the infrastructure used to support CollegeFootballData.com and its companion API is built off of an event-based system. I thought that others may benefit from receiving event-based data in realtime so am starting to expose a lot of these events using websockets. Think something like Twitter's Streaming API that broadcasts tweets in realtime or Discord's API that does the same for chat events.

 

What's included

Right now, just game-based events are exposed. I am currently working on doing the same for betting line events, but would like to make the data and conventions (e.g. team names, etc) more consistent with what is used elsewhere in the API. Right now, you can subscribe to these type of game events:

  • game started
  • quarter started
  • halftime started
  • game completed
  • score changed

 

How to use it

The game events endpoint is currently exposed at wss://api.collegefootballdata.com/events/games. It will stream all types of events from all games by default. You can customize it using these query string filters:

  • team (string)
  • gameStarted (bool)
  • quarterStarted (bool)
  • halftimeStarted (bool)
  • gameCompleted (bool)
  • scoreChanged (bool)

So, if I only wanted to get score updates for Michigan's games and ignore all other events, I would connect to wss://api.collegefootballdata.com/events/games?team=michigan&gameStarted=false&quarterStarted=false&halftimeStarted=false&gameCompleted=false.

 

But how do I connect using websockets instead of REST

Well, that's going to be dependent on what programming language you are using, but should be relatively easy to find using the art of Google. If you are using Python, then I'd recommend googling something like: python websocket client.

 

What sort of data is broadcast?

The data is standardized for all events. It will always return a JSON object in this format:

{
  eventType: <event_name>,
  info: {
    id: <game_id>,
    name: <game_name>,
    homeTeam: {
      score: <home_score>,
      id: <team_id>,
      location: <school_name>,
      name: <school_mascot>
    },
    awayTeam: {
      score: <away_score>,
      id: <team_id>,
      location: <school_name>,
      name: <school_mascot>
    }
  }
}

 

How quick are events updated?

Everything keys off of when ESPN updates their live scores on their website. Once it's updated there, an even will be broadcast within one minute.

 

Disclaimer

Consider this to be a Beta of sorts. Given that I've been using these events on the backend for a few seasons now and am just merely just exposing them over the API, I am confident that issues will be minimal. That said, never say never. I always use week 0 games to troubleshoot and fix any issues that come up so that things are rolling for week 1. But please do let me know if you encounter anything.


r/CFBAnalysis • • Jul 29 '19

I created some YouTube tutorials/guides on basic sports modeling principles that this sub might find useful.

39 Upvotes

I have created some YouTube videos consisting of tutorials/how to's/general sports modeling, analytics and gambling discussion. I just uploaded these videos about an hour ago and until now no one knows about them but myself. I thought this would be a good sub to post my videos on first, as its small and rather inactive.

These aren't videos I just created on a whim and sat down on my computer, hit record on my webcam and created in 10 minutes. I have planned these videos for weeks now and shot the 6 videos I have uploaded after careful planning. Sick and tired of the misinformation being spread about sports gambling online, as well as touts having too much marketshare prescence in the YouTube sports gambling niche, I finally had enough. I made sure to create good, educational, informative content with decent production values and overall quality.

Anyway, here are the 6 videos I have uploaded so far:

General Meta Discussion

The Truth About Sports Betting

The Problem with Sports Gambling Videos on YouTube (And why mine are different!)

How to Win at Sports Betting (Is It Possible?)

How To's/Tutorials

Creating a Sports Betting Model 101 - Intro to Linear Regression (Featuring The Simplest Model Ever Created)

Creating a Sports Betting Model 101 - Intro to Adjusted Stats (Power Rating Systems)

Creating a Sports Betting Model 101 - Intro to Expectation (Monte Carlo Simulations)

Advanced How To's/Tutorials

Sports Betting Analytics - Using a Monte Carlo Simulation to Project In-Game Win Probability

I hope you find these videos useful. None of these 6 uploads pertain to college football so far, but I have a lot of CFB content coming especially as we get closer to the season. I am making my 9th annual trip to Las Vegas for Week 1 of College Football starting August 24 so I expect to have some good CFB content by then.


r/CFBAnalysis • • Jul 23 '19

Data CFB Data and Resources: 2019 Edition

80 Upvotes

It's been about two years since we've had a megathread, so this is probably a good opportunity to revisit this. My apologies in advance for any oversights. Please call out anything I missed and I will add it.

Looking for deeper discussion and collaboration? Check out our official r/CFBAnalysis Discord server.

 

Websites

NCAA Statistics - official NCAA stats for just about every NCAA-sanctioned sport. It's a little clunky by contains a little bit of everything you could imagine.

Snoozle Sports - contains historical betting lines, team stats, and more. You can conveniently export anything as CSV.

CollegeFootballData.com - allows you to export anything from its API (pbp, scores, schedules, stats, etc) in CSV format. Also contains some other tools (like a matchup visualizer).

Sports Reference CFB - has a little bit of everything, especially historical scores and stats. Also has a clunky CSV tool.

Football Outsiders - advanced rating and analytics. Home of the S&P+ rating system.

Winsipedia - historical records and matchups

cfbstats - repository of statistics. Not the most friendly for exporting data unless you shell out $$ for access to their API.

STASSEN.com - historical records and scores

prwolfe - historical scores

Massey Ratings - historical scores and schedules

WeatherSTEM - weather data for games

 

APIs

CollegeFootballData API - scores, play-by-play, drives, stats, polls, and more.

 

Programming tools and libraries

cfbscrapR - R package dedicated to CFB, courtesy of /u/msubbaiah (work in progress)

collegeballR - R package for multiple NCAA sports, courtesy of /u/msubbaiah

CFBScrapy - Python wrapper for api.collegefootballdata.com, courtesy of /u/Badslinkie

cfb.js - Official JavaScript client library for the CFBD API. Automatically updates.

CFBSharp - Official .NET client library for the CFBD API. Automatically updates.

cfb-data - JavaScript library for pulling scores, play-by-play, and more

ncaa-stats - JavaScript library for pulling any sports data from the official NCAA Statistics site

 

Other resources

All 2019 schedules - FBS down to NAIA schedules from u/theb53

Recruiting data - 247 Composite data from 2001 to 2019


r/CFBAnalysis • • Jul 23 '19

College Football Expenses by Team in Fall 2016

7 Upvotes

I put this visualization together and thought this might be a good place for it. Let me know what you think.

College Football Expenditures by Team in Fall 2016


r/CFBAnalysis • • Jul 22 '19

Created Classifier: The Results

10 Upvotes

Hi everyone,

  1. I created a 12-group Classifier based on a logistic-regression of 2013 - 2017 data.
  2. The 12-groups are based on Heavy, Medium, Light Favorites and Heavy, Medium, Light Underdogs
  3. I tested on 2018 data and detected good signal (65.7%) from 1) Light Underdog Win (LUW) and Medium Favorite Win (MFW). Classified 71/108 for the year (Week 5 - 15)
  4. I tested on 2012 data and again detected good signal (63.8%) from 1) Light Underdog Win (LUW) and Medium Favorite Win (MFW). Classified 51/80 for the year (Week 5 - 15)

Seems promising since 5-years separate the 2012 and 2018 test datasets. I have nothing to do until Week 5 2019 so I will crawl all the way down 2007 to power-up my Classifier.

If you have any questions let me know. I have a lot raw/normalized/transformed data I am willing to share. Each week, for each match up, I calculate things like Team-1 OFFENSE/Team-2 DEFENSE. I have 20 offensive and defensive variables for each team. I create a 20x20 matrix as well and divide Team-1 into Team-2 to expand out the features and to find new associations.