Blog of Random Thoughts and Pictures

LOI Matchday 5 Predictions

April 15th, 2021

Match day 5, starts with a review of match day 4 results, and I got 2 out of 6 games right, St. Pats are on a roll and won their game, and I got luck for once and got to recall the Derry vs Shamrock Rovers  result in favour of Rovers. For the season so far I’m 4 for 20 at the moment.

I’m going to add a little to the match day 5 predictions and have a little look at xG for the teams too.

So first up here’s what the system software spat out for Waterford vs Bohemians

Waterford (43%) vs Bohemians (29%)
The Probability of a Draw between Waterford and Bohemians is 28%

So the system is going for a Waterford win, but in another part were I simulate the matches I get

The number of sim home wins for Waterford is = 3
The number of sim away wins for Bohemians is = 6
The number of sim draw is = 1

So a Bohemians win.

There are stats for LOI with SoccerStats, and SportsMole being two good examples but for now I’ll just look to expected goals (xG) and that’s best viewed via FootyStats and for this match we have Waterford (0.17 xG) vs Bohemians (0.68 xG) so lets go for a Bohemians win.

For the next match the system has

Derry City (57%) vs Drogheda (19%)
The Probability of a Draw between Derry City and Drogheda is 22%

And in the sim games

The number of sim home wins for Derry City is = 5
The number of sim away wins for Drogheda is = 2
The number of sim draw is = 3

And xG is Derry City (0.71 xG) vs Drogheda (0.56 xG).

Everything is pointing towards a Derry first win of the season …… but Drogheda have started so well. Will have to go with the system answer and call a Derry win on this one.

The next match

Dundalk (56%) vs St. Patricks (19%)
The Probability of a Draw between Dundalk and St. Patricks is 24%

The number of sim home wins for Dundalk is = 6
The number of sim away wins for St. Patricks is = 1
The number of sim draw is = 3

Dundalk (1.35 xG) vs St. Patricks (N/A)

So everything is pointing to a Dundalk win, a first for the season here too …. predicted anyway.

The next match is

Shamrock Rovers (73%) vs Longford (8%)
The Probability of a Draw between Shamrock Rovers and Longford is 16%

The number of sim home wins for Shamrock Rovers is = 8
The number of sim away wins for Longford is = 1
The number of sim draw is = 1

Shamrock Rovers (0.76 xG) vs Longford (0.45 xG)

Calling a Shamrock Rovers win here.

And finally for match day 5 we’ll take

Sligo Rovers (60%) vs Finn Harps (15%)
The Probability of a Draw between Sligo Rovers and Finn Harps is 24%

The number of sim home wins for Sligo Rovers is = 5
The number of sim away wins for Finn Harps is = 3
The number of sim draw is = 2

And the xG Sligo Rovers (0.52 xG) vs Finn Harps (1.2 xG)

Now in this case the xG is in favour of Finn Harps, they are flying I’m going to buck the trend and go for a Finn Harps win.

Player Ranking Framework

April 11th, 2021

As mentioned in Part I of this multipart post, Luca Pappalardo prepared a video, for the Friends of Tracking channel in 2020, to talk about some elements of a paper related to an open Wyscout data set, and advanced statistics related to passing networks, flow centrality and player ranking.

For this post (Part IV) I’m going to cover my take on the PlayeRank framework created by this team of researchers.

I’ve forked the “mapping-match-events-in-Python” repo into my mmoffoot area and created a new branch called ‘englanddata’ to cover the data set of English Premier League information for the 2017-18 season.

An exhaustive description of the PlayeRank framework is available in this paper Pappalardo, Luca, Cintia, Paolo, Ferragina, Paolo, Massucco, Emanuele, Pedreschi, Dino & Giannotti, Fosca (2019) PlayeRank: Data-driven Performance Evaluation and Player Ranking in Soccer via a Machine Learning Approach. ACM Transactions on Intelligent Systems and Technologies 10(5).

This Notebook builds player rankings from match events, the following steps are required:

  • compute feature weights (learning)
  • compute roles (learning)
  • compute performance scores (rating)
  • aggregate performance scores (ranking)

