Friday, January 10, 2014

NFL First Down First Quarter Play Tendencies

Nothing new here. I am sure the stat nerds of the NFL look at this type of stuff all the time. But hey I just do this as a side hobby. I downloaded the NFL play data for the date range 2002 - 2012 from this guy: http://github.com/veltman/nflplays. The 2012 Season Data was a little out of wack. So I used the descriptions from this guy's 2012 season: http://www.advancednflstats.com/2010/04/play-by-play-data.html

After the data was cleaned up I was able to run some queries. Focusing on First Down Play call  tendencies in the First Quarter. Here is what I came up with. For total play counts I did the following.

  • Only count pass and run plays
  • Remove all plays with a penalty
  • Remove all plays with a sack
Total Plays in sample: 33,530
Pass Plays: 14,470 / 41.15%
Run Plays: 20,688 / 58.84%

59% of the time teams are calling a run play on 1st down from the plays in my sample. Here are the yearly stats.







The percentages have remained pretty consistent over the past 10 years. 















I need to investigate the Total Play count drop in 2011. Not sure if that is a data issue or there really was a drop in total plays that year. Perhaps there were more penalties, sacks or something that was removed in my filter. Using the links above you could download the play data and start running your own queries and analysis.

Looking at the other Quarters

2nd Quarter First Down
Total Plays in sample: 40,693
Pass Plays: 19,969 / 49.07%
Run Plays: 20,724 / 50.9%

3rd Quarter First Down
Total Plays in sample: 35445
Pass Plays: 15,005 / 42.33%
Run Plays: 20,440 / 57.66%

4th Quarter First Down
Total Plays in sample: 39,922
Pass Plays: 19,057 / 47.73%
Run Plays: 20,865 / 52.26%


  • The 2nd Quarter contained the best balanced attack of all the quarters. 2002 and 2011 showed teams called slightly more pass plays than run plays on first down. Every other year run plays were called more frequently on first down. 2006 had the biggest gap between Pass and Run play calls with 46.21% Pass vs. 53.79% Run.
  • In 2002 Pass Percentage on First Down in the 4th Quarter was higher than run percentage. Every other year in the sample Run Percentage was higher.
  • The 2011 total play count decrease is consistent throughout all quarters. So need to research the play counts for 2011 to see what is up.




Tuesday, January 7, 2014

Treadmill TV Viewing Option Analysis

I enjoy running. I despise running on a treadmill. At least the gym I am a member of offers 6 TV viewing options in an attempt to cancel out the crapiness of running on a treadmill. Here is an analysis of the viewing options during today's lunch run. This is a totally arbitrary watchability metric I concocted out of thin air.





Fox Local - Local 12:00PM news. At least the 12:00PM team is not as wonky as the 9:00PM team. You tune into the 9PM team because its a train wreck and you want to watch the show. Of course weather lady was indicating a chance for more snow this week so that knocked it down a bit.

ESPN2 - First Take. There is only so much Chip Bayless one can take in a week. Since this was my second dreadmill run of the week I had reached my Chip Bayless quota for the month. However First Take finished second in the watchability rating barely eeking out a victory over Fox Local.

Photo Stream - This is a photo stream of the various programs, trainers, and sevices offered at the gym. All of the photos are sized incorrectly to the 16:9 resolution ratio of the TV. So every picture and video is blurry and/or stretched. So annoying.

Fox News - Ahh yes the typical right wing slanted news perspective. "Thanks Obama". I am a conservative but it is hard to watch this "news" outlet at times. Those times are most times.

CBS - Bold and the Beautiful. I kid you not at one point on the closed caption it stated - Heather: [Heavy Breathing]. Heather was a 50s something blonde lady who looked more like a 70s something blonde lady. Guess that Bold in all actuality means Old, whereas beautiful does not mean beautiful. Of course that is a synopsis based on exactly 23 seconds of viewing. That was about all I could stand to look at. I'd rather run on a treadmill than watch that show, and that is saying something.

ESPN - Sports Center. Can't really go wrong with Sports Center for a guy that enjoys watching and playing sports. Main problem is this TV was on the end so I had to turn my head. It is hard enough not to fly off a treadmill for me looking forward.

Monday, January 6, 2014

Seinfeld Episode Ratings Data

Found a cool feature on IMDB today (probably an old feature, just finally stumbled on it). IMDB allows users to make lists of movies and shows. Several people have made all kinds of list. I stumbled today on the Seinfeld episode list.

The best part about the list at IMDB is it provides a way to export the data to CSV. The export includes the IMDB rating score. I grabbed the CSV, imported it into SQL, and started running some queries. From there of course I  made some charts in Excel.

