top of page

Visualizing Shot Data: Euro 2024 Interactive Shot Map

  • Writer: Elisha Antunes
    Elisha Antunes
  • Jun 9
  • 2 min read

Updated: Jun 24

In elite football, every shot counts — but not all shots are equal. Some are fired from low-probability positions, while others are near-certain goals. To better understand these dynamics, I built an interactive shot map dashboard for the Euro 2024 tournament.


This project lets users visually explore every shot taken by any team or player, showing exactly where those shots occurred on the pitch, how likely they were to score (xG), and whether they ended up in the back of the net.


Motivation

Traditional match stats like total shots or possession percentages don’t always tell the full story. I wanted to create a tool that:

  • Visualizes shot quality through xG (expected goals)

  • Highlights individual player behavior and positioning

  • Encourages exploratory analysis via team and player filters


The goal was to make match-level data feel more tangible, giving users a field-level look at how players are performing in one of the world’s biggest football tournaments.


Packages Used

  • Streamlit for rapid, web-based interactivity

  • mplsoccer to render professional-quality football pitch diagrams

  • Pandas for dataset filtering and transformation

  • JSON parsing to extract and convert coordinate data


Dataset Details

The shot data is sourced from a Euro 2024 tracking dataset, structured with:

  • team: The national team that took the shot

  • player: The player responsible for the shot

  • location: A pair of coordinates (x, y) representing where on the pitch the shot occurred

  • shot_outcome: Whether the shot resulted in a goal, miss, save, etc.

  • shot_statsbomb_xg: The expected goal value (a probability from 0 to 1)


Only events marked as type = 'Shot' were included in the visualizations.


What the App Shows

Once launched, the app offers:

  • A dropdown selector for choosing a team and player

  • A half-pitch visualization showing all relevant shots

  • Color-coded shot markers:

    • 🟢 Green for goals

    • ⚪ White for missed or saved shots

  • Bubble sizes scaled by xG, so high-quality chances stand out


This format not only shows where shots were taken, but also how likely they were to result in goals.


ree

Example Use Cases

  • A fan might explore why a striker with 5 goals has a higher xG than one with 7

  • A data analyst could identify patterns in shot placement across teams

  • Coaches could use it to highlight efficiency vs. volume


Future Improvements

While the current version already supports meaningful exploration, future versions could include:

  • Heatmaps to show zones of frequent shooting

  • Filters by minute, assist type, or shot body part

  • A comparison mode for side-by-side player or team analysis

  • Match-by-match breakdowns instead of tournament totals


GitHub Repository


Live App


bottom of page