It doesn’t take long to run through the [In] steps of the Notebook and for the English data you end up with Figure 1 as seen below.

Figure 1: Player Ranking English Premier League 2017-2018

The visual output from the Notebook is interactive which is great as you can hover over the points to catch the name. For example in the striker role H. Kane is the outlier (at the top), S. Augero second. There’s even a drop down menu to do a comparison.

Figure 2: Player Ranking Comparison for H. Kane and S. Augero English Premier League 2017-2018

The positions are an interesting element to this ranking systems which is based on a role matrix.

Team Attacking left to right, position 0 is a Striker

And the top players from English Premier League 2017-2018 for each role position

  • Position 0. = H. Kane
  • Position 1. = L. Milivojevic
  • Position 2. = N. Monreal
  • Position 3. = D. Janmaat
  • Position 4. = S. Mane
  • Position 5. = M. Salah
  • Position 6. = N. Otamendi
  • Position 7. = J. Stephens

If I look at the PFA Premier League Team of the Year for 2017-18, Otamendi, Kane and Salah were named in it and also appear here in PlayeRank, but none of the rest. I wonder how D. Silva and K. De Bruyne both of whom are in the PFA team, missed out in this PlayeRank framework.

Overall over 4 posts I can say this is a great Jupyter Notebook, firstly to really learn about Jupyter Notebooks, and secondly to be able to see the structure and how to use WyScout data. It is so important given this data set is used by so many tops clubs for the scouting, analyses and recruitment of players.

I got caught a little on the passing networks, and the flow centrality but certainly a thread of more investigation on a measure of cohesiveness within the team, would be a nice continuation of this topic.

The player ranking and the full explanation of the PlayeRank Framework was fantastic and a joy to read and interact with.

LOI Matchday 4 Predictions

April 8th, 2021

As I go into match day 4, a review of match day 3 reveals that I got, or should I start to say the system got, 1 result correct that was the Sligo Rovers win. While I hedged against them at the weekend it was good to see Waterford FC pick up their first points of the season.

The running tally so far after 14 games is 2 correct predictions, a 14% hit rate so far ….. terrible. Top of a local prediction league is 8 out of 14 so a bit to go there to catch up.

For match day 4 here are the predictions

St. Patricks (47%) vs Derry City (26%)
The Probability of a Draw between St. Patricks and Derry City is 26%

So calling a St. Pats win

Dundalk (62%) vs Bohemians (15%)
The Probability of a Draw between Dundalk and Bohemians is 22%

Dundalk have had a shaky start to the season, but will go for the Dundalk win.

Finn Harps (24%) vs Waterford (49%)
The Probability of a Draw between Finn Harps and Waterford is 27%

Finn Harps are flying it but the system is saying a Waterford win, so will go for the Waterford to win scenario and make up for last week.

Longford (36%) vs Drogheda (38%)
The Probability of a Draw between Longford and Drogheda is 25%

This is very close looks like it could be a draw.

Sligo Rovers (28%) vs Shamrock Rovers (43%)
The Probability of a Draw between Sligo Rovers and Shamrock Rovers is 29%

Dare I say a clash at the top of the table, and will go for a Rovers win …… Shamrock Rovers.

There’s an extra game this week

Derry City (29%) vs Shamrock Rovers (43%)
The Probability of a Draw between Derry City and Shamrock Rovers is 28%

And looks to be another Shamrock Rovers win to really put them top of the table. Now in truth I called this already as a draw a week or so back, but I’m going for Rovers win now.

LOI Matchday 3 Predictions

April 1st, 2021

Before going into Match day 3 what was predicted from Match day 2, and it was 1 out of 4 matches, the St. Patricks win over Drogheda was the one and only predication right this season and nothing else, although Bohs were 2-0 up in their match at one stage.

Anyway here’s Match day 3 predictions

Longford (23%) vs Sligo Rovers (51%)
Probability of a Draw between Longford and Sligo Rovers is 25%

So calling a Sligo Rovers win and drive towards the top of the table.

Shamrock Rovers (38%) vs Dundalk (34%)
The Probability of a Draw between Shamrock Rovers and Dundalk is 28%

Calling this clash of the giants to end in a draw.

Drogheda (50%) vs Finn Harps (24%)
The Probability of a draw between Drogheda and Finn Harps is 26%

Finn Harps have had a fine start to the season but it will come to a halt in Head in the Game Park I think, so calling a Drogheda win

Derry City (44%) vs Waterford (30%)
The Probability of a Draw between Derry City and Waterford is 26%

The first points of the season will be earned by Derry City

Bohemians (35%) vs St. Patricks (36%)
The Probability of a Draw between Bohemians and St. Patricks is 29%

In this one I’ll sit on the fence and go for a draw.

Advanced football visualisations duels on the pitch Italy compared to England

March 27th, 2021

As mentioned in Part I of this multipart post, Luca Pappalardo prepared a video, for the Friends of Tracking channel in 2020, to talk about some elements of a paper related to an open Wyscout data set, and advanced statistics related to passing networks, flow centrality and player ranking.

For this post (Part II) I’m going to cover my take on the match evolution and spatial stats.

I’ve forked the “mapping-match-events-in-Python” repo into my mmoffoot area and created a new branch called ‘englanddata’ to cover the data set of English Premier League information for the 2017-18 season.

Spatial distribution of events

There are tons of events collated in the WyScout API Events from duels to fouls to interruptions, as explained in the WyScout API document. For passes there are 6 types:

  • Pass = Hand pass,
  • Pass = Head pass,
  • Pass = High pass,
  • Pass = Launch,
  • Pass = Simple pass,
  • Pass = Smart pass,

In this Notebook there’s an interesting set of images created which show the distribution of positions per event type. These kernel density plots show the distribution of the events’ positions during the match with the darker the green representing the higher number of events in a specific zone of the field.

Figure 1: Move the slider to compare Italian Serie A Duels and English Premier League Duels 2017-18

The first image is of duels, and in the WyScout world “Duel” has a specific meaning,

A challenge between two players to gain control of the ball, progress with the ball or change its direction.

With a number of subtypes to consider too: Defensive duel, Offensive duel, Aerial duel, Loose ball duel, and Sliding tackle

For the moment I’m not going into the whys and wherefores of these subtypes, but it’s really interesting to review and compare the images and to see the difference of where the Italian league and the English league host their duels. Dare I say right-backs, left-backs and right wingers, left wingers should look closer if they are moving between the leagues.

A big summer move from England to Italy was Emre Can from Liverpool to Juventus, with Stephan Lichtsteiner coming in from Juventus to Arsenal maybe a view of these plots before the new 2018-19 season got underway might have been handy.

Of note there’s a 10,000 event sample size in here by default, so for the Italian & English league this represents about 6 matches worth of events, and so a larger sample size would be nice to see and compare against. Would also be nice to identify specific players (RB,LB and RW, LW) that were strong in those main duel locations, however that will have to be for another day.

Here are where the fouls happen.

Figure 2: Move slider to compare Italian Serie A Fouls and English Premier League Fouls 2017-18

And the shots.

Figure 3: Move the slide to compare Italian Serie A shots and English Premier League shots 2017-18

Intra-match evolution of the events

Goals are the main stay of football and so when looking at the English and Italian leagues (season 2017-18), its pleasing to see the difference between the leagues, especially the 1st half goals.

Yellow cards and red cards are covered in the data set too, and displayed in the Jupyter Notebook but I’ll be honest and say I didn’t take too much time to analyse the results here, because I was fascinated by the Duel plots.

LOI Matchday 2 Predictions

March 25th, 2021

Here’s another go at the match day predictions, using past match results

For match day 2 in the League of Ireland Premier division

Dundalk (76%) vs Finn Harps (6%)
Draw (13%)

Calling a Dundalk win here

Waterford (43%) vs Sligo Rovers (30%)
Draw (27%)

Calling a drawn match

Bohemians (62%) vs Longford Town (15%)
Draw (22%)

Calling a Bohemians win

St. Patricks (62%) vs Drogheda (15%)
Draw (21%)

Calling a St. Patricks win

Derry City (29%) vs Shamrock Rovers (43%)
Draw (28%)

