Fantasy football can be a relaxing past time but for anyone who takes the competition seriously, data immediately becomes very necessary. While many people track their favorite players from their favorite teams, to truly put together a winning team you need to be able to explore and understand large amounts of data. Moreover, the data you need is typically spread across many files and needs to be put back together again to truly understand it. Pivot Billions dramatically improves this process and makes it easy to merge data and start to analyze it.
As an example of this usecase, we chose to work with the historical NFL Statistics data from Kaggle. For fun, we decided to try to determine who would be considered the greatest offensive players of all time to have on your fantasy team. The period that the data covered was from 1924 to 2016.
For our analysis, we decided to use the fantasy scoring system found at FantasyData.com. For offensive players, points are distributed as follows:
- Passing Yards: 1 point per 25 yards
- Passing Touchdowns: 4 points
- Passing Interceptions: -2 points
- Rushing Yards: 1 point per 10 yards
- Rushing Touchdowns: 6 points
- Receptions: 1 points
- Receiving Yards: 1 point per 10 yards
- Receiving Touchdowns: 6 points
- 2-Point Conversions: 2 points
- Fumbles Lost: -2 points
- Fumble Recovered for a Touchdown: 6 points
We had to merge the 4 separate files in order to combine Receiving, Passing, Rushing, and Fumble stats for offensive players. For some reason, this dataset did not have the 2 point conversion data, so we omitted it from the calculations. We also had to perform some ETL to convert some of the data from strings to integers.
Then we select what fields the files have in common and that we want to join by. This is made extremely simple through Pivot Billions’ easy Column Preview interface:
To make our analysis more efficient, we only loaded the data that directly correlated to the fantasy football point scoring system. A copy of the cleansed and filtered dataset can be found here.
For our Fantasy Football usecase we created an additional Fantasy Points column from the data using our column-creation feature. This is the combined offensive point score based on the scoring system.
With the new data column, we created a pivot table based on PlayerID and FantasyPts. We can now easily compare the best offensive players based on their point scores.
Quarterbacks dominate the top of the list. Considering that they are almost always involved in offensive plays it makes sense. Interestingly, the only non-quarterback to have more than 5,000 points in career fantasy scoring is Jerry Rice. Jerry Rice is consistently considered by players, fans, and analysts as the G.O.A.T. But based on our analysis, Peyton Manning would be the greatest fantasy football offensive player.
Because of the versatility and speed of PivotBillions, we can also analyze based on position, decade, and team just as easily. It's also fun to try different scoring methods. Next time, we'll do a similar analysis for defensive players.