Tag Archives: fantasy football

Google Trends, R, and the NFL

A week or so ago I saw a tweet related how the NFL lockout was affecting the search traffic for “fantasy football” on Google (using Google Trends).  Basically, the search traffic (properly normalized on Google Trends) was down prior to the end of the lockout.  I decided to explore a bit with this myself and chose to look into the RGoogleTrends package for R.  The RGoogleTrends package is basically a convenient way to interact with the Google Trends API using R.  Very cool stuff.  All of my code can be found at my GoogleTrends repo on github.

My first query was to pull the google trends data for the past seven or so years using the search term “fantasy football”.  The following figure shows the results over time.  It’s immediately obvious that the normalized search scores for “fantasy football” were on the decline (2011 over previous years) prior to the end of the lockout; however, it appears that interest has since recovered.

I then decided to look at the trends for “NFL”.  There isn’t a dramatic decrease in the (normalized) searches for “NFL” prior to the lockout’s end, but you do see a huge spike in searches after the announcement.

A few notes:

  • It would be interesting to align the curves in the last plot by the day of week.  That is, it would be nice to compare the trends scores, as an example, for the 7th Wednesday prior to the start of the NFL preseason or something.
  • In order to use the RGoogleTrends package, you can use the cookies in Firefox to pass username and password if you just log into gmail (or another google service).

2 Comments

Filed under Data Viz, ggplot2, R, Sports

My Crappy Fantasy Football Draft

I compared the results of my fantasy football draft with the results of more than 1500 mock drafts at the Fantasy Football Calculator (FFC).  I looked at where player X was drafted in our league, subtracted off the average draft position on FFC, and divided by the standard deviation of the draft positon of that player on FFC.  In other words, I’ve computed a ‘standardized’ draft position for the given player.

How do we interpret this standardized draft position?  Obviously if we have a positive score, then a player was drafted later in our draft than the average position on FFC.  This would mean that a team owner in our league got a pretty good deal on that player.  Understand?  Divided by the standard deviation just places all of the draft positions in a standardized unit for comparison purposes.  Here are the results of our draft.

What do we see from this?  Well, my draft sucked.  Most of my boxes in the heat map are negative!  So I drafted my players a little higher than the average draft position on FFC.  In particular, it looks like I picked Pierre Thomas way earlier.

Some positives:  Yurcy picked Randy Moss with the 18th pick and his average draft position on this website was 8.8.  Possibly the biggest winner was Rob’s 6th round pick of Wes Welker…good value there.

I’ll do the same for my league with the boys in Vermont.  Hopefully the results are a little better than what I did with the Princeton gang.

The code is published at github under ffdraft.

3 Comments

Filed under R, Sports