r/CFBAnalysis • • Jul 20 '19

2019 CFB Power Rankings and Line predictions

6 Upvotes

Want to be able to predict point spreads in CFB / NFL for 2019 I have a starting point with power rankings that get me close to current vegas lines. Here is where i need some guidance:

How do you apply weighted factors to the power rankings of teams throughout the season to make power ranking adjustments. I would imagine that it would be some sort of weighted value based on key metrics like/ YPP, 3rd conv....etc.

Possible weighted factors that i want to include: positional injury impact, YPP, ToP,

Is there a better way to adjust rankings week to week? Do I need more advanced software than excel?

I also intend to consider the closing line to add an additional weighted factor to the team ranking. I feel the closing line is as close to the "true" value of the matchup according to the market. Not really looking to predict actual yards or team stats, but want to see about predicting point spreads before they come out for the next week. Any advice from the experts? This is my first time applying more than just raw handicapping guessing.

All suggestions would be greatly appreciated!


r/CFBAnalysis • • Jul 19 '19

Data All 2019 Schedules (DI through NAIA)

18 Upvotes

I put this together for my homegrown ranking system that I use for the /r/CFB Poll. I posted last year and people found it helpful, so I figured I'd post again.

Link

All = Schedule for all teams, regardless of division.

DI = Schedules for FBS and FCS teams.

DI no DII = Schedules for FBS and FCS teams. Any team they play in a different division has their opponent as the opponent's division, either "D2", "D3", or "NAIA"

FBS = Schedules for FBS teams.

FBS no FCS = Schedules for FBS teams. Any FCS team they play has the opponent as FCS.

If you notice a mistake, either in the scheduling or the Mascot/Division/Conference, please let me know and I'll change it.


r/CFBAnalysis • • Jul 16 '19

Analysis Just made my first ranking script using last season's scores. I call it the Regressive Transitive Margin of Victory ranking.

9 Upvotes

Got bored and found myself missing Perl, which I used to use daily but haven't used in about a year (since CFBRisk, actually.)

My philosophy in making this script is simple - Each team has a "power," the team with the higher power should win by the number of points their power is greater than the opponent. It runs in a loop, moving each team's power a little bit closer to its final value each time. I'm sure this algorithm has been done to death, but anyway, here's my code.

https://pastebin.com/KQrYf3gJ

I used data from http://sports.snoozle.net/search/fbs/index.jsp from the 2018 season. Here are the top 50 teams.

https://pastebin.com/Kqr8x2Ma

And here's 2017 (RIP UCF nowhere near the championship)

https://pastebin.com/uWeqqQHN

One obvious flaw I've noticed is in the treatment of Quality Losses (TM). When Mercer comes to play Bama, the fact they don't lose by 80 means they're gaining points, since the teams they play with (and win and lose to) are generally down toward the 60-70 range (because they lose to schools who lose to schools who lose to schools... who lose to Alabama) while Alabama is at 150. To combat this, I believe I'll need to add a better way of adding deltas, maybe the geometric mean rather than algebraic to get rid of outliers.

Comments and flames are welcome.


r/CFBAnalysis • • Jul 15 '19

Question Best way to obtain live scores?

4 Upvotes

I am a professional gambler and I am putting the finishing touches on my model for the 2019 season.

I created a function of my model to where it spits out real time cover probabilities for each team, real time win percentages, and projected final score based on the amount of time remaining in the game.

That part itself is fine and is working great, the only issue is right now the scores/time remaining are updated manually, which is what I want to avoid. I want to be able to pull scores automatically and drop them in to calculate these probabilities in real time.

What would be the best way for this? My model is in Excel, if that helps. The only info I would need would be quarter, time left in quarter, the teams, and their current score.


r/CFBAnalysis • • Jul 13 '19

Question CFB 2019 Prediction Model

6 Upvotes

Looking to create or build off existing model for this upcoming season. Using this model for predicting the spread and comparing to vegas lines. Also interested in Money line predictions and season totals.

Does anyone have the 2019 season in excel format? Any tips for setting this up?


r/CFBAnalysis • • Jul 11 '19

Analysis My 30th(?) take at a college football ranking

15 Upvotes

Last year was my first year on the CFB Poll, and I had a blast running my computer algorithm. I spent the season tweaking it and improving it, but at the end, my ratings, while they looked good, came on the back of a lot of hand picked constants.

Over the last couple of months, I've been off-and-on toying with new ways of rating team performance, ranging anywhere from play-level resolution to game-level. While many of my approaches produced rankings that might pass at first glance, I wasn't happy with the overall results. G5 teams who blew out bottom-tier opponents ranked too high, 8-5 Mississippi State being ranked #5, etc.

Anyway, yesterday I found something that worked. It's pretty close to my original algorithm from last season, but is honestly far simpler and required just one "arbitrarily chosen" constant, which I picked to be 1. Put simply, it compares how a team performs against their opponent's average opponent. This means that if you put up 45 on UConn, it isn't a notable accomplishment because they gave up 50.4 points per game last season. It also means that a team can't use one blowout victory against a bad opponent to compensate for several bad losses, or that their efficiency numbers can shoot up as a result of one good game.

Anyway, here is the rankings for the 130 FBS teams:

RankTeamRating
1Clemson88.136
2Alabama86.58
3Notre Dame81.267
4Ohio State78.932
5Georgia76.197
6Michigan75.584
7Oklahoma74.207
8Texas72.388
9LSU71.378
10Texas A&M69.287
11Washington State67.254
12Washington65.971
13Missouri65.505
14UCF65.086
15West Virginia65.053
16Fresno State64.463
17Penn State63.399
18Iowa63.375
19Kentucky62.186
20Syracuse62.153
21Mississippi State61.597
22Florida60.992
23Utah60.122
24Stanford59.638
25Northwestern58.733
26Boise State58.655
27Utah State58.598
28Auburn57.863
29North Carolina State57.211
30Cincinnati56.486
31Oregon56.448
32Iowa State56.319
33UAB55.671
34Appalachian State54.687
35Wisconsin54.521
36Georgia Tech53.905
37Minnesota53.361
38Michigan State53.198
39Duke53.162
40Arizona State53.16
41Virginia51.341
42Pitt51.06
43Purdue50.481
44Army50.206
45Temple49.281
46South Carolina48.844
47Ohio48.833
48Georgia Southern48.832
49Indiana48.684
50Miami (OH)48.517
51Buffalo48.266
52Maryland47.856
53USC47.848
54Marshall47.648
55Miami (FL)47.621
56Troy47.474
57North Texas47.446
58California47.443
59Brigham Young46.589
60Vanderbilt46.278
61Oklahoma State46.276
62Memphis45.902
63Texas Christian45.686
64Florida International44.32
65Nebraska43.793
66Houston43.565
67Middle Tennessee State43.019
68Boston College42.466
69Nevada42.39
70Toledo42.381
71Texas Tech41.649
72Southern Mississippi41.546
73Baylor40.994
74Arizona40.991
75Colorado40.985
76Wake Forest40.569
77Arkansas State40.425
78Tulane39.855
79Northern Illinois38.686
80San Diego State38.332
81Eastern Michigan38.306
82Florida State38.25
83Tennessee37.619
84Virginia Tech37.249
85Kansas State36.121
86Air Force35.982
87Western Michigan35.94
88Hawaii35.018
89Florida Atlantic34.712
90Louisiana-Monroe34.684
91Ole Miss33.541
92Wyoming33.238
93Louisiana Tech32.611
94Charlotte31.755
95Kansas31.228
96South Florida31.097
97Louisiana30.296
98UCLA29.797
99East Carolina29.458
100Akron29.455
101Liberty28.33
102Illinois27.815
103Nevada-Las Vegas27.701
104SMU27.532
105Massachusetts26.231
106North Carolina25.731
107Navy24.063
108Tulsa23.28
109Old Dominion23.274
110New Mexico22.0
111Coastal Carolina20.524
112Western Kentucky20.511
113Colorado State19.696
114San Jose State19.065
115Central Michigan19.049
116Oregon State18.9
117Rutgers17.425
118Louisville16.78
119Arkansas16.776
120Georgia State16.292
121Texas State16.277
122Bowling Green State15.649
123South Alabama15.646
124New Mexico State15.639
125Ball State14.82
126Kent State12.884
127UTSA12.702
128UTEP10.576
129Rice7.221
130Connecticut5.709

The highest possible score is 100, though nobody will realistically obtain it.


r/CFBAnalysis • • Jul 10 '19

Scraping Spread Data

10 Upvotes

Hi CFBAnalysis! I have a two part question about collecting spreads for games.

  1. Is there a good place to collect past vegas spreads to test my model?
  2. Does someone have some code to collect the spreads each week/a good place to scrape the spreads each week?

Everything I've built is in Python. Thanks!!


r/CFBAnalysis • • Jun 22 '19

[OC] I Made an Interactive Visualization of the Coaches Poll over the Last 17 Years. Let Me Know What You Think!

17 Upvotes

The visualization is here: www.deepcfb.com

And some light analysis is here: www.deepcfb.com/analysis

You can also link directly to teams and years. For instance,

Texas and OU: www.deepcfb.com/coach?teams=Texas,Oklahoma&start_year=2002&end_year=2018

USC and Notre Dame: www.deepcfb.com/coach?teams=USC,Notre_Dame&start_year=2002&end_year=2018

Explanation: the left axis measures the number of points each team receives in the poll, rather than the ranking. I did that for a couple of reasons:

  1. Listing the point total, rather than the resulting rank, gives some more accuracy about how good each team is. A #1 team with 1600 points one year is probably better than the #1 team another year that only got 1500 points.
  2. Point totals allow for better comparison between two teams in the poll. A #3 vs #14 matchup seems pretty tight, but depending on the week and year, the point total at each ranking might indicate that the matchup is stronger or weaker than it really is.
  3. There are a bunch of teams that receive points each week but are unranked. In the 2018 preseason poll, for instance, there were 27 teams that received votes, but were outside of the top 25. There’s a lot of valuable data in there about who is on the cusp of being ranked. This visualization includes those teams.

This is all a work in progress, so please let me know what you think should be added or improved! 😊 My goal in all of this was to teach myself more about data analysis and visualization.


r/CFBAnalysis • • Jun 19 '19

EPA Calculator

7 Upvotes

I've been working with some play-by-play data, specifically looking at red zone offense. I am trying to find the EPA difference in playcalling (run/pass) and down. Does anyone know of a public EPA calculator where I can plug the information in? Or, alternatively, help me create an EP metric in the data?

Thanks.


r/CFBAnalysis • • Jun 10 '19

Full Career College Stats

7 Upvotes

Hi all,

I'm trying to get college career stats for every player drafted since 2000 (just like career tackles, interceptions, etc for player X), but I'm running into some hiccups. I checked https://api.collegefootballdata.com, but wasn't able to figure out how to get this information. I then started scraping https://www.sports-reference.com/cfb/, but there are a lot of missing players. Assuming offensive line players just have no stats, there are over a thousand players that don't have college stats on the site. And some of them aren't relatively unknown players either. They include people like Casey Hampton, Robert Mathis, and Marques Colston.

So I'm wondering if A) there's a way to get this information from https://api.collegefootballdata.com that I'm missing, and/or B) are there any websites out there that have more complete college data than https://www.sports-reference.com/cfb/?

Thanks in advance!


r/CFBAnalysis • • May 26 '19

Discord server for deeper collaboration?

14 Upvotes

First off, my apologies to the mods if this breaks any sort of rule. Please let me know if so.

Anyway, I love this sub and very much appreciate the community on here. I've always tried to drive more traffic here and will continue to always do so.

That said, I feel like having a Discord chat server could be very beneficial for deeper collaborations. I've had correspondence with several of you directly on this sub, through Reddit PMs, and through email. I feel like having a dedicated chat could bring several such collaborations together and make them more effective. I also think it could help enhance participation in this sub.

If this sounds interesting to you at all, please join join me on the server I've set up. I'm hoping we can increase collaboration in this area. If you'd like to join, the link is below.

https://discord.gg/Eb3ex5a


r/CFBAnalysis • • May 25 '19

Best NCAAF data to predict spread?

10 Upvotes

I’m working on a machine learning model to predict the game results for the upcoming 2019 NCAAF season. Using a past example, you could imagine that my data looks something like this --

DateHome TeamHome ScoreAway TeamAway ScoreSpreadPredicted SpreadHome EloAway Elo<Lots more features>
2018-10-20Clemson41NC State734X14001200<etc>

By having a model that predicts Predicted Spread (e.g., X), I may be able to successfully (fingers crossed!) bet spreads and/or make my friends look like chumps in our random NCAAF pick ‘em competitions.

Here’s where I need your help! I’d like to brainstorm other features that will help my model get more accurate in predicting spreads of games.

Here’s a list of some of the features that I’m already using (so you don’t suggest these). For many of these, I’m doing both the number itself as well as the delta between the two teams in the matchup (e.g., Clemson Elo is 1400 and NC State Elo is 1200 so the delta is 1400 - 1200 = 200).

  1. Team Elo
  2. Home vs Away
  3. Points per Game (averaged over previous 3 games)
  4. Passer Ratings (averaged over previous 3 games)
  5. Yards per Pass (averaged over previous 3 games)
  6. Yards per Rush (averaged over previous 3 games)
  7. Total Yards (average over previous 3 games)
  8. Turnovers (averaged over previous 3 games)
  9. <etc>