Best Seasons by IMDB Rating


Top 20 Episodes


  Aveage Episode Rating: 8.59
Top Episode: Tie 9.4, The Contest Season 3 - 1992, The Soup Nazi Season 6 - 1995
Lowest Rated Episode: 7.5, The Dog Season 2 - 1991

Pretty cool find. I am going to check out some more lists. You can create your own lists as well after creating an account. Should be fun.

Sunday, January 5, 2014

Team Story Water Freeze Experiment

Team Story conducted a water freeze expierement this evening. We wanted to see how quickly some water would freeze sitting out on our front porch. We put two cups of tap water in a plastic cup, took temperature readings and recorded observations every 10 minutes. The outside temperature was 7 degrees above 0.

Here are the recordings.


Here is a chart showing the temperature trend.


Friday, December 27, 2013

Powershell Parse Outlook Inbox

I try to keep my inbox pretty clean. I only keep 30 days in my inbox before archival, try to setup rules to route and filter the noise, etc. I thought it would be cool to analyze the stats on my inbox. My inbox is pretty small compared to others, however there are some cool insights to gain from just 30 days of email. This process will work for larger inboxes as well.

I wrote a Script to parse Outlook Inbox. The output is a CSV file that you can use to analyze various things about your inbox. To Parse a folder in you inbox you can do this Using a BULK INSERT Script to load the data into SQL Server I was able to start generating some graphs. Here is a graph showing the top 20 senders to my email box. I left off the names to protect the guilty.

Top Senders

 Hour of day Breakdown


Busy email hours are 8am, 9am, 4pm etc.

Here is a word cloud of all the subject lines in my inbox (some stuff redacted)
 


VBScript Parse

With an update to Office some of my PowerShell code stopped working so I am adding the VBScript to parse Outlook as well.


Kick It: Starting the morning off right

Every morning I kick off the same programs to get the day rolling at work. Instead of launching all these applications manually I wrote a script to launch everything I need to get the morning started. It is easy to add new programs or commands.

Monday, December 2, 2013

Aggressive Driving First Pass

As you may or may not know I have an OBD adapter the sends data from my car's computer to my phone. I import that data into a database for analysis and such. I stumbled on an interesting article the other day about a similar OBD connection that pairs up with software on an iPhone.

The thing that interested me was their Aggressive driving metric. They use measures to calculate instances of aggressive driving, so I started to wonder what my data showed as far as aggressive driving habits and such. I started a first attempt to try and figure out a way to measure aggressive driving with the following measures. 

  1. An increase of Engine RPM by X amount in a 2 second time period - this would indicate that I punched the accelerator.
  2. A count of all the instances where I was traveling over 75 MPH. Maximum speed limit on my route is 70 mph.
  3. A decrease in Speed by X amount in a 2 second time period - this would indicate that I had to hit the brake pretty hard.

After some averaging and aggregates I decided for the first attempt here to use 1500 RPMs as a gauge for measure 1. Below is a map of all the instances where I increased Engine RPM by 1500 RPM in a 2 second time interval.


Not surprising the majority of extreme accelerations occur near an on-ramp for the various highways I enter and exit on the route. Also not surprising is that the majority of extreme accelerations occur on the commute home instead of the commute to work. My fellow drivers are just as anxious to get home as I am.

Here is my current to hit against my Torque Data:


I found an issue with the data. For some reason dates before 4/01/2013 have cut off the time element of the data field. I am working to re-import that data to clean it up and then I will continue with the other 2 aspects of aggressive driving.

Tuesday, November 19, 2013

Heart Rate on Antioch Run

Data collection has commenced with the new Zephyr Hxm Bluetooth Heart Monitor. I have been collecting data now for a few weeks and have developed a database and website to display the data.

The website is using the JavaScript charting library from http://www.canvasjs.com. Example below.


The above graph charts out one of my lunch runs. I use RunKeeper to track my runs. The picture below shows the details from Run Keeper.


Wednesday, November 6, 2013

Moved Blog to Blogger.com

Finally got tired of the image resize drama at Tumblr and migrated to the Blogger site. I am already deep into Google with gmail, my phone, drive, etc, might as well add some more data for them to collect on me.

So all my awesome google search results are hosed since the links to my blog changed. Oh well. Sorry if that caused you some grief.


Walking through Costco

Wore the Heart Monitor while walking through Costco the other day. 
I created a database to capture all the various events I record using the heart monitor. Then I configured SSRS to display the data. I need to figure out a way to match the heart rate up with various notes. Like when walking in the frozen food section near the ice cream, does my heart rate spike up.