Chapter 2. Python Fundamentals: Building Your Analytics Toolkit
In Chapter 1, we mapped the analytical landscape of soccer and clarified the focus of this book: using data to describe matches, explain patterns, and build predictions. To do that well, we need a reliable computational environment in which analysis can be written, tested, reproduced, and extended.
Python is that environment for the rest of the book. It gives us a readable language, a mature ecosystem of data tools, and a practical workspace for moving from raw data to analytical output. Before we analyze matches, engineer features, or train predictive models, we first need to set up that workspace and become comfortable with its core habits.
This chapter therefore builds the foundation for everything that follows. You will install Python, create an isolated working environment, use Jupyter Notebook, and learn the syntax and data structures that later chapters rely on. The material is introductory, but it underpins every analysis, model, and conclusion in the book.
Even when the examples in this chapter are intentionally simple, we will try to keep them close to the kinds of objects that soccer analysts actually work with: team names, scores, match outcomes, shot counts, and basic summaries. The point is to learn the programming move in a context that will still feel familiar when we return to full match and event datasets.
Python: The Language Behind Modern Analytics
Python is well suited to soccer analytics for ...
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