Baseball Hacks
Baseball Hacks Tips & Tools for Analyzing and Winning with Statistics By Joseph Adler
January 2006
Pages: 467

Cover | Table of Contents | Colophon


Table of Contents

  1. Copyright

  2. Credits

    1. About the Author

    2. Contributors

    3. Acknowledgments

  3. Preface

    1. Why Baseball Hacks?

    2. How to Use This Book

    3. How This Book Is Organized

    4. Conventions Used in This Book

    5. Using Code Examples

    6. How to Contact Us

    7. Got a Hack?

    8. SafariŽ Enabled

  1. Chapter 1Basics of Baseball

    1. Hacks 1–7: Introduction

    2. Score a Baseball Game

    3. Make a Box Score from a Score Sheet

    4. Keep Score, Project Scoresheet–Style

    5. Follow Pitches During a Game

    6. Follow the Game Online

    7. Add Baseball Searches to Firefox

    8. Find Images of Stadiums

  2. Chapter 2Baseball Games from Past Years

    1. Hacks 8–23: Introduction

    2. Get and Install MySQL

    3. Get an Access Database of Player and Team Statistics

    4. Get a MySQL Database of Player and Team Statistics

    5. Make Your Own Stats Book

    6. Get Perl

    7. Learn Perl

    8. Get Historical Play-by-Play Data

    9. Make Box Scores or Database Tables from Play-by-Play Data with Retrosheet Tools

    10. Use SQL to Explore Game Data

    11. Use Microsoft Access to Run SQL Queries

    12. Get a GUI for MySQL

    13. Move Data from a Database to Excel

    14. Load Baseball Data into MySQL

    15. Load Retrosheet Game Logs

    16. Make a Historical Play-by-Play Database

    17. Use Regular Expressions to Identify Events

  3. Chapter 3Stats from the Current Season

    1. Hacks 24–29: Introduction

    2. Use Microsoft Excel Web Queries to Get Stats

    3. Spider Baseball Sites for Data

    4. Discover How Live Score Applications Work

    5. Keep Your Stats Database Up-to-Date

    6. Get Recent Play-by-Play Data

    7. Find Data on Hit Locations

  4. Chapter 4Visualize Baseball Statistics

    1. Hacks 30–39: Introduction

    2. Plot Histograms in Excel

    3. Get R and R Packages

    4. Analyze Baseball with R

    5. Access Databases Directly from Excel or R

    6. Load Text Files into R

    7. Compare Teams and Players with Lattices

    8. Compare Teams Using Chernoff Faces

    9. Plot Spray Charts

    10. Chart Team Stats in Real Time

    11. Slice and Dice Teams with Cubes

  5. Chapter 5Formulas

    1. Hacks 40–59: Introduction

    2. Measure Batting with Batting Average

    3. Measure Batting with On-Base Percentage

    4. Measure Batting with SLG

    5. Measure Batting with OPS

    6. Measure Power with ISO

    7. Measure Batting with Runs Created

    8. Measure Batting with Linear Weights

    9. Measure Pitching with ERA

    10. Measure Pitching with WHIP

    11. Measure Pitching with Linear Weights

    12. Measure Defense with Defensive Efficiency

    13. Measure Pitching with DIPS

    14. Measure Base Running Through EqBR

    15. Measure Fielding with Fielding Percentage

    16. Measure Fielding with Range Factor

    17. Measure Fielding with Linear Weights

    18. Measure Park Effects

    19. Calculate Fan Save Value

    20. Calculate Save Value

    21. Calculate Holds and Decent Holds for Relief Pitchers

  6. Chapter 6Sabermetric Thinking

    1. Hacks 60–71: Introduction

    2. Calculate Expected Runs

    3. Calculate an Expected Hits Matrix

    4. Look for Evidence of Platoon Effects

    5. Significant Number of At Bats

    6. Find "Clutch" Players

    7. Calculate Expected Number of Wins

    8. Measure Hits by Pitch Count

    9. OBP, SLG, and Scoring Runs

    10. Measure Skill Versus Luck

    11. Odds of the Best Team Winning the World Series

    12. Top 10 Bargain Outfielders

    13. Fitting Game Scores to a Strength Model

  7. Chapter 7The Bullpen

    1. Hacks 72–75: Introduction

    2. Start or Join a Fantasy League

    3. Draft Your Fantasy Team

    4. Make a Scoreboard Widget

    5. Analyze Other Sports

  1. Where to Learn More Stuff

    1. Baseball Books

    2. Baseball Web Sites

    3. Statistics and Data Mining Books

    4. Databases and Computer Languages

  2. Abbreviations

  3. Colophon

Return to Baseball Hacks