Prospecting and Mining  MLB (Sports) Data           Ryan Elmore       rtelmore@gmail.com         Twitter: rtelmore        ...
Data Science
... And HypeThe Economist May 14-20,2011: “Corporate chefsare in demand again, officerents are soaring and thepay being off...
Not Your Typical Tech Talk
A Delayed Flight at DIA ...
Why Are The Games Boring?
Simmons Red Sox Data
Simmons Red Sox Data
A Few Thoughts ...• The underlying data unit is in minutes. So?• Why is he only looking at this particular set  of year?• ...
Where Can We Get Data?
Where Can We Get Data?http://www.baseball-reference.com/teams/COL/2010-schedule-scores.shtml
Where Can We Get Data?http://www.baseball-reference.com/teams/COL/2010-schedule-scores.shtml      Just step through       ...
Where Can We Get Data?http://www.baseball-reference.com/teams/COL/2010-schedule-scores.shtml      Just step through       ...
A Typical Website          The Golden Nugget
Data All Teams
Another Visual Representation
Boston vs. The Rest
Are The Games Getting Longer? • I don’t know! • I would say that the evidence supports an   increase up until 2000 and the...
Another Exercise  • In a conversation with Paul Parker, he asked      if the minimum number of pitches per (full)      inn...
The Boxscore WebsiteThe Golden Nugget
How Do We Proceed?The most systematic way that I could findwas to break it down like this:• 30 Teams• 2005 - 2010• Everyday...
Was That Minimum Attained?  • NO! Unless there is an error in my code.  • Did we learn something? Of course.  • Example: I...
Using Google Trends Data• http://www.google.com/trends• You can put a search term in and it will  return a lot of historic...
GT “Colorado Rockies”
GTrends “Colorado Rockies”                      World Series                      Playoff Run
Google Trends “NFL”
Google Trends “NFL”
Google Trends “NFL”
Google Trends “NFL”
Conclusions/Discussion• There is a lot of data available on the web!• You can access this data from a browser;  however, y...
Resources• thelogcabin.wordpress.com• github.com/rtelmore• baseball-reference.com, espn.com, Google  Trends, etc.• Twitter...
Upcoming SlideShare
Loading in …5
×

Sabr

3,984 views

Published on

Published in: Sports, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,984
On SlideShare
0
From Embeds
0
Number of Embeds
2,876
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Sabr

  1. 1. Prospecting and Mining MLB (Sports) Data Ryan Elmore rtelmore@gmail.com Twitter: rtelmore August 6, 2011 Rocky Mountain SABR Meeting
  2. 2. Data Science
  3. 3. ... And HypeThe Economist May 14-20,2011: “Corporate chefsare in demand again, officerents are soaring and thepay being offered totalented folk in fashionablefields like data scienceis reaching Hollywoodlevels.”
  4. 4. Not Your Typical Tech Talk
  5. 5. A Delayed Flight at DIA ...
  6. 6. Why Are The Games Boring?
  7. 7. Simmons Red Sox Data
  8. 8. Simmons Red Sox Data
  9. 9. A Few Thoughts ...• The underlying data unit is in minutes. So?• Why is he only looking at this particular set of year?• How do the Red Sox compare to the other teams in MLB?• Crap, that last point will require downloading a lot of data ... and my flight was boarding in 10 minutes!
  10. 10. Where Can We Get Data?
  11. 11. Where Can We Get Data?http://www.baseball-reference.com/teams/COL/2010-schedule-scores.shtml
  12. 12. Where Can We Get Data?http://www.baseball-reference.com/teams/COL/2010-schedule-scores.shtml Just step through all of the teams: COL, BOS, etc.
  13. 13. Where Can We Get Data?http://www.baseball-reference.com/teams/COL/2010-schedule-scores.shtml Just step through and any years all of the teams: that you are COL, BOS, etc. interested in.
  14. 14. A Typical Website The Golden Nugget
  15. 15. Data All Teams
  16. 16. Another Visual Representation
  17. 17. Boston vs. The Rest
  18. 18. Are The Games Getting Longer? • I don’t know! • I would say that the evidence supports an increase up until 2000 and then it’s been constant or slightly decreasing. • This is not an exercise in statistical inference; I was just mining the data and looking for trends. • thelogcabin.wordpress.com/ • github.com/rtelmore/MLB
  19. 19. Another Exercise • In a conversation with Paul Parker, he asked if the minimum number of pitches per (full) inning (6 pitches) has ever been attained. • This is a hard problem! • Where do you find this sort of data? • Back to baseball-reference.com ... the box scores.http://www.baseball-reference.com/boxes/COL/COL201104010.shtml
  20. 20. The Boxscore WebsiteThe Golden Nugget
  21. 21. How Do We Proceed?The most systematic way that I could findwas to break it down like this:• 30 Teams• 2005 - 2010• Everyday from Apr 1 through Oct 31• This is a little more than 78K URLs!• My program took about 3 hrs 25 min.
  22. 22. Was That Minimum Attained? • NO! Unless there is an error in my code. • Did we learn something? Of course. • Example: I should’ve stored everything in a database while I was downloading and processing the data. Why? I didn’t save any of the data from the 3+ hrs of computing.http://www.baseball-reference.com/boxes/COL/COL201104010.shtml
  23. 23. Using Google Trends Data• http://www.google.com/trends• You can put a search term in and it will return a lot of historical statistics related to your query (e.g., flu trends)• There is an R package (RGoogleTrends) that allows access to the GT API if you have a google account (e.g., gmail).• Use the getGTrends(“query”) function
  24. 24. GT “Colorado Rockies”
  25. 25. GTrends “Colorado Rockies” World Series Playoff Run
  26. 26. Google Trends “NFL”
  27. 27. Google Trends “NFL”
  28. 28. Google Trends “NFL”
  29. 29. Google Trends “NFL”
  30. 30. Conclusions/Discussion• There is a lot of data available on the web!• You can access this data from a browser; however, you can access A LOT more data if you let your computer do the work.• Good tools for data mining: R, python, perl, etc.• Download data and see where you go
  31. 31. Resources• thelogcabin.wordpress.com• github.com/rtelmore• baseball-reference.com, espn.com, Google Trends, etc.• Twitter (@rtelmore)• www.r-project.org• www.meetup.com/DenverRUG

×