Chapter 3. Exploratory Data Analysis in Soccer
In Chapter 2, you built a toolkit of essential Python skills. Now, it’s time to put those skills to work on real soccer data. This chapter introduces exploratory data analysis (EDA), the initial, open-ended process of inspecting a dataset to understand its structure, find patterns, and identify anomalies. Just as a coach studies match footage before deciding on tactics, EDA is a structured investigation of the data. It’s how analysts gain their first understanding of what has been recorded, how often, and where the gaps or oddities lie. Instead of jumping straight to predictive models, we start by asking simple questions to build intuition. This crucial first step prevents us from drawing conclusions on shaky ground and lays the foundation for all subsequent analysis.
As we perform EDA, we’ll see how to adapt general-purpose data science tools into soccer-specific analyses. Rather than just counting rows or calculating averages, we’ll explore passing networks, shot distance distributions, and team-level tactical patterns. These summaries will appear again in later chapters—for example, when we evaluate classification models in Chapter 5 or engineer features in Chapter 8.
By the end of this chapter, you will have a repeatable workflow for exploring any soccer dataset. You will be able to do the following:
-
Load, inspect, and clean raw match data from formats like JavaScript Object Notation (JSON) and comma-separated values (CSV)
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