Baseball Hacks

Front Cover
"O'Reilly Media, Inc.", 2006 - Games - 448 pages
0 Reviews

Baseball Hacks isn't your typical baseball book--it's a book about how to watch, research, and understand baseball. It's an instruction manual for the free baseball databases. It's a cookbook for baseball research. Every part of this book is designed to teach baseball fans how to do something. In short, it's a how-to book--one that will increase your enjoyment and knowledge of the game.

So much of the way baseball is played today hinges upon interpreting statistical data. Players are acquired based on their performance in statistical categories that ownership deems most important. Managers make in-game decisions based not on instincts, but on probability - how a particular batter might fare against left-handedpitching, for instance.

The goal of this unique book is to show fans all the baseball-related stuff that they can do for free (or close to free). Just as open source projects have made great software freely available, collaborative projects such as Retrosheet and Baseball DataBank have made great data freely available. You can use these data sources to research your favorite players, win your fantasy league, or appreciate the game of baseball even more than you do now.

Baseball Hacks shows how easy it is to get data, process it, and use it to truly understand baseball. The book lists a number of sources for current and historical baseball data, and explains how to load it into a database for analysis. It then introduces several powerful statistical tools for understanding data and forecasting results.

For the uninitiated baseball fan, author Joseph Adler walks readers through the core statistical categories for hitters (batting average, on-base percentage, etc.), pitchers (earned run average, strikeout-to-walk ratio, etc.), and fielders (putouts, errors, etc.). He then extrapolates upon these numbers to examine more advanced data groups like career averages, team stats, season-by-season comparisons, and more. Whether you're a mathematician, scientist, or season-ticket holder to your favorite team, Baseball Hacks is sure to have something for you.

Advance praise for Baseball Hacks:

"Baseball Hacks is the best book ever written for understanding and practicing baseball analytics. A must-read for baseball professionals and enthusiasts alike."

-- Ari Kaplan, database consultant to the Montreal Expos, San Diego Padres, and Baltimore Orioles

"The game was born in the 19th century, but the passion for its analysis continues to grow into the 21st. In Baseball Hacks, Joe Adler not only demonstrates thatthe latest data-mining technologies have useful application to the study of baseball statistics, he also teaches the reader how to do the analysis himself, arming the dedicated baseball fan with tools to take his understanding of the game to a higher level."

-- Mark E. Johnson, Ph.D., Founder, SportMetrika, Inc. and Baseball Analyst for the 2004 St. Louis Cardinals

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Contents

Score a Baseball Game
4
Make a Box Score from a Score Sheet
12
Keep Score Project ScoresheetStyle
19
Follow Pitches During a Game
26
Follow the Game Online
31
Add Baseball Searches to Firefox
33
Find Images of Stadiums
36
Baseball Games from Past Years
39
Measure Batting with Batting Average
213
Measure Batting with OnBase Percentage
221
Measure Batting with SLG
224
Measure Batting with OPS
227
Measure Power with ISO
230
Measure Batting with Runs Created
234
Measure Batting with Linear Weights
238
Measure Pitching with ERA
246

Get and Install MySQL
40
Get an Access Database of Player and Team Statistics
46
Get a MySQL Database of Player and Team Statistics
49
Make Your Own Stats Book
54
Get Perl
64
Learn Perl
67
Get Historical PlaybyPlay Data
74
Make Box Scores or Database Tables from PlaybyPlay Data
75
with Retrosheet Tools
78
Use SQL to Explore Game Data
84
Use Microsoft Access to Run SQL Queries
92
Get a GUI for MySQL
94
Move Data from a Database to Excel
97
Load Baseball Data into MySQL
100
Load Retrosheet Game Logs
105
Make a Historical PlaybyPlay Database
107
Use Regular Expressions to Identify Events
111
Stats from the Current Season
114
Spider Baseball Sites for Data
121
Discover How Live Score Applications Work
127
Keep Your Stats Database UptoDate
131
Get Recent PlaybyPlay Data
142
Find Data on Hit Locations
151
Visualize Baseball Statistics
158
Get R and R Packages
162
Analyze Baseball with R
164
Access Databases Directly from Excel or R
170
Load Text Files into R
180
Compare Teams and Players with Lattices
182
Compare Teams Using Chernoff Faces
185
Plot Spray Charts
188
Chart Team Stats in Real Time
193
Slice and Dice Teams with Cubes
200
Formulas
210
Measure Pitching with WHIP
251
Measure Pitching with Linear Weights
253
Measure Defense with Defensive Efficiency
257
Measure Pitching with DIPS
260
Measure Base Running Through EqBR
266
Measure Fielding with Fielding Percentage
271
Measure Fielding with Range Factor
273
Measure Fielding with Linear Weights
281
Measure Park Effects
288
Calculate Fan Save Value
295
Calculate Save Value
300
Calculate Holds and Decent Holds for Relief Pitchers
305
Sabermetric Thinking
310
Calculate Expected Runs
311
Calculate an Expected Hits Matrix
321
Look for Evidence of Platoon Effects
329
Significant Number of At Bats
332
Find Clutch Players
342
Calculate Expected Number of Wins
348
Measure Hits by Pitch Count
352
OBP SLG and Scoring Runs
361
Measure Skill Versus Luck
365
Odds of the Best Team Winning the World Series
377
Top 10 Bargain Outfielders
384
Fitting Game Scores to a Strength Model
400
The Bullpen
410
Draft Your Fantasy Team
416
Make a Scoreboard Widget
419
Analyze Other Sports
428
Appendix A Where to Learn More Stuff
431
Appendix B Abbreviations
436
Index
439
Copyright

Other editions - View all

Common terms and phrases

About the author (2006)

Joseph Adler has years of experience working with lots of popular data mining packages, including databases (including Oracle, PostgreSQL, and MS Access), statistical analysis tools (SAS, SPSS, S-Plus, and R), and data mining tools (SAS Enterprise Miner, Insightful Miner, Oracle Data Mining, Weka, and SPSS Clementine). He is currently leading a project at Verisign to pick a data mining package for enterprise deployment.

Bibliographic information