Calling a drawn match here once it eventually gets played.

Advanced football visualisations and data analysis of match events

March 22nd, 2021

Luca Pappalardo an author of the paper (PCR2019) Pappalardo, L., Cintia, P., Rossi, A. et al. A public data set of spatio-temporal match events in soccer competitions. Nature Scientific Data 6, 236 (2019) prepared a video, for the Friends of Tracking channel in 2020, to talk about some elements of this paper and the related Wyscout data set, which was used for the paper.

In this video Luca covers:

  • The Wyscout data set, how it is collected, from players to events.
  • Basic statistics on events and distributions.
  • Plotting events on the field, match evolution and spatial stats.
  • Advanced statistics: passing networks, flow centrality and playerRank

For this blog post I’m going to cover my take on the player events in the Wyscout data set and the display of some basic statistics on events and distributions.

The origin of the code is available on Github under the project “mapping-match-events-in-Python” and worked through in this video.

Set up

Then I created a new branch called ‘englanddata’ in this area to cover the changes I made.

The example code base uses the Italian league data, but the branch name might be a give away, seeing as the data set has English Premier League information for the 2017-18 season I wanted to run the code base against that data set, and so I took a copy of the original Jupyter Notebook and ran it against the English data as data_england_exploration.ipynb.

The full list of data available includes:

  • Italian first division 2017-18
  • English first division 2017-18
  • Spanish first division 2017-18
  • French first division 2017-18
  • German first division 2017-18
  • European Championship 2017-18
  • World Cup 2018

All the matches, events, players, and competition data sets are hosted in a figshare repository with all the data stored in a JSON format.

The way the data is collected is explained in the paper, with a nice visual representation in the Notebook so I won’t ruin that insight and will let you read it in there.

I should say a quick word on Jupyter Notebooks, its an interactive way of developing and presenting data science projects, and I can really see that it’s an easy way to follow the code base for this project. It’s easy enough to install Jupyter Notebook on a machine too and well worth the install.

Plotting events on the field

There are a number of nice overviews of the structure of data given in the early part of the Notebook, but it’s more interesting when it comes to the static plots.

Figure 1: All Events Tottenham Hotspur 5 – 4 Leicester City, May 13, 2018.

Although of course too much detail can overwhelm and so the interactive plots in this Notebook are much better mechanism to share this information, as in you just have to hover the mouse over the event and its details come to the fore.

Figure 2: Pass Events Tottenham Hotspur – Leicester City, May 13, 2018.
 
Figure 3: Foul Events Tottenham Hotspur – Leicester City, May 13, 2018.
 
Figure 4: Fouls by a specific player Tottenham Hotspur – Leicester City, May 13, 2018.

This is a great Jupyter Notebook, firstly to really learn about Jupyter Notebooks, and then of course to be able to see the structure and how to use WyScout data. It is so important given this data set is used by so many tops clubs for the scouting, analyses and recruitment of players.

There’s more to come, as I plan to complete the match evolution, spatial stats in part II of this blog post and finally cover the advanced statistics: passing networks, flow centrality and playerRank in a part III of this blog post.

LOI Open day predictions not even close

March 21st, 2021

I laid it out there, with opening day predictions for the first set of fixtures for League of Ireland 2021, and not one, not even one came to pass.

By all accounts Drogheda were the better team in the Drogheda 1 vs 0 Waterford match.

I didn’t even come close in any of the other matches. Well I plan to use the same prediction model for the next 2 rounds, just to see if it’s a thing to have the league settle down, and also to evaluate what it is I’m missing from the prediction model.

Football opening day predictions for League of Ireland 2021

March 19th, 2021

The new season (2021) is just about to get underway for the League of Ireland and unfortunately I’m not quite ready with the full league table predictions, but I have got an early version of match prediction analysis software in place (details to follow at a later date) and so I’m going to take a quick look at my local team Waterford FC first and see what we have in store in this first league game against Drogheda United.

