Between some of the games I had a go at replicating a plot from liberation.fr on the connections between Euro 2016 players and the country of birth using the
circlize package in R. As with the previous post, the colours are based on the home shirt of each team and data scraped from Wikipedia. The values in the parenthesis represent the total number of players born in the respective country, which dictates their ordering around the circle. It is interesting to see just how many players represent countries that they were not born in. Only Romania has a 23 man squad completely full of players born in the country and no other Romanian born players representing other nations.
Continue reading “Euro 2016 Squads Part Deux”
This weekend I was having fun in France watching some Euro 2016 matches, visiting friends and avoiding Russian hooligans. Before my flight over I scraped some tables on the tournaments Wikipedia page with my newly acquired
rvest skills, with the idea to build up a bilateral database of Euro 2016 squads and their players clubs.
On the flight I managed to come up with some maps showing these connections. First off I used
ggplot2 to plot lines connecting the location of every players club teams to their national squads base in France. The path of the lines were calculated using the
gcIntermediate function in the
geosphere package. The lines colour is based on the national teams jersey, which I obtained via R using the amazing
extract_colours function in the
rPlotter package. Continue reading “Euro 2016 Squads”
I have been having a go in R at visualising player movements for the World Cup. I wanted to use similar plots to those used to visualise international migration flows in the recent Science paper that I co-authored. In the end I came up with two plots. The first, and more complex one, is based on a non-square matrix of leagues system of players clubs by their national team.
You can zoom in and out if you click on the image.
Colours are based on the shirt of each team in the 2014 World Cup. Lines represent the connections between the country in which players play their club football (at the lines base) and their national teams (at the arrow head). Line thickness represent number of players. It’s a little cluttered, but shows nicely how many players in the English, Italian, Spanish and French leagues are involved in the world cup. It also highlights well some countries where almost all the players are at clubs abroad, for example most of the players in the African squads.
Whilst the first plot gave a lot of detail, I wanted to visualise the broader interactions, so I aggregated over leagues systems and national squads by regional confederations. This gives a square matrix:
league AFC CONCACAF CONMEBOL CAF UEFA
AFC 49 2 1 3 1
CONCACAF 0 13 0 0 0
CONMEBOL 2 0 54 11 0
CAF 0 0 0 36 0
UEFA 41 99 37 86 296
The plot of which looks like:
This type of aggregation works really well to show how few European national players play elsewhere (only Zvjezdan Misimovic in all the European World Cup squads). It also provides a way to compare the share of non-European players plying their trade in the European leagues to those in more local leagues within their confederation.
I scraped the data from the provisional squads on Wikipedia, and then created the images with the circlize package. All the code to reproduce the plots + scraping the Wikipedia squad pages are on the my github.
Wow. Completely forgot about this, found the old spreadsheet shifting through my Google Drive this morning. Looks like Dave won by the narrowest of margins, fending of James, Rich and Amos were inseparable… and Bernie had a shocker, cricky mate! Seems like the centre of predictive power still lies in the Murry Building. Most defiantly going do a big World Cup comp. Spread the word. Love. Guy.
Adapted the spreadsheet to enable easy daily updates to the result tab! Good to see Tom at the bottom after last time round. Spreadsheet link here.
Season over. Results are in the table below. Congrats to Amos, the clear winner, who predicted the correct order of the Premiership 1-4. Amazing. Commiserations to Bernie.
At the top of the table are the weights given to each prediction category.
Lowest score wins, where:
*Scores for league places is calculated by multiplying the weight by the difference in the final and predicted finishing places.
*Scores for cup competitions is calculated by multiplying the weight by the number of wins away the chosen team was from winning the cup.
*Scores for Golden Boots are calculated by multiplying the weight by the number of goals the chosen player is away from the top scorers tally.
The world cup is over, and I have updated prediction table (see final version below). Well done to Tom who correctly predicted the final. Hard luck to Dave C. who would have won if Tom was 1) patriotic (and actually supported England) and 2) did not make his golden boot prediction a week into the tournament. However, given that these predictions are based on a FIFA tournament, its logical that no action is taken against those who do not play by the rules correctly. Congratulations Tom.
Lowest points total wins. Points calculated from each category as such:
Winner: 10 x No of wins away from predicted team becoming champions.
Runner: Up 7 x No of wins/losses away from predicted team becoming runner up.
Semi Final: 3 x No of wins/losses away from predicted teams loosing in Semi Finals.
Quarter Final: 1 x No of wins/losses away from predicted teams loosing in Quarter Finals.
Own Team: 7 x No of wins/losses away from own teams predicated finish.
Golden Boot: 5 x No of goals your chosen player is away from the top scorers tally.
Fair Play: -5 If you correctly predict the fair play team.
Tie breaks decided by own team predictions, then alphabetical order.