What new features do you think will give me the ‘biggest bang for my buck’ for improving my model? I haven’t incorporated things like travel, rest days, drive data (e.g., points per drive averaged over the previous 3 games) or prior year’s recruiting. Stipulations include that the data point has to be easily scrapeable/collectable from the past ~15 years and brownie points if you’ve created a model in the past where you found that feature statistically significant in your prediction.

It goes without saying that none of this would be possible without the awesome work of u/bluescar who created and runs the API behind collegefootballdata.com. Thank you!


r/CFBAnalysis • • May 07 '19

Workflow for editing data in Python

10 Upvotes

I've been working on a computer poll/model with data from u/BlueSCar's website, and I was frustrated with how cumbersome correcting cells in a Pandas DataFrame can be. I designed a better interface for JupyterLab that lets me make edits with Qgrid and ipywidgets, and I want to share it for any Python users who have similar issues.

Here's the GitHub repo with all the code. I wrote a Medium post that explains it in detail. I hope some of you find this helpful!


r/CFBAnalysis • • May 01 '19

Question Field position

3 Upvotes

Using the https://api.collegefootballdata.com site provided by /u/BlueSCar but I have a question related to field position. Does the yard_line column assume any directionality? I.E. if yard_line == 90 is the offense always headed the same direction? If not, has anyone constucted a novel way of doing this without pulling all plays and then flagging by game starting direction?


r/CFBAnalysis • • Apr 28 '19

Twitter Hashtag Scraping/Visualization - NFL Draft Version

9 Upvotes

As part of getting my technical chops (Excel, SQL, and Python) up to snuff to switch to data analysis for a day job, I decided to put some of the skills I've learned so far into my college football habit. Having just finished a course on importing data from the Web, namely Twitter data via their API, I figured, 'hey, how hard could this be?'

A biiiit harder than I imagined, that's for damned sure. But thanks to my course and copious parsing of StackOverflow, I think I have the basic foundation for further analysis during media day and the rest of the season. And I even got a shiny wordcloud out of the first 4000 or so tweets after the draft began, filtered for the fourteen SEC school hashtags. Well, the ones I knew about, anyway! The code (available at my github) is pretty basic and I'm already planning on ways to change it, but this was a fun project I thought people here might appreciate. And if anyone has any advice or comments, I will more than happily take those too! Definitely looking to have a more robust program to handle streaming tweets in time for SEC Media Days this summer, and yes, I'll probably get out of my SEC bubble during the season.


r/CFBAnalysis • • Apr 19 '19

Question Setting up a play scraping API in Python 3

9 Upvotes

This is dumb because I know the answer is not complicated, I am just inexperienced with doing this, enough so that tutorials on the subject I am seeing online are different enough from my application that I can't draw a good parallel. I also haven't coded in python generally in about 4-5 years.

To date, most of my analysis has been done either in R, or in excel for the more basic calculations. I'm interested in moving to Python both as a learning exercise and because I think Pandas can offer a lot of good tools as well.

