| |
| |
The Baseball Datasets | |
| |
| |
Introduction | |
| |
| |
The Lahman Database: Season-by-Season Data | |
| |
| |
Retrosheet Game-by-Game Data | |
| |
| |
Retrosheet Play-by-Play Data | |
| |
| |
Pitch-by-Pitch Data | |
| |
| |
Introduction to R | |
| |
| |
Introduction | |
| |
| |
Installing R and RStudio | |
| |
| |
Vectors | |
| |
| |
Objects and Containers in R | |
| |
| |
Collection of R Commands | |
| |
| |
Reading and Writing Data in R | |
| |
| |
Data Frames | |
| |
| |
Packages | |
| |
| |
Splitting, Applying, and Combining Data | |
| |
| |
Traditional Graphics | |
| |
| |
Introduction | |
| |
| |
Factor Variable | |
| |
| |
Saving Graphs | |
| |
| |
Dot Plots | |
| |
| |
Numeric Variable: Stripchart and Histogram | |
| |
| |
Two Numeric Variables | |
| |
| |
A Numeric Variable and a Factor Variable | |
| |
| |
Comparing Ruth, Aaron, Bonds, and A-Rod | |
| |
| |
The 1998 Home Run Race | |
| |
| |
The Relation between Runs and Wins | |
| |
| |
Introduction | |
| |
| |
The Teams Table in Lahman's Database | |
| |
| |
Linear Regression | |
| |
| |
The Pythagorean Formula for Winning Percentage | |
| |
| |
The Exponent in the Pythagorean Formula | |
| |
| |
Good and Bad Predictions by the Pythagorean Formula | |
| |
| |
How Many Runs for a Win? | |
| |
| |
Value of Plays Using Run Expectancy | |
| |
| |
The Runs Expectancy Matrix | |
| |
| |
Runs Scored in the Remainder of the Inning | |
| |
| |
Creating the Matrix | |
| |
| |
Measuring Success of a Batting Play | |
| |
| |
Albert Pujols | |
| |
| |
Opportunity and Success for All Hitters | |
| |
| |
Position in the Batting Lineup | |
| |
| |
Run Values of Different Base Hits | |
| |
| |
Value of Base Stealing | |
| |
| |
Advanced Graphics | |
| |
| |
Introduction | |
| |
| |
The lattice Package | |
| |
| |
The ggplot2 Package | |
| |
| |
Balls and Strikes Effects | |
| |
| |
Introduction | |
| |
| |
Hitter's Counts and Pitcher's Counts | |
| |
| |
Behaviors by Count | |
| |
| |
Career Trajectories | |
| |
| |
Introduction | |
| |
| |
Mickey Mantle's Batting Trajectory | |
| |
| |
Comparing Trajectories | |
| |
| |
General Patterns of Peak Ages | |
| |
| |
Trajectories and Fielding Position | |
| |
| |
Simulation | |
| |
| |
Introduction | |
| |
| |
Simulating a Half Inning | |
| |
| |
Simulating a Baseball Season | |
| |
| |
Exploring Streaky Performances | |
| |
| |
Introduction | |
| |
| |
The Great Streak | |
| |
| |
Streaks in Individual At-Bats | |
| |
| |
Local Patterns of Weighted On-Base Average | |
| |
| |
Learning about Park Effects by Database Management Tools | |
| |
| |
Introduction | |
| |
| |
Installing MySQL and Creating a Database | |
| |
| |
Connecting R to MySQL | |
| |
| |
Filling a MySQL Game Log Database from R | |
| |
| |
Querying Data from R | |
| |
| |
Baseball Data as MySQL Dumps | |
| |
| |
Calculating Basic Park Factors | |
| |
| |
Exploring Fielding Metrics with Contributed R Packages | |
| |
| |
Introduction | |
| |
| |
A Motivating Example: Comparing Fielding Metrics | |
| |
| |
Comparing Two Shortstops | |
| |
| |
| |
Retrosheet Files Reference | |
| |
| |
| |
Accessing and Using MLBAM Gameday and PITCHf/x Data | |
| |
| |
Bibliography | |
| |
| |
Index | |