Skip to main content
100%

Mapping Data for Premier League xG for teams from 21-22 season

✓ Published0🌍 Public
MMatthew Dzwil
Last edited Jan 30, 2023
Created on Jan 30, 2023

This visualization displays the average points per game (PPG) and expected points per game (xPPG) for each Premier League team during the 21-22 season, derived from Understat data. It uses d3.csvParse to load the CSV, d3.flatRollup to group matches by team, and d3.max to calculate the final point totals before dividing by 38 matchweeks. The results are rendered as a JSON-formatted text block using d3.select and .join. Team, Matchweek, xP, Points, and xPTable variables are all parsed as quantitative or categorical types for the aggregation.

AI-generated description

This data comes from: https://understat.com/

Transformation:

Getting the average points per game for each team.

Variables and their types:

Team (categorical): A Premier League Team

Matchweek (quantitative): Which week in the 38 week season the game occured

xP (quantitative): A probability that corresponds to the expected amount of points a team has accumulated so far in the season

Points (quantitative): The number of points gained in the game so far in the season

xPTable (quantitative): The position in the PL table a team would be based on their xP

MIT Licensed

Similar vizzes