What a first match to pick, Waterford and Drogheda haven’t played against each other in the LOI Premier League since July 2007, a 3-0 home win for Drogheda, and with all of my data so far going back to 2012, I’m left a little stumped with having to go on to predict this one. There’s just a model of the home / away goal scoring rates in the LOI since 2012, so in using this the result pops out as:

The Probability of a Home win for Drogheda is 30%
The Probability of an Away win for Waterford is 45%
The Probability of a Draw between Drogheda and Waterford is 25%

Okay an away win for Waterford (maybe), let’s see what happens.

By the way it wasn’t that easy to find a dated version of LOI results from way back when, Whoscored ended up being the best source, with an honourable mention for Goal.

As for the other matches here are the predictions for the opening day

Shamrock Rovers (50%) vs St. Patricks (23%)
Draw (27%)

Finn Harps (24%) vs Bohemians (47%)
Draw (29%)

Longford Town (22%) vs Derry City (53%)
Draw (25%)

Sligo Rovers (24%) vs Dundalk (50%)
Draw (26%)

So wins for Shamrock Rovers, Bohemians, Derry City, Dundalk and Waterford FC for this opening day, let’s see how it pans out.

Top Assister Womens World Cup 2019

March 15th, 2021

As an alternative update to the the first challenge were the Mens World Cup 2018 data was looked at, this time it’s a view of the Womens World Cup 2019.

Again I’m going to look at players that assist a goal and at a glance there was one clear player with the most goal assists at this World Cup 2019, that’s Sherida Spitse from the Netherlands, according to Wikipedia, when I head to another site there is a 2 player tie, both with 4 assists so I’m off again to see what the data highlights.

There’s a fantastic FIFA Technical Report on the Womens World Cup 2019, and while there’s fine details on loads of aspects of the games , the one thing it doesn’t cover is a easy table to see the player with the most assists.

So back to the code base, and using the same code base from the previous challenge the top three that popped out were:

  1. Megan Rapinoe (USA) : 21
  2. Amel Majri (France) : 17
  3. Sherida Spitse (Netherlands) : 16

What actions did they perform

Megan Rapinoe was top of the class with 21 passes that lead to a shot on goal.

Figure 1: Megan Rapinoe passes that assisted a shot on goal

So not only was Rapinoe the Golden Boot winner with six goals, tying with Alex Morgan (6 goals) and Ellen White (6 goals), she also had three assists in the tournament, also tied with Morgan (3 assists), and finally captured the Golden Boot for top scorer on the second tiebreaker, doing it with fewer minutes played than Morgan. Her six goals and three assists also saw her win the Golden Ball as the best player in the tournament.

Figure 2: Expected goals from Megan Rapinoe passes

Clearly Rapinoe was involved in so much of the attacking actions of the USA team, and deserved the accolades it is only lightly worth noting that a number of Rapinoes actions were from set plays (corners and the like).

But this specific write up as about the top assistor, and the next player to look at in the category is Amel Majri of France.

Figure 3: Expected goals from Amel Majri passes

Majri was a left back in the French squad, but wore the number 10 shirt and certainly represented the creative flare of that shirt with 17 passes that lead to a shot on goal. It is also quite noticeable that Majri was very consistent as to where a ball into the box would be placed, a dream for the attacking 3 of France to predict.

However the award for top assistor in the Woman’s World Cup 2019 rightly goes to Sherida Spitse of the Netherlands, with 16 passes that lead to a shot on goal, of which 4 were goals.

Figure 4: Expected goals from Sherida Spitse passes

Spitse played as a right sided defensive (pivot) midfield player for the Netherlands, and here are video clips of all of Spitse assists. This first one is from a special tactic camera.
Of note there are a number of the Womens World Cup matches covered by tactic cameras.

Spitse (Netherlands) assist for a goal in the match Netherlands vs. Canada – Thursday June 20, 2019

Spitse (Netherlands) assist for a goal in the match Netherlands vs. Japan – Tuesday June 25, 2019

First assist for Spitse (Netherlands) in the match Italy vs. Netherlands – Saturday June 29, 2019

Second assist for Spitse (Netherlands) in the match Italy vs. Netherlands – Saturday June 29, 2019

FWWC 2019 – Set-piece specialist World Cup 2019 Sherida Spitse