Football Analytics with Python & R

Book description

Baseball is not the only sport to use "moneyball." American football fans, teams, and gamblers are increasingly using data to gain an edge against the competition. Professional and college teams use data to help select players and identify team needs. Fans use data to guide fantasy team picks and strategies. Sports bettors and fantasy football players are using data to help inform decision making. This concise book provides a clear introduction to using statistical models to analyze football data.

Whether your goal is to produce a winning team, dominate your fantasy football league, qualify for an entry-level football analyst position, or simply learn R and Python using fun example cases, this book is your starting place. You'll learn how to:

  • Apply basic statistical concepts to football datasets
  • Describe football data with quantitative methods
  • Create efficient workflows that offer reproducible results
  • Use data science skills such as web scraping, manipulating data, and plotting data
  • Implement statistical models for football data
  • Link data summaries and model outputs to create reports or presentations using tools such as R Markdown and R Shiny
  • And more

Publisher resources

View/Submit Errata

Table of contents

  1. 1. Football Analytics
    1. Baseball Has the Three True Outcomes: What Are Football’s?
    2. Do Running Backs Matter?
    3. Understanding the Passing Game Through Data
    4. Can You Beat the Odds?
    5. Do Teams Know How to Draft?
    6. Tools for Football Analytics
    7. First Steps in Python and R
    8. Example Data: Who Throws Deep?
      1. nflfastR in R
      2. nfl_data_py in Python
    9. Suggested Reading
  2. 2. Exploring Data Analysis: Stable Versus Unstable Quarterback Statistics
    1. Defining Questions
    2. Obtaining and Filtering Data
    3. Summarizing Data
    4. Plotting Data
      1. Histograms
      2. Boxplots
    5. Player-Level Stability of Passing Yards per Play
    6. So, What Should We Do with This Insight?
    7. Exercises with Your Data
    8. Suggested Reading
  3. 3. Simple Linear Regression: Rushing Yards Over Expected
    1. Exploratory Data Analysis
    2. Simple Linear Regression
    3. Who Was the Best in RYOE?
    4. Is This a Better Metric?
    5. Exercises
    6. Future readings
  4. 4. Multiple regression: Rushing Yards over Expected
    1. Definition of Multiple Linear Regression
    2. Exploratory Data Analysis
    3. Applying Multiple Linear Regression
    4. Analyzing RYOE
    5. Do Running Backs Matter?
    6. Exercises
    7. Future readings
  5. A. Python and R Basics
    1. Obtaining Python and R
      1. Local Installation
      2. Cloud-based Options
    2. Scripts
    3. Packages in Python and R
    4. Integrated Development Environments
  6. B. Summary Statistics and Data Wrangling: Passing the Ball
    1. Basic Statistics
      1. Averages
      2. Variability and Distribution
      3. Uncertainty Around Estimates
    2. Filtering and Selecting Columns
    3. Calculating Summary Statistics with Python and R
    4. A Note about Presenting Summary Statistics
    5. Exercises
    6. Future readings
  7. About the Authors

Product information

  • Title: Football Analytics with Python & R
  • Author(s): Eric A. Eager, Richard A. Erickson
  • Release date: November 2023
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492099567