Football Analytics with Python & R

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

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

Author(s): Eric A. Eager; Richard A. Erickson
Publisher: O'Reilly Media, Inc.
Year: 2023

Language: English
Commentary: raw & unedited
Pages: 300

Preface

Who This Book Is For
Who This Book Is Not For
How We Think About Data and How to Use This Book
A Football Example
What You Will Learn from Our Book
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments

1. Football Analytics

Baseball Has the Three True Outcomes: Does Football?
Do Running Backs Matter?
How Data Can Help Us Contextualize Passing Statistics
Can You Beat the Odds?
Do Teams Beat the Draft?
Tools for Football Analytics
First Steps in Python and R
Example Data: Who Throws Deep?
nflfastR in R
nfl_data_py in Python
Data Science Tools Used in This Chapter
Suggested Readings

2. Exploring Data Analysis: Stable Versus Unstable Quarterback Statistics

Defining Questions
Obtaining and Filtering Data
Summarizing Data
Plotting Data
Histograms
Boxplots
Player-Level Stability of Passing Yards per Attempt
Deep Passes vs Short Passes
So, What Should We Do with This Insight?
Data Science Tools Used in This Chapter
Exercises with Your Data
Suggested Readings

3. Simple Linear Regression: Rushing Yards Over Expected

Exploratory Data Analysis
Simple Linear Regression
Who Was the Best in RYOE?
Is RYOE a Better Metric?
Data Science Tools Used in This Chapter
Exercises
Suggested Readings

4. Multiple Regression: Rushing Yards Over Expected

Definition of Multiple Linear Regression
Exploratory Data Analysis
Applying Multiple Linear Regression
Analyzing RYOE
So, Do Running Backs Matter?
Assumption of Linearity
Data Science Tools Used in This Chapter
Exercises
Suggested Readings

5. Generalized Linear Models: Completion Percentage Over Expected

General Linear Models
Building a GLM
GLM Application to Completion Percentage
Is CPOE More Stable Than Completion Percentage?
A Question About Residual Metrics
A Brief Primer on Odds Ratios
Data Science Tools Used in This Chapter
Exercises
Suggested Readings

6. Using Data Science for Sports Betting: Poisson Regression and Passing

The Main Markets in Football
Application of Poisson Regression: Prop Markets
The Poisson Distribution
Individual Player Markets and Modeling
Understanding Poisson Regression Coefficients
Closing Thoughts on GLMS
Data Science Tools Used in This Chapter
Exercises
Suggested Readings

7. Webscraping: Obtaining and Analyzing Draft Picks

for Loops
Web Scraping with Python
Webscraping in R
Analyzing the NFL Draft
The Jets/Colts 2018 Trade Evaluated
Are Some Teams Better at Drafting Players than Others?
Data Science Tools Used in This Chapter
Suggested Reading
Exercises

8. Principal Component Analysis and Clustering: Player Attributes

Web Scrapping and Visualizing NFL Combine Data
Introduction to PCA
PCA on All Data
Clustering Combine Data
Clustering Combine Data in Python
Clustering Combine Data in R
Closing Thoughts on Clustering
Data Science Tools Used in This Chapter
Exercises
Suggested Reading

9. Advanced Tools and Next Steps

Advanced Modeling Tools
Time Series Analysis
Multivariate Statistics Beyond PCA
Quantile Regression
Bayesian Statistics and Hierarchical Models
Survival Analysis/Time-to-event
Bayesian Networks/Structural Equation Modeling
Machine Learning
Command Line Tools
Bash Example
Suggested Reading for bash
Version Control
Git
GitHub and GitLab
GitHub Webpages and Resumes
Suggested Reading for Git
Style Guides and Linting
Packages
Suggested Reading for Packages
Computer Environments
Interactives and Report Tools to Share Data
Artificial Intelligence Tools
Conclusion

A. Python and R Basics

Obtaining Python and R
Local Installation
Cloud-based Options
Scripts
Packages in Python and R
nlffastR and nfl_py_data Tips
Integrated Development Environments
Basic Python Data Types

B. Summary Statistics and Data Wrangling: Passing the Ball

Basic Statistics
Averages
Variability and Distribution
Uncertainty Around Estimates
Filtering and Selecting Columns
Calculating Summary Statistics with Python and R
A Note about Presenting Summary Statistics
Improving your presentation
Exercises
Future readings

C. Data Wrangling Fundamentals

Logic Operators
Filtering and Sorting Data
Cleaning
Piping in R
Checking and Cleaning Data for Outliers
Merging Multiple Datasets

Glossary
About the Authors