If you followed the FIFA World Cup this year, you may have noticed many people posting online about "VARgentina", "Princess Messi", or other posts like the one pictured to the right.
In reality, it is not too dissimilar to Wide Recievers in American Football putting on a display to nearby refs of the defense being guilty of pass interference. However, one can't help but smile a little at the absurdity of some flops in Soccer. Thinking of all this lead me to question,
Pictured above is the Presdient of FIFA, Gianni Infantino, smiling seemingly due to Spain winning late in their semi-final game against France.
FIFA outlines a formula that uses red and yellow cards earned to calculate how dirty a team was playing. More cards given to a team signifies more fouls and a rougher more physical strategy. In our case, we'd like to determine whether or not Argentina (or any teams for that matter) were awarded less cards than their opponents. A lower score means less fair play, so the closer the score is to 0, the cleaner the team played. Shown below are the counts for the FIFA fairness score:
2nd Yellow Card (Indirect Red): -3
Red Card: -4
Red Card (Following a Yellow): -5
By utilizing a quick google search for datasets on Kaggle and Github, I found the following dataset . It included all the necessary data and I began working on it in R and connecting the necessary tables using the package sqldf which allows joining data frames in R with familiar join language, treating specified R code as No-SQL Code. After joining necessary tables to combine player stats with match events (for card counts) and team data, I began adding up the card totals to to verify that I had everything. However, I quickly discovered that the data was incomplete. For the entire tournament, there were only 76 yellow cards given according to the dataset I had found. A quick google search revealed that this number was significantly wrong. So I went back to the drawing (data) board.
After the data set from mominullptr failed me, I found the website FBREF.com with an extremely comprehensive and in depth log for all major Football games. The best part was, the miscellaneous match data was even sorted by individual teams and opponents they had played, meaning I didn't have to unpivot home and away teams into separate rows making for a much cleaner coding experience. You can see to the right of here that they also had a neat option to choose only the applicable data for your needs meaning I simply chose to keep final placing and cards received (and given to opposing teams).
Yes and No. Mexico indeed has an absolutely staggering amount of penalties in their favor, so much so it falls out of explainable statistical probability or random chance. Spain is even more curious seeing as they won the 2026 FIFA world cup. Harkening back to the Twitter post, one might make the claim that Spain being heavily favored by referees is a contributing factor to their wins. However, there is one last factor we haven't considered. Referees are not only monitoring one team per game, they award fouls to both sides. For example, Argentina ranks 5th for most cards given to their opponents, but ranks 8th for cards received. If a team plays aggressive, one could expect that aggression to be met on the other side of the field. Playing with fire gets you burnt. So, what do we find if we take the difference between Teams own Fair Play scores and their Opponents?