Tony ElHabr's Avatar

Tony ElHabr

@tonyelhabr.bsky.social

data person, mostly #rstats and ⚽️

2,030 Followers  |  286 Following  |  26 Posts  |  Joined: 03.07.2023  |  1.8596

Latest posts by tonyelhabr.bsky.social on Bluesky

That's it, folks, #VizBuzz has come to an end and we've crowned @tonyelhabr.bsky.social champion 👑👑👑

The finals was FILLED with ties, which give me life, including a tie for second between @johnbedwards.io and the mighty @qntkhvn.bsky.social

It's the end of VizBuzz, but it lives in our ❤️
#databs

27.06.2025 02:55 — 👍 20    🔁 5    💬 2    📌 0

i feel like this points to a selection bias that pre-shot xG may not capture. players who are good with their weak foot are more likely to take more shots with it and balance out goals with misses, and those who are poor with their weak foot will only take shots with it in very favorable positions

31.01.2025 16:34 — 👍 6    🔁 0    💬 2    📌 0
Preview
Tony’s Blog - Meta-Analytics for Soccer To what extent does a state differentiate between players? How much does the stat’s value change over time?

🔗 tonyelhabr.rbind.io/posts/soccer...

30.01.2025 14:59 — 👍 4    🔁 0    💬 1    📌 0
30.01.2025 14:59 — 👍 10    🔁 0    💬 2    📌 0

An annual must read. Happy to see my own writing linked here.

30.12.2024 15:47 — 👍 16    🔁 1    💬 0    📌 0
Post image

memes in 2014 vs. 2024

06.12.2024 15:40 — 👍 7    🔁 0    💬 0    📌 0
Post image

xGD is live from Opta here (including the ongoing matches)

30.11.2024 16:48 — 👍 0    🔁 0    💬 0    📌 0
Comet / dumbbell plot showing the counterfactual standings for the English Premier League in the 2024/25 season if the result of every 1-score match was flipped, through 2024-11-29. Tottenham is at the top, Ipswich is at the bottom.

Comet / dumbbell plot showing the counterfactual standings for the English Premier League in the 2024/25 season if the result of every 1-score match was flipped, through 2024-11-29. Tottenham is at the top, Ipswich is at the bottom.

Fun hypothetical: How would the EPL table look right now if the result of every 1-score match was flipped?

Biggest risers:
1. Wolves: +9 pts, 17th -> 5th
2. Crystal Palace: +9 pts, 19th -> 8th

Biggest fallers:
1. Brighton: -12 pts, 2nd -> 18th
2. Aston Villa: -9 pts, 8th -> 19th

#rstats

30.11.2024 14:43 — 👍 24    🔁 5    💬 5    📌 1
Post image 29.11.2024 01:21 — 👍 6    🔁 0    💬 1    📌 0
Post image

Game state xGD table of truth for the MLS 2024 playoff teams

23.11.2024 15:42 — 👍 40    🔁 4    💬 4    📌 4

❤️ the references to public studies on finishing

10.11.2024 16:05 — 👍 4    🔁 1    💬 1    📌 0
Post image

the great bsky migration may be enough to get me to blog again

31.10.2024 18:41 — 👍 14    🔁 0    💬 3    📌 0
An 8x12 heatmap showing the average possession value (PV) of historically incomplete passes from the center spot (annotated in blue) to all areas of the pitch. The relative frequency of unsuccessful passes from the center spot to each other cell is shown as a percentage. The exact PV value associated with an incomplete pass ending at the hover point can be viewed above the pitch. Black cells represent areas to which unsuccessful passes from the center spot have never been made.

An 8x12 heatmap showing the average possession value (PV) of historically incomplete passes from the center spot (annotated in blue) to all areas of the pitch. The relative frequency of unsuccessful passes from the center spot to each other cell is shown as a percentage. The exact PV value associated with an incomplete pass ending at the hover point can be viewed above the pitch. Black cells represent areas to which unsuccessful passes from the center spot have never been made.

An 8x12 heatmap (gif) showing the average possession value (PV) of historically incomplete pass from the hover spot to all areas on the pitch. The relative frequency of successful passes from the center spot to each other cell is shown as a percentage. The heatmap updates as the user moves their mouse over cells on the heatmap.

An 8x12 heatmap (gif) showing the average possession value (PV) of historically incomplete pass from the hover spot to all areas on the pitch. The relative frequency of successful passes from the center spot to each other cell is shown as a percentage. The heatmap updates as the user moves their mouse over cells on the heatmap.

Finally got around to trying out Observable JS in depth. It's really nifty! I used it to make some sick ⚽ plots in this post: tonyelhabr.rbind.io/posts/ball-p...

#rstats

21.04.2024 13:33 — 👍 3    🔁 0    💬 0    📌 1
Post image

