Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Football Analytics with Python: Build a Shot Map
New

Football Analytics with Python: Build a Shot Map

Create a football shot map with real StatsBomb data, pandas, mplsoccer, and xG.
Last updated 11/2026
English
English

What you'll learn

  • Load and explore real football event data using StatsBombPy
  • Filter and prepare shot data for visualization with pandas
  • Build a football shot map using Python and mplsoccer
  • Use xG and shot outcomes to communicate chance quality and goals

Course content

1 section • 6 lectures • 35m total length
  • What Is a Shot Map?3:33
  • Load and Prepare the Shot Data7:20

    Load shot events from statsbombpy, filter to United States shots, and extract x and y coordinates. Prepare the data for plotting the shot map on the football pitch.

  • Plot Shots on a Football Pitch4:32
  • Add xG and Shot Outcomes9:32
  • Build the Final Shot Map7:48
  • Your Challenge: Build Your Own Shot Map2:53

Requirements

  • Basic familiarity with Python is helpful, but no advanced programming knowledge is required
  • A Google account to run the provided notebook in Google Colab

Description

Learn Football Analytics with Python by building a complete shot map using real StatsBomb match data.

In this hands-on beginner course, you'll transform football event data into a professional-looking visualization that shows where shots were taken, their outcomes, and their expected goals (xG).

Using Python, pandas, StatsBombPy, Matplotlib, and mplsoccer in Google Colab, you'll follow a practical workflow from preparing raw shot data to creating and exporting your finished shot map.

Rather than focusing on complex programming concepts, this course helps you develop a practical football data visualization skill you can apply to different matches and teams.


By the end of the course, you will be able to:

• Load real football event data with StatsBombPy
• Filter and prepare shot data with pandas
• Extract x and y coordinates from event locations
• Plot shots on a StatsBomb football pitch with mplsoccer
• Use xG to represent chance quality through marker size
• Distinguish goals from other shot outcomes
• Add titles, legends, and data attribution to your visualization
• Export your finished shot map as an image
• Interpret the visualization and apply the same workflow to another match or team


The course includes the complete Python notebook and a downloadable course guide so you can reproduce the project and continue experimenting after the lessons.

This course is ideal for beginners interested in football analytics, sports data, or football data visualization who want to move from event data to a practical visual analysis.

Who this course is for:

  • Beginners who want to learn football data visualization with Python
  • Football analysts, coaches, scouts, and students interested in working with event data
  • Learners who completed “Your First Football Dataset with StatsBombPy” and want to take the next practical step