Skip to content

tonyelhabr/sports_viz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo stores my code and plots for sports-related plots. Any "small" data is stored in the repo. Otherwise, it's saved locally and git-ignored here.

The projects are listed in reverse chronological order. A skipped number corresponds to an idea that I did not end up finishing.

84. 2024 EURO and Copa America "Pacing"

82. 2023/24 EPL Points Won and Lost

81. 2024 MLS Atlanta United Preview

80. 2023 MLS Attacking Throw-ins

79. 2023/24 UCL Round of 16 Relative Opta Rankings

76. 2023 (Personal) Fantasy Football League Luck

71. 2023 Men's U20 World Cup

70. 2023 EPL Team of the Season

66. Club ranking comparison

65. Opta npxG model calibration

64. Comparison of FBref's new and old data providers

63. 2022 World Cup Height Mismatches

62. 2022 USL Championship Finals Preview

61. Liga MX Shotmap

60. Card Descriptions

59. Expected Points Deep Dive

58. Manchester United Loss Tweets

55. 2021/22 EPL Blocked Shots from Outside the Box

54. 2021/22 UCL Final Nice Dawgs

53. 2021/22 Premier League Aerial Duels

52. Premier League Time to Throw In

50. Premier League Time to Throw In

49. Premier League Team Foul Rate by Season

48. 2021-22 Premier League In-game xG Difference

five horizontal bars per facet, where each facet is for a signle team, each bar represents one of the last 5 games, fill represents proportion of match ahead or behind in xG

pass networks for Liverpool vs. Manchester City 2021-10-03 match, showing weighted max cut values

table showing correlations of various traditional and network stats with xG and xT diff. / 90, showing that weighted max cut is stronger than other network stats and has similar strength to pass-derived stats

horizontal error bars facetted on regression type (with or without confounders), showing that weighted max cut diff. / 90 effectively plays no role in describing match outcome in the presense of confounders

46. EPL "Rage" Fouls

spiral chart with minutes played on x-axis and count of rage fouls on y-axis. strands represent one player per sesaon.

  1. 2021/22 Fantasy Football Luck

table showing luckiest standing placement in my fantasy football league over the past 2 seasons

table showing unluckiest standing placement in my fantasy football league over the past 2 seasons

44. MLS Golazos

error bars showing percentage of shots barely on frame in the MLS and the Big 5 soccer leagues, with MLS as having the highest percentage

shotmap of 2021 MLS goals where shot is barely within frame (about 20 shots)

plot of goal frame of shots barely within frame from MLS and big 5 leagues, emphasizing difference in xG on target and xG with size and league with color

43. xG Signal

line plot showing log curve of average xg difference r squared with rest-of-season xg difference, where the curve exceeds 0.5 at around 11 matches

42. 2021-22 Premier League New Players

faceted waffle plot of 2021-22 english premier league, where each block represents 90 minutes played by new players on a given team, facets are for each team, and blocks are colored by position

41. #USMNT popularity growth drivers

venn diagram showing mutual follows of @watke_, @TedLasso, and @USMNT on Twitter

40. Significant xG Overperformance

dumbell plot of 10-game rolling xg/shot and g/shot for harry kane and romelu lukaku over their past 50 matches

dumbell plot of 10-game rolling xg/shot and g/shot for timo werner over their past 50 matches

38. Football #viz Twitter

venn diagram showing about 50 twiter accounts who post soccer viz, grouped by following, frequency of tweets, and frequency of images

37. CONCACAF'd

geo-tile map showing average 2nd half stoppage time when matches end in a draw or with a 1 goal difference for CONCACAF, CONMEBOL, and UEFA teams in the Gold Cup, Copa America, and Euros since 2015. Brazil and South American teams (CONMEBOL) have the highest averages

table showing average yellows, reds, fouls, and PKs per match for CONCACAF, CONMEBOL, and UEFA teams in the Gold Cup, Copa America, and Euros since 2015. CONMEBOL teams have a notably higher number of yellows and reds

36. 2020-21 EPL Team Subreddit Activity

Chatter plot of most controversial posts on eac 2020-21 EPL Team's Subreddit

Scatter plot example of visualizing UMAP and GMM, using 2 components and 6 clusters

Table comparing 2-component PCA and UMAP rankings of player similarity for Jadon Sancho

34. 2020 EUROs Forecast Review

Table of mean Brier skill score for pre-tournament 2020 EUROs forecasts

Table of pre-tournament 2020 EUROs forecasts for champion

33. Relative League Power Rankings

Relative increase in competition level when moving from league A to B

Expected change in xG/90 when moving from league A to B

Un-adjusted xG/90 change when moving from league A to B

32. 2020 EUROs

Which 2020/21 Premier League Teams Have the Most Players in the 2020 Euros?

Match Goals Per 90 for the 2020 EUROs

30. EPL Subjective VAR calls

EPL Subjective VAR calls by Team since 2019-20

29. 2020-21 EPL Games Started by Young Players

Animated Bar Plot GIF of 2020-21 EPL Games Started by Young Players

28. 2020-21 EPL Season Review with VAEP

Best starting 11 players of the 2020/21 Premier League season (arranged in a 4-3-3), according to VAEP (Valuing Actions by Estimating Probabilities). Grealish, Kane, Salah, Jack Harrison, Gundogan, Raphinha, Cresswell, Zouma, Dunk, Alexander-Arnold, Sam Johnstone.

Example of how VAEP scores each action in a possession. Example comes from a 2021-04-04 match between Tottenham and Newcastle, in which Kane misses a shot and gets net negative VAEP.

VAEP vs. minutes played for the 2020/21 Premier League season. Subplots made for each of four position groupings (Forward/Attacker, Midfielder, Defender, Goalkeeper).