where is my GitHub achievement badge 😈

05.02.2024 14:05 — 👍 2    🔁 0    💬 0    📌 0
Post image

i'm about to have a bad time, aren't i

04.02.2024 13:58 — 👍 4    🔁 0    💬 1    📌 0

the synthetic data thing was really interesting. that might generally be a better framework for handling selection bias, particularly for Bayesian analysis. but i tend to dislike synthetic data generation + down/up-sampling, and i don't see how it would be better for models that take case weights 🤷

30.12.2023 19:03 — 👍 1    🔁 0    💬 0    📌 0

Hmm I think that makes sense. I hadn’t really thought of it like that.

Any thought on whether case weighting the training set might help?

30.12.2023 18:15 — 👍 0    🔁 0    💬 1    📌 0
Post image Post image

Yep, I’d say that’s right (at least the shot volume part). Lars Maurath identified that relationship in his post

30.12.2023 18:13 — 👍 1    🔁 0    💬 0    📌 0
Preview
Tony’s Blog - Should we account for team quality in an xG model? Finnicking around (with an xG model) and finding out

Should we account for team quality (Elo) in xG models? While I'm against this in principle, I tried it out.✍️⚽

Featuring #rstats, tidymodels, SHAP values, and calibration curves.

🔗: tonyelhabr.rbind.io/posts/xg-tea...

30.12.2023 16:34 — 👍 5    🔁 3    💬 1    📌 0

ordering an americano at a starbucks in a mall in europe is the most patriotic i’ve ever been

13.11.2023 12:59 — 👍 1    🔁 0    💬 0    📌 0
Post image

✍️ New blog post

A guide to identifying whether a team is "parking the bus 🚌" when they have a lead. I show that game state stats can be pesky to calculate, but they can lead to novel insights. ⚽

#rstats

tonyelhabr.rbind.io/posts/fbref-...

26.10.2023 00:18 — 👍 4    🔁 0    💬 0    📌 0
Post image

nice me too

28.09.2023 20:40 — 👍 1    🔁 0    💬 1    📌 0
calibration curves showing uncalibrated and calibrated match win probabilities of women's soccer matches. data source: FiveThirtyEight

calibration curves showing uncalibrated and calibrated match win probabilities of women's soccer matches. data source: FiveThirtyEight

✍️new blog post on using the tidymodels probably package to calibrate model predictions. #rstats

tonyelhabr.rbind.io/posts/probab...

13.09.2023 12:27 — 👍 10    🔁 1    💬 0    📌 0
Tony’s Blog - Meta-Analytics for Soccer To what extent does a state differentiate between players? How much does the stat's value change over time?

✍️New blog post on "meta-metrics" in soccer, replicating part of a 2017 JQAS article from Franks, D’Amour, Cervone and Bornn.

⚖️Does a metric reliably differentiate between players?
📈Does a metric measure a quantity that is stable over time?

tonyelhabr.rbind.io/posts/soccer...

#rstats

09.09.2023 14:24 — 👍 2    🔁 0    💬 0    📌 0

"it's giving 2015" he said as he opened a script starting with `library(plyr)`

30.08.2023 21:18 — 👍 2    🔁 0    💬 0    📌 0

For the latest entry in our Replication Series,
@tonyelhabr.bsky.social takes a look at EightyFivePoint's seminal "Exceeding Expected Goals" to revisit the age-old question of "finishing" in soccer.
www.americansocceranalysis.com/home/2023/8/...

28.08.2023 21:13 — 👍 2    🔁 3    💬 0    📌 0
Laurie Shaw's figure from http://eightyfivepoints.blogspot.com/2018/09/exceeding-expected-goals.html, showing top shooting overperformers from the 2016/17 and 2017/18 English Premier League seasons, according to their ratio of goals to expected goals

Laurie Shaw's figure from http://eightyfivepoints.blogspot.com/2018/09/exceeding-expected-goals.html, showing top shooting overperformers from the 2016/17 and 2017/18 English Premier League seasons, according to their ratio of goals to expected goals

my replication of Shaw's figure

my replication of Shaw's figure

new blog post from yours truly: replicating a soccer analysis from 5 years ago, featuring Gamma-Poisson empirical Bayes estimation 🤓🤠

#rstats
tonyelhabr.rbind.io/posts/xg-rat...

28.08.2023 14:11 — 👍 5    🔁 1    💬 0    📌 0
barbenheimer meme with "dayta" science on barbie side and "dahta" science on oppenheimer side

barbenheimer meme with "dayta" science on barbie side and "dahta" science on oppenheimer side

real ones say "dahta"

25.07.2023 17:06 — 👍 6    🔁 0    💬 3    📌 0

@tonyelhabr is following 20 prominent accounts