Skip to Content
Baseball Hacks
book

Baseball Hacks

by Joseph Adler
January 2006
Beginner
467 pages
14h 21m
English
O'Reilly Media, Inc.
Content preview from Baseball Hacks

Make a Box Score from a Score Sheet

Create a box score to summarize player performance.

Although a score sheet [Hack #1] describes everything that happened during a game, it doesn’t tell you directly how each player performed. This hack explains how to use a score sheet to calculate a box score, a neat way to summarize how each player performed during a game.

Box scores are a traditional way to summarize baseball games, dating back to Chadwick in the 19th century. A box score captures a lot of information about the game. For each batter, it captures the number of at bats (AB), hits (H), runs (R), runs batted in (RBI), doubles (2B), home runs (HR), stolen bases (SB), and sacrifice hits (SH). For each pitcher, it includes the number of innings pitched, hits, runs, earned runs, walks, and strikeouts. It also includes notes on the number of players left on base; the winning, losing, and saving pitchers; and some other miscellaneous information.

As an example, here is the box score from the October 2, 1978 playoff game between the Yankees and the Red Sox:

 Game of 10/2/1978 -- New York at Boston (D) New York AB R H RBI Boston AB R H RBI Rivers M, cf 2 1 1 0 Burleson R, ss 4 1 1 0 Blair P, ph-cf 1 0 1 0 Remy J, 2b 4 1 2 0 Munson T, c 5 0 1 1 Rice J, rf 5 0 1 1 Piniella L, rf 4 0 1 0 Yastrzemski C, lf 5 2 2 2 Jackson R, dh 4 1 1 1 Fisk C, c 3 0 1 0 Nettles G, 3b 4 0 0 0 Lynn F, cf 4 0 1 1 Chambliss C, 1b 4 1 1 0 Hobson B, dh 4 0 1 0 White R, lf 3 1 1 0 Scott G, 1b 4 0 2 0 Thomasson G, lf ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

A Century of Mistakes in Baseball

A Century of Mistakes in Baseball

Martin B. Schmidt, David J. Berri
The Human Factor in AI-Based Decision-Making

The Human Factor in AI-Based Decision-Making

Philip Meissner, Christoph Keding
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0596009429Errata Page