Message Boards Message Boards

2018 FIFA World Cup Football / Soccer Simulation

Attachments:
11 Replies
Posted 6 years ago

Very interesting. The top 16 teams with better prob to make the second phase were almost the same that actually advanced. The only issue I see is using the FIFA ranking as it is not a very good way of actually ranking the teams. Great job.

POSTED BY: Anne Summers

Germany, Brazil and Portugal lost. In the forecast these teams occupy the first three places. The analysis is done correctly, but the result is erroneous.

Posted 6 years ago

From what I can see most of the analysis so far is taken from "static" data, ranking, host nation advantage, size of midfielder etc.. the cup is an evolving competition where highs from a previous game can soon turn to lows e.g. germany/sweden high followed by germany/south korea low or where injuries incurred in previous games can affect whether key players can play in subsequent knockout matches e.g. Uruguay's Cavani, and therefore negatively influence the result, or whether yellow cards given in previous matches can have a similar affect on subsequent matches. I can imagine that if on-going "live" data was fed into the computation we would end up with an evermore plausible winner :-) As seen by Apps like "Tor alarm" (german for goal alarm) live data such as: team makeup, substitutions, when the game starts/ends, yellow cards, goals and by whom is available online.

POSTED BY: Kieran Ryan
Posted 6 years ago

Hi All, Great to see interest in the world cup. I have two notebooks about the world cup. One is the history of the world cup displayed on a world map. The other is the results, calendar, stats and other interesting facets of the current world cup, also displayed on the world map. I think it is very compelling because so much info is available on one screen. I would love to share them but trying to do so using Wolfram Cloud seems to be a complete disaster. They wont even load and when they do, the controls are all out of whack. I'm just a hobbyist. If one of you has some time to look at the code to see if there is any hope of sharing it on the cloud, I would be delighted for your assistance. Here is my direct email in case you want to contact me directly. A link to the code and the code itself follow below. markstevenlawton@gmail.com

here is the code: https://drive.google.com/file/d/1r7AGWaUYd7j3xT0St7p5VUxrQd-LBPzE/view?usp=sharing

Attachments:
POSTED BY: Mark Lawton

Germany lost, who is the next champion?

Great post @Francisco thank you for sharing! Perhaps we can get a more accurate prediction if we include info about each player. Fifa provides some nice info about the 700+ players that will participate in the World Cup https://www.fifa.com/worldcup/players/ . So I created the following dataset (see it attached):

datasetWC18 = Import["WC18PlayersDataset.m"]

enter image description here

Age of the players might be a relevant feature. But the most relevant info is still missing .... players market value and achievements within their clubs (there are several places where this info is available, but I haven't had time to include it).

Anyway let's do some nice visualization with this players dataset as a start. For example I was curious about the correlation between "Height" / "Weight" and their "Field Position". The results are the following (Note that I'm using ListPointPlot3D to associate a 3rd dimension to players indicating their "Field Position") :

fieldPositions = {"GK", "DF", "MF", "FW"};