VAEP vs. transfer market value for the 2020/21 Premier League season. Subplots made for each of four position groupings (Forward/Attacker, Midfielder, Defender, Goalkeeper).

VAEP vs. DAVIES for the 2020/21 Premier League season.

Table showing year-over-year correlations for VAEP and DAVIES. Both average around 0.45.

27. Pep Guardiola Non-UCL Titles

Table with Pep Guardiola's Non-UCL Titles Won Since His Las UCL Title

Timeline Plot of Champions League Re-matches between Teams from the Same League

25. Soccer Referee Activity Across Major Leagues

Beeswarm Plot of Referee Statistics By League

24. 2020-21 EPL Team Relative Fouling Rate by Game State

2020-21 EPL Team Fouling Rate Relative to Opponent by Game State

23. European Super League Google Trends

European Super League Google Trends Animated GIF

22. 2020-21 Chelsea Attack Under Tuchel Compared to Lampard

Heatmaps for Passes, Touches, and Take-Ons for Kai Havertz and Mason Mount under Tuchel vs. Lampard

21. 2020-21 EPL Foul Tanaka Maps

2020-21 EPL Fouls Drawn by Position Tanaka Map

2020-21 EPL Fouls Drawn by Jack Grealish vs Other Midfielders Tanaka Map

2020-21 EPL Fouls Made by Tomas Soucek vs Other Midfielders Tanaka Map

20. 2020-21 EPL Game State xG

2020-21 EPL Game State npxG/Shot and Shot/90 Tables

2020-21 EPL Game State npxG/90 Table

19. Nick Wan New Twitch Followers

Nick Wan New Follower Time series Lollipops

18. OptaJoe One-Word Summaries

OptaJoe One-Word Summaries Bubble Chart

17. 2020-21 NBA All-Star Break Net Rating Lollipop Chart

2020-21 NBA All-Star Break Net Rating Lollipop Chart

16. xGPhilosophy xEngagement

Brighton Engagement Over Expected Table

Brighton 2-3 Man U Actual vs. Predicted Favorites and Retweets Scatter Plot

Brighton 2-3 Man U Retweets SHAP Breakdown Bar Plot

Aggregate SHAP Bar Plot

15. 2020-21 Fantasy Football Plots

After regular season (week 12)

2020-21 Fantasy Football Standings Simulation Table

After week 7

2020-21 Fantasy Football Points For vs. Points Against Scatter Plot

14. Non-Negative Matrix Factorization Heat Maps for Soccer Player Tracking

Non-Negative Matrix Factorization Heat Maps for Soccer Player Tracking

13. Premier League Official Radar Charts

Anthony Taylor Radar Chart

Mike Dean Radar Chart

12. Comparison of Pitch Control Models

Comparison of Pitch Control Models

Python and R Comparison of Spearman (2017) Pitch Control Model

10. Soccer Formation Pitch Ownership

Voronoi tessellation of a 4-3-3 False 9 vs. 5-4-1 Diamond Formation

9. 2020 Champions League Finals, Bayern Munich's Goal

PSG 0-1 Bayern Munich, UCL 2020 Finals, Animated Pitch Control and VAEP

8. 2020 NBA Playoffs Total Excitement Index

At the end of the playoffs

2020 NBA Playoffs Total Excitement Index Bar Chart Race

As of 2020-09-06

2020 NBA Playoffs Total Excitement Index Bar Chart

7. 2020 Champions League Quarter-Finals, PSG's 2nd Goal

Note: This gif really should have had some smoothing applied. The matrix inversion with solve() in the code returns some near infinite values for some inputs.

PSG 2-1 Atalanta, UCL 2020 Quarter-Finals, Animated Pitch Control

6. Texas High School Football and Marching Band Success

Texas High School Football vs. Band Scatter Plot

5. NBA 3P% Stability Rate

NBA 3P% Cumulative Average and Stability Rate Line Charts Animated

4. 2020 Soccer Competition-Adjusted Non-Penalty Goals Per 90 Minutes

Competition-Adjusted Non-Penalty Goals Per 90 Minutes Table

Competition-Adjusted Non-Penalty Goals Per 90 Minutes Dumbbell Chart

3. 2020 NBA Restart Social Justice Messages

2020 NBA Restart Social Justice Message Bar Chart

2. 2019-20 English Premier League First 30 Games

2019-20 English Premier League First 30 Games Points Minus Expected Points Lollipop Chart

English Premier League 2019-20 First 30 Games Points vs. Expected Points Scatter Plot

English Premier League 2019-20 Last 9 Games Simulated Points vs. Actual Points Ridge Plot

1. 2020 NBA Western Conference League Restart Playoff Seeding Probabilities

2020 NBA Western Conference League Restart Playoff Seeding Probabilities Bar Chart

Future Ideas

  • Visualize difference between proportion of the EPL season in which a team is in the top 4 of the league with matchweeks vs. actual time.

  • In which sport is the leading team most likely to further their lead near the end of the game due to an opposition error, overly-aggressive tactics by the opposition, etc.? (End of game depends on the sport. Ideally, we could use a win probability model to help identify end-of-game context, although it would still need some adjustment.) Extension: In which sport are gamblers most likely to lose/win due to a back-door cover?

  • Decision tree to filter down players in a sport to just one player who has achieved a very specific set of career totals/averages (i.e. inspiration)

  • Playing time in career at current team sonar (inspiration)

  • Which positions is it ok to have a weak spot at? (inspiration)

  • Do coaches sub-off players with yellow cards at a higher rate than they would otherwise?

About

#rstats code and plots for viz I put on the bird app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages