sports_viz
sports_viz copied to clipboard
#rstats code and plots for viz I put on the bird app
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
78. xG Model with Team Quality Features
77. 2023/24 EPL xGD by Game State
77. 2023/24 EPL xGD by Game State
76. 2023 (Personal) Fantasy Football League Luck
75. Soccer Meta-Analytics
74. 2023 Women's World Cup xG Calibration
73. "Exceeding Expected Goals" Replication
72. 2023 Women's World Cup
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
47. Pass Network Max Cut
46. EPL "Rage" Fouls
- 2021/22 Fantasy Football Luck
44. MLS Golazos
43. xG Signal
42. 2021-22 Premier League New Players
41. #USMNT popularity growth drivers
40. Significant xG Overperformance
38. Football #viz Twitter
37. CONCACAF'd
36. 2020-21 EPL Team Subreddit Activity
35. Tired: PCA + kmeans, Wired: UMAP + GMM

34. 2020 EUROs Forecast Review
33. Relative League Power Rankings
32. 2020 EUROs
30. EPL Subjective VAR calls
29. 2020-21 EPL Games Started by Young Players
28. 2020-21 EPL Season Review with VAEP

27. Pep Guardiola Non-UCL Titles
25. Soccer Referee Activity Across Major Leagues
24. 2020-21 EPL Team Relative Fouling Rate by Game State
23. European Super League Google Trends
22. 2020-21 Chelsea Attack Under Tuchel Compared to Lampard
21. 2020-21 EPL Foul Tanaka Maps
20. 2020-21 EPL Game State xG
19. Nick Wan New Twitch Followers
18. OptaJoe One-Word Summaries
17. 2020-21 NBA All-Star Break Net Rating Lollipop Chart
16. xGPhilosophy xEngagement
15. 2020-21 Fantasy Football Plots
After regular season (week 12)
After week 7
14. Non-Negative Matrix Factorization Heat Maps for Soccer Player Tracking
13. Premier League Official Radar Charts
12. Comparison of Pitch Control Models
11. Python and R Comparison of Spearman (2017) Pitch Control Model
10. Soccer Formation Pitch Ownership
9. 2020 Champions League Finals, Bayern Munich's Goal
8. 2020 NBA Playoffs Total Excitement Index
At the end of the playoffs
As of 2020-09-06
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.
6. Texas High School Football and Marching Band Success
5. NBA 3P% Stability Rate
4. 2020 Soccer Competition-Adjusted Non-Penalty Goals Per 90 Minutes
3. 2020 NBA Restart Social Justice Messages
2. 2019-20 English Premier League First 30 Games
2019-20 English Premier League First 30 Games Points Minus Expected Points Lollipop Chart
1. 2020 NBA Western Conference League Restart Playoff Seeding Probabilities
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?