ListPointPlot3D[
    Table[
            Map[Append[#, "PositionN" -> i] &, 
                    datasetWC18[Select[#Position == fieldPositions[[i]] &], {"Height", "Weight"}]
                    ]
      , {i, 4}],
 ImageSize -> 800,
 PlotStyle -> PointSize[0.012],
 PlotLegends -> SwatchLegend@{Style["Goalkeepers", 18], Style["Defenders", 18],   Style["Midfielders", 18], Style["Forwards", 18]},
 AxesLabel -> {Style["cm", 18, Bold], Style["kg", 18, Bold]},
 PlotLabel -> Style["Players height vs weight", 20, Bold]]

enter image description here

As expected the Goalkeepers on average are the tallest and heaviest. What I wasn't expecting was that on average the Midfielders are the smallest. Perhaps it is because Midfielders best asset is their strategic mind to orchestrate the game from the middle with clever ball passes.

Projecting the flags of World Cup countries

Borrowing Francisco's code for countries entities one can easily get all their flags, except the one from England which is missing (so, I added it manually):

countries = {Entity["Country", "Russia"], 
   Entity["Country", "SaudiArabia"], Entity["Country", "Egypt"], 
   Entity["Country", "Uruguay"], Entity["Country", "Portugal"], 
   Entity["Country", "Spain"], Entity["Country", "Morocco"], 
   Entity["Country", "Iran"], Entity["Country", "France"], 
   Entity["Country", "Australia"], Entity["Country", "Peru"], 
   Entity["Country", "Denmark"], Entity["Country", "Argentina"], 
   Entity["Country", "Iceland"], Entity["Country", "Croatia"], 
   Entity["Country", "Nigeria"], Entity["Country", "Brazil"], 
   Entity["Country", "Switzerland"], Entity["Country", "CostaRica"], 
   Entity["Country", "Serbia"], Entity["Country", "Germany"], 
   Entity["Country", "Mexico"], Entity["Country", "Sweden"], 
   Entity["Country", "SouthKorea"], Entity["Country", "Belgium"], 
   Entity["Country", "Panama"], Entity["Country", "Tunisia"], 
   Entity["AdministrativeDivision", {"England", "UnitedKingdom"}], 
   Entity["Country", "Poland"], Entity["Country", "Senegal"], 
   Entity["Country", "Colombia"], Entity["Country", "Japan"]};

flags = EntityValue[countries, "Flag"];

enter image description here

flagsAll = (flags /. {x_Missing -> englandFlag})

enter image description here

Finally with GeoGraphics we can create an interactive map using Tooltip as follows:

GeoGraphics[
{EdgeForm[ Directive[Thin, Black]],
{GeoStyling[{"Image", #2}], Tooltip[Polygon[#1], CommonName[#1]]} & @@@ Transpose[{countries, flagsAll}]}, 
Background -> "CountryBorders", 
GeoProjection -> "Robinson", ImageSize -> 1200, 
PlotLabel ->  Style["Countries in the 2018 FIFA World Cup Russia", 24]]

enter image description here

Population of countries in the 2018 FIFA World Cup

In my opinion two other interesting features to look for in the participating countries are their Population and GDP. Which can be easily obtained using EntityValue :

valsPopulation = EntityValue[countries, "Population"];
GeoRegionValuePlot[Thread[countries -> valsPopulation], 
 GeoBackground -> "CountryBorders", GeoProjection -> "Robinson", 
 ImageSize -> 1200, PlotLabel ->  Style["Population of countries in the 2018 FIFA World Cup Russia",  24]]

enter image description here

GDP of countries in the 2018 FIFA World Cup

valsGDP = EntityValue[countries, "GDP"];

GeoRegionValuePlot[Thread[countries -> valsGDP], 
 GeoBackground -> "CountryBorders", GeoProjection -> "Robinson", 
 ImageSize -> 1200, PlotLabel -> Style["GDP of countries in the 2018 FIFA World Cup Russia", 24]]

enter image description here

Attachments:

Yes, we can do a whole set of comparisons for the countries playing the world cup.

About the players data, very nice data, but anyway it is always different how they play in their national selections than in their regular teams. And no match is decided until it is played!

Anyway I wonder if we could also classify the teams by how well they fit into that model of player features by position. Is a team with all its players closer to the avg of that plot a better team? That kind of questions could be interesting to compute.

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming!

POSTED BY: Moderation Team

This is great! @Francisco thank you for sharing! I wonder how your predictions compare to this recent article:

Prediction of the FIFA World Cup 2018 – A random forest approach with an emphasis on estimated team ability parameters https://arxiv.org/abs/1806.03208

which was also covered in MIT Technology Review blog: Machine learning predicts World Cup winner. There basic result is the following tree of wins:

enter image description here

POSTED BY: Vitaliy Kaurov

Very interesting link, and nice way to display the final output, I wonder if with the output of my functions we could generate also a complete set of the most possible fixture of matches.

During the past World Cup a close analysis was done by @Etienne Bernard with very neat machine learning techniques:

The similar visualization was:

enter image description here

enter image description here

POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract