Skip to main content
100%

Scatter Plot PL xG Data with both xP and Points with button

✓ Published1🌍 Public
MMatthew Dzwil
Last edited Mar 16, 2023
Created on Mar 16, 2023

This example visualizes Premier League expected goals (xG) data for Arsenal, plotting both actual points and expected points (xP) across matchweeks as separate scatter plot layers over a shared axis. A clickable “Team” button toggles a dropdown menu listing all teams, allowing the user to filter and compare different squads. The visualization is built with D3 v7, using `scaleLinear` for axes, `csvParse` to load data from a GitHub gist, and applies a join-based approach for incremental SVG rendering of circles and menus. The code also integrates custom axis and dropdown modules.

AI-generated description
MIT Licensed

Similar vizzes