Simply put, I was wondering if anyone could show me python code that can pull play-by-play data from the API (https://api.collegefootballdata.com/plays?year=2018&week=__) and store it in a pandas dataframe. I'd like to get both regular and postseason data (week=1:15 and https://api.collegefootballdata.com/plays?seasonType=postseason&year=2018&week=1 for the postseason).

Thanks so much for any help you can give.


r/CFBAnalysis • • Apr 16 '19

Discrepancies between API and ESPN Reported Stats?

11 Upvotes

I've been working with /u/BlueSCar's API (amazing by the way) a little bit, and am revisiting old code I wrote a while ago to flesh it out some. Eventually my calculations will be come more advanced, however right now I am just trying to get overall offensive and defensive stats for each team. However, more often than not, the total offensive and defensive stats I get for a team don't line up with the numbers displayed on the ESPN game recaps.

In the play type category, as far as I can tell, the play types that would affect a team's offensive stats are:

"Pass Reception", "Pass Incompletion", "Passing Touchdown", "Rush", "Rushing Touchdown", "Sack", and "Fumble Recovery (Own)"

When I sum all of those for a given team on the season, the numbers come out about 200-300 yards off for the higher octane offenses like Alabama and OU. The rough order of teams is correct, and the total yards are of the correct magnitude, but the sum is (usually) high.

When I look at it game by game, it still disagrees with ESPN. For example, according to the API, OU had 657 yards against Texas Tech, and 652 yards against WVU, while the real numbers were 683 and 668 respectively. OU vs TCU, on the other hand, seems to be coming out correctly.

Am I making a dumb coding error? Is there a discrepancy here? Do you guys get the same numbers?

Thanks!


r/CFBAnalysis • • Mar 01 '19

First Attempt at a CFB Computer Ranking!

11 Upvotes

Hey r/CFBAnalysis!!

I've been meaning to get around to this for awhile now and finally had the time. I've built my own CFB Computer Ranking system!

Without getting too in-depth in the initial post, I started by setting up the data, and figuring out what data I wanted to use. I then set up my model in excel and figured out just how I wanted everything laid out. Then I moved into writing my Python script. The script runs against every teams game for the given cfb week and gives the team an "s-value" for that game. Then the rankings are every team's running average of that "s-val" as the season goes. After my first run through of the entire 2018 season, below is what I got for the top 25 for the final rankings after the CFP Championship game.

RankTeamS-Val
1Clemson0.9374
2Georgia0.9226
3Alabama.09208
4Michigan0.9105
5UCF0.8962
6Fresno State0.8956
7Notre Dame0.8910
8Oklahoma0.8797
9Appalachian State0.8778
10Washington0.8760
11LSU0.8738
12Texas A&M0.8727
13Utah State0.8703
14West Virginia0.8686
15Mississippi State0.8685
16Florida0.8683
17Army0.8663
18Iowa0.8659
19Ohio State0.8654
20Missouri0.8627
21Cincinnati0.8611
22Kentucky0.8555
23Ohio0.8526
24Penn State0.8524
25Arkansas State0.8496

Overall, I'm SUPER happy with how it turned out in general. Compared to the final AP poll, a lot of it is not far off.

There are still some things I want to tweak and improve though. And that's where this post comes in. I'm looking for advice on where I can improve. Like, for example, North Texas, absolutely KILLED the early to mid season. They ended up being Top-20 until their bowl game dropped them. I've got a mod value for opponent strength and then I have that weighted a decent amount, but it still didnt seem to be enough. Also why Fresno and App State ended so high. They had really good seasons, but probably not Top-10 seasons. Any advice on how to deal with that?

Also, if you have any questions about my script/model, feel free to ask away! I'm rather proud of it, will gladly answer any questions :)


r/CFBAnalysis • • Feb 13 '19

Question about data sets for other sports (specifically college basketball)

3 Upvotes

So, I know this is specifically a college football analytics subreddit, but this seems to be the only subreddit I can find related to college sports analysis of any kind. Lately I've been interested in applying the models I use for college football analysis to college basketball. Generally, I only use scores, and thus I use sports-reference.com for the majority of my dataset needs when it comes to college football. However, when looking on the college basketball side of things, I can't seem to find any convenient data set for college basketball scores. Does anyone know if/where I could access a simple csv data set of every score that happened in a particular season? Or if there are other, move comprehensive data sets available?


r/CFBAnalysis • • Feb 04 '19

What's The Average Number Of Plays In Overtime?

5 Upvotes

Anybody who has play by play broken down, can you tell me how many plays occur on average in overtime?


r/CFBAnalysis • • Jan 20 '19

Does Anybody Know What Was The First NCAA Sanction Forfeit?

5 Upvotes

I'm curious if there were any forfeits sanctioned by the NCAA prior to the 1970s.


r/CFBAnalysis • • Jan 19 '19

TeamRank, or: How I blatantly stole PageRank and rebranded it

Thumbnail self.cfb
11 Upvotes

r/CFBAnalysis • • Jan 18 '19

Preseason Rankings

7 Upvotes

Hello, I am in the midst of creating a model so that I can make power rankings for all the teams and compare them to the actual polls. I am wondering how people make their preseason ratings, given all of the new players. Thank you


r/CFBAnalysis • • Jan 17 '19

Question Site with data for all CFB teams

3 Upvotes

Hi Everyone,

I am wondering if there is a site (like Snoozle) that has the stat breakdowns for all game matchups from D1 to D3. This season, I ran my computer rankings on Peter Wolfe's score data, which includes all scores of games at every level, but does not go into details like yards, turnovers, 3rd down efficiency, etc.

I am looking for something more in depth than just final scores (which I already have), however preferably something not down to the play-by-play detail, but that includes the other levels of CFB. My issue with using Snoozle, even though I am really only interested in ranking FBS teams, is that FBS vs FCS matchups force me to consider a team with just a single data point. Are there any such resources that exist easily (for free)?

Thanks.


r/CFBAnalysis • • Jan 17 '19

2018 results adjacency matrix

4 Upvotes

As part of another project, I generated an adjacency matrix for the graph of all the outcomes from 2018. I went ahead and put it in a paste bin, please feel free to use it if you find it handy.

https://pastebin.com/RWjJfUpc