Book description
With its flexible capabilities and opensource platform, R has become a major tool for analyzing detailed, highquality baseball data. Analyzing Baseball Data with R provides an introduction to R for sabermetricians, baseball enthusiasts, and students interested in exploring the rich sources of baseball data. It equips readers with the necessary skills and software tools to perform all of the analysis steps, from gathering the datasets and entering them in a convenient format to visualizing the data via graphs to performing a statistical analysis.
The authors first present an overview of publicly available baseball datasets and a gentle introduction to the type of data structures and exploratory and data management capabilities of R. They also cover the traditional graphics functions in the base package and introduce more sophisticated graphical displays available through the lattice and ggplot2 packages. Much of the book illustrates the use of R through popular sabermetrics topics, including the Pythagorean formula, runs expectancy, career trajectories, simulation of games and seasons, patterns of streaky behavior of players, and fielding measures. Each chapter contains exercises that encourage readers to perform their own analyses using R. All of the datasets and R code used in the text are available online.
This book helps readers answer questions about baseball teams, players, and strategy using large, publically available datasets. It offers detailed instructions on downloading the datasets and putting them into formats that simplify data exploration and analysis. Through the book’s various examples, readers will learn about modern sabermetrics and be able to conduct their own baseball analyses.
Table of contents
 Cover
 Half Title
 Title
 Copyright
 Contents
 Preface
 1 The Baseball Datasets
 2 Introduction to R
 3 Traditional Graphics
 4 The Relation Between Runs and Wins

5 Value of Plays Using Run Expectancy
 5.1 The Run Expectancy Matrix
 5.2 Runs Scored in the Remainder of the Inning
 5.3 Creating the Matrix
 5.4 Measuring Success of a Batting Play
 5.5 Albert Pujols
 5.6 Opportunity and Success for All Hitters
 5.7 Position in the Batting Lineup
 5.8 Run Values of Different Base Hits
 5.9 Value of Base Stealing
 5.10 Further Reading and Software
 5.11 Exercises
 6 Advanced Graphics
 7 Balls and Strikes Effects
 8 Career Trajectories
 9 Simulation
 10 Exploring Streaky Performances
 11 Learning About Park Effects by Database Management Tools

12 Exploring Fielding Metrics with Contributed R Packages
 12.1 Introduction

12.2 A Motivating Example: Comparing Fielding Metrics
 12.2.1 Introduction
 12.2.2 The fielding metrics
 12.2.3 Reading an Excel spreadsheet (XLConnect)
 12.2.4 Summarizing multiple columns (doBy)
 12.2.5 Finding the most similar string (stringdist)
 12.2.6 Applying a function on multiple columns (plyr)
 12.2.7 Weighted correlations (weights)
 12.2.8 Displaying correlation matrices (ellipse)
 12.2.9 Evaluating the fielding metrics (psych)
 12.3 Comparing Two Shortstops
 12.4 Further Reading
 12.5 Exercises
 A Retrosheet Files Reference
 B Accessing and Using MLBAM Gameday and PITCHf/x Data
 Bibliography
 Index
Product information
 Title: Analyzing Baseball Data with R
 Author(s):
 Release date: January 2018
 Publisher(s): Chapman and Hall/CRC
 ISBN: 9781315360591
You might also like
book
Python for Finance, 2nd Edition
The financial industry has recently adopted Python at a tremendous rate, with some of the largest …
book
Machine Learning Pocket Reference
With detailed notes, tables, and examples, this handy reference will help you navigate the basics of …
book
Learn Python 3 the Hard Way: A Very Simple Introduction to the Terrifyingly Beautiful World of Computers and Code, First Edition
You Will Learn Python 3! Zed Shaw has perfected the world's best system for learning Python …
book
Programming Skills for Data Science: Start Writing Code to Wrangle, Analyze, and Visualize Data with R, First Edition
The Foundational HandsOn Skills You Need to Dive into Data Science “Freeman and Ross have created …