VizWiz

Launch, grow, and unlock your career in data
Showing posts with label EPL. Show all posts

May 21, 2018

Makeover Monday: How well did The Guardian predict the Premier League table?

3 comments
Back to sports again this week. With the Premier League season just finishing, we're looking at how well The Guardian predicted the EPL table at the start of the season.


What works well?

  • Sorting the teams by prediction makes sense since this is an evaluation of their performance against their prediction.
  • Including the logos so people can find their favorite team
  • Including the numbers for the table position so that the reader doesn't have to count as they go
  • Shading every other row helps break up the view

What could be improved?

  • If you don't know the team logos, it can be hard to track a team across the table.
  • It's hard to see which team did better and worse than expected.
  • There's no scale for how "well" The Guardian predicted the table.

My Goals

  • Focus on the difference between the predicted and actual results
  • Try to create some sort of unit chart (I didn't have time to figure out the calcs, so I cheated with distribution bands)
  • Make it easier to see if team finished above or below the predictions
  • Finish in under an hour because we did MM live at the Data School and had to present to Eva at the end of the hour 

June 5, 2017

When Arsenal Lost the Plot...and the Significance of the Change to 3-5-2

1 comment
I've had this viz on my mind for a couple months now, basically since Arsenal crapped themselves mid-season. I wanted to understand the ebbs and flows of the season a bit better. This also gave me a good excuse to practice using Tableau's story points feature.

So I sat down last night and cranked out this viz and story about Arsenal's 2016/17 campaign, including the up, the downs and the inevitable contract extension for Arsene Wenger.

Enjoy!

December 5, 2016

A History of the North London Derby in the Premier League

No comments

I really liked the learnings that I got last Friday from Rhiannon Fox and the cricket viz I ended up creating. It got me to thinking about other data that I could use with a similar visual display to continue practicing what I learned. Arsenal was preparing to play London rival West Ham on Saturday while I was watching my son skateboarding, so I thought I’d create something comparing Arsenal with their biggest rival, Tottenham Hotspur.

I was able to quickly get all of the results from Wikipedia, which I then imported into Google Sheets and then connected to Tableau. I showed a couple of iterations to Gwilym this morning at the Data School to get his feedback and we agreed that displaying goal difference was the most effective display. In addition, I added dots to indicate the winner. The goal difference display helped show the ebbs and flows of the rivalry way better than showing the goals scored by each team in each match as a diverging bar chart.

Click on the image for the interactive version. Does this display work for you? What might you do differently? Leave a comment and let me know or, better yet, download the workbook, iterate on my design and leave a comment with a link to your version. Enjoy!

October 5, 2015

Who's to Blame for Chelsea's Worst Start in 37 Years?

To say the start to Chelsea’s season has been a debacle would be a massive understatement. From an outsider, it seems fairly clear that Jose Mourinho has lost the dressing room. He even got the kiss of death today when the club released a statement giving him a vote of confidence.

It’s been interesting watch it unfold from this side of the pond. Mourinho is a media darling, even getting away without punishment from the FA and the club for his treatment of team doctor Eva Carneiro. After every loss he pushes the blame on someone other than himself. It’s likely only a matter of one more loss before he gets the sack.

Given all of Mourinho’s shortcomings as a manager this year, the ultimate proof comes in the form of his players’ performances on the pitch. So far this season, those performances have been downright dreadful. Just how bad has it been? The viz below shows that things are really, really bad.

I looked at three key stats from WhoScored.com: Player Rating, Pass Completion %, and Aerial Duals Won. I took the data and filtered it down to the outfield players that made contributions both last season and this. I then created the simple analysis below.

Some notes:

  1. Every player has a lower rating this year than last. Particularly in poor form are Terry, Hazard, Costa and Ivanovic.
  2. Some of Chelsea’s most creative players are struggling to connect passes. Are the likes of Ramires, Oscar and Fabregas trying too hard under the pressure perhaps?
  3. Matic has been taking a lot of stick from Mourinho, but his pass completion % is 3.5% better than last year. He’s not being nearly as sloppy with the ball as his midfield counterparts, though if you read the papers you would think it was the opposite.
  4. John Terry is showing his age when it comes to aerial duals. He’s winning less than half as many as last year.

If things don’t turn around in the next fixture against Aston Villa, I wouldn’t be at all surprised if Jose got the sack. Why? Because you can’t fire 24 players at once and because Mourinho’s ego is too big to last more than three years at any club.

February 16, 2015

Makeover Monday: How Does Francis Coquelin's 14/15 Season Compare to Alex Song's 11/12 Season at Arsenal?

1 comment
Ever since Alex Song left Arsenal for Barcelona in the summer following the 11/12 season, Arsenal have been in desperate need of a defensive midfielder. They've been scraping by with Arteta and Flamini, but they're both aging and not getting any better. In the 2014 summer transfer window, fans were screaming out for Arsene Wenger to sign a DM. Stubborn as he is, Wenger didn't sign one.

That decision left Arsenal very thin at the back to start the 14/15 season. Fast forward a few months and injuries, as they always do, hit Arsenal hard. They were forced to recall Francis Coquelin from a loan spell at Charlton.


As the saying goes, he's been like a new signing. In his previous spells with the first team, he failed to establish himself, but this time around, he grabbed hold of the opportunity and surely now Coquelin is the first name on the manager's team sheet.

Late last week, I ran across this article from HITC Sport. In it, Dan Coombs says "Coquelin has shown already that he is playing defensively at an equal or higher level than Song's final season at the club." Dan then provided this simple table:


This table is perfectly fine. It's a table and it provides a great way to look up the data. In the end, the point of the story is to show how effectively Coquelin is playing compared to Song. I created this infographic in Keynote with the hope that it is more interesting, more engaging and makes comparisons easier.


December 17, 2014

Henry or Shearer? Who is the greatest Premier League Striker?

No comments
December 16, 2014 will always be remembered in Arsenal lore as the day Thierry Henry officially retired from football.  He's been away from Arsenal for the most part since he left for Barcelona after the 2006-07 season. At that point in his career, he had scored 174 Premier League goals, getting one more in January 2012 in a brief return, closing his Premier League account with 175 goals.

In a tribute to The King, the Premier League created this great compilation video.



Henry's retirement led to the inevitable debate of who is the greatest Premier League striker ever? Most people agree that Thierry Henry and Alan Shearer are in a class by themselves. The great thing about sport is that it leads to lots of opinions and great debates. There are Henry camps and there are Shearer camps.

I gathered their career data from wikipedia (here and here) and combined them into a single spreadsheet here. I built this quick viz in Tableau to allow you to answer the question for yourself. Download the workbook here.



October 29, 2014

Plot.ly - A simple interface for creating great looking charts in d3

No comments
Yesterday I had the pleasure of meeting Matt Sundquist, Co-Founder and COO of plot.ly. Plotly is a really interesting new data viz product that allows you to quickly build charts directly in your browser. It's built on top of d3, so it has tons of styling capabilities. If you're looking to build charts with d3, but don't want to do much, if any, coding, then you should definitely check it out. They have a free version.

What is Plotly? The folks at import.io have a great summary:
Plotly is a young graphing and analytics startup, which makes it easy to analyze and visualize data together. Using Plot.ly, users can import data from anywhere, then make and share online graphs using Python, MATLAB, R, Excel, Julia, and their web app. Users can also share work and collaborate on projects.
The Plotly API enables users to analyze and visualize data in one place, and forms an important step in building the infrastructure for data science to be further democratized. Their goal is to be an awesome platform for collaboratively analyzing data and making graphs. 
From the Plotly website, in the workspace area (think of this as a worksheet in Tableau):
Easily make graphs with your data in the workspace. Import data from Google Drive or upload Excel or text files. You can apply fits, stats, and functions to your data.  
Every element of a Plotly graph is customizable. Change the colors, annotate, write LaTeX, toggle graph ticks, and much more. It's up to you!
The best way to get familiar with any new product is to start using it. Since I had just publish a parallel coordinates plot in Tableau yesterday, I thought I would use the same dataset and see how long it takes to build something similar in Plotly. I was pleasantly surprised by the simplicity and intuitiveness of the interface. It took me about 30 minutes to build this view, but a lot of that time was spent tweaking the settings to get them just right, which I'm perfectly ok with given the very detailed control I have over the final display.

Plotly doesn't currently support things like filtering and parameters yet, but for a first pass through, I really like it and will definitely be using it more often going forward. So, here's my first plot.ly viz (be sure to hover over dots to see their awesome interactivity):

October 28, 2014

My first experience with import.io and Tableau

3 comments
Remember when you first found Tableau and realized you would never use Excel to create charts again? Well, I had a similar eureka moment last Thursday when I sat in on a great webinar by import.io hosted by Alex Gimson - Build Grow Scale: Getting started with import.io. The difference here is that I will no longer need to copy/paste from webpages; import.io will do all of the work for me!!

During the webinar, Alex revealed that he was a huge Arsenal fan (as am I), and I wanted to find a simple project to become more familiar with the tool. My basic idea was:
  1. Use the import.io Extractor to download the Premier League table from ESPNFC for every season since 2002
  2. Create a visualization in Tableau
  3. Allow the people interacting with the viz to highlight their favorite team
  4. Make Alex happy!
During the webinar, Alex went through a simple Extractor example. Here's a screenshot of the extractor that I built (click on the image to make it larger):


Get the import.io dataset here. Overall, the process was super simple. All I had to do was paste the URL in the box on the left, then add a URL for each season. From there, I clicked on the Download button on the upper right to download it into Excel. I did a bit of cleanup in Excel to make it Tableau-ready.  Download the Excel data here.

Before import.io, this would be a painful process of navigating to each webpage, copying the table, pasting it in Excel and repeating for each season. Using import.io, I completed the whole process, including cleaning up the data, in under 5 minutes.  The import.io portion of the process took about 2 minutes.

From there, I built this simple viz in Tableau. It took about 30 minutes to build this in Tableau, but I had already sketched out on paper what I wanted to create. I waited until match week 9 completed to publish this viz because I wanted to test how easy it is to refresh the data in the Extractor. It was super simple!

I would highly recommend using import.io. I'm going to continue to look to use it whenever I need to crawl webpages for data.

Download the Tableau workbook here.

October 13, 2014

Makeover Monday: Arsenal's Injury Crisis - A Story

8 comments
ESPNFC recently published an article providing some details about Arsenal's nearly 900 injuries since the start of the 2002-2003 English Premier League season. Last year, Arsenal crossed the 100 injury mark, suffering 111 injuries in total. This year they are picking up where they left off, with 26 so far this season. In particular, Arsenal continues to be without Theo Walcott and has suffered major, long-term injuries to key players like Aaron Ramsey, Mathieu Debuchy and, most recently, Mesut Ozil.

I found this story fascinating because it finally put numbers to Arsenal's perceived injury crisis.  They do indeed suffer way more injuries than any other EPL team. But what bothered me about the ESPN story was that they basically just listed off a few key facts (quoted from ESPN):
  1. Arsenal players have sustained 889 injuries since August 2002, according to a report by PhysioRoom.com.
  2. The Gunners' 889 injuries over the 12-year period compare to 792 for Manchester United, 620 for Chelsea and 551 for Liverpool.
  3. Abou Diaby, who has recently returned to fitness, has endured 40 separate injuries, according to the study, while Theo Walcott, who is currently recovering from a serious knee problem, features 42 times.
  4. PhysioRoom.com claims 120 of the injuries were of the hamstring variety while six anterior cruciate ligament (ACL) have been suffered.
These all seems like interesting stats, but they're missing something incredibly critical...context.

Without comparing Arsenal to their rivals, how do I know how bad their injury crisis really is? If they're suffering injuries at the same rate as their rivals, then maybe there isn't a crisis after all. But if their rate of injury is higher, then perhaps there is more to the story. Have Arsenal players always been injury-prone or have they increased since they moved to the Emirates Stadium with its rock hard surface?

I set out to understand more by downloading the injury reports from PhysioRoom.com for all teams that have participated in every year of the EPL since 2002-03 (plus a few others that are not included in my final story below). You can download the data in Excel format here.

So in a sense, today's makeover is not a makeover of a chart or dashboard; it's a makeover that takes a text-based story and adds charts and graphs to tell a more meaningful story.

Download the Tableau workbook used to create this story here.

September 13, 2013

When Arsenal stole Mesut Ozil from Real Madrid, they got a player nearly as good as Xavi and Iniesta combined

3 comments
Fact: Mesut Ozil is a Gunner
Fact: Across all competitions, Ozil is nearly as good as Xavi and Iniesta COMBINED, merely 0.01 goals + assists per game behind the combined pair.  Get your head wrapped around that.

When Arsenal surprised everyone by actually spending some money on transfer deadline day with the club-record signing of Mesut Ozil for $67M, many of the pundits (1) were in shock that Madrid sold him and (2) thought Arsenal had secured THE BEST central midfielder in the world.

Turning to the data, you can easily make such an argument.  Using the viz below, you can compare Ozil to many of the other top central midfielders in the World.

  • Despite having played fewer seasons than nearly all of the players on this list, Ozil is the leader in total assists, leader in goals + assists per game, and the runaway leader in assists per game across all competitions.
  • Xavi and Iniesta may get all of the plaudits, but they are well down the list of goals + assists per game across all competitions, coming in at 10th and 13th respectively.  They are far behind Ozil and just behind Santi Cazorla.  This has to bode well for Arsenal.
  • Ozil has been the clear leader in assists across all competitions for the past four years. meanwhile Xavi's production has steadily dropped, with a dramatic drop off in the 2009/10 season.
  • Ozil consistently performs better for country than club and on the international stage, his performance vs. his peers is even more staggering.
  • Barca need to get Cesc on the field more often.
  • Frank Lampard, despite playing for the Evil Empire in Chelsea, was astonishingly consistent and dominant from 2003/04 through 2009/10.  Frank performs better than Gerrard on the international stage when looking at averages per game, yet you would think, based on what you hear in the press, that Gerrard's performances far exceed those of Lampard.  The data shows otherwise.  I suppose that's why they call them pundits and not experts.
  • Manchester United are desperate for an attaching midfielder to complement Michael Carrick.

Play around with the viz and comment with things you see.  You can also download the workbook here.

May 8, 2013

Was Theo Walcott’s performance for Arsenal driven by motivation for a new contract?

2 comments

With two matches to go in the EPL season, Arsenal is in a battle for a Champions League spot with Chelsea and Tottenham and Theo Walcott is leading scorer.  He started out the season in great form, then suddenly tapered off immediately after he signed a new deal with the club.

In Arsenal’s last two matches, Theo has scored two great goals very early on in the game, at the 2’ mark against the champions Manchester United and 20 seconds into the most recent game against relegated QPR.  Theo is back in form.

I was interested to see how Theo has impacted Arsenal’s overall performance.  Use the viz below to see how Arsenal performs when Theo does or does not play (Arsenal have a higher winning % when he doesn’t play, though in a small sample size) and when he does or does not score (their winning % increases by 20% when he plays and scores vs. when he plays and doesn’t score).

In other words, Arsenal need Theo to play and score.

Download the data here and the Tableau workbook here.

January 16, 2013

The one chart that shows how the sale of Robin van Persie impacted the fortunes two clubs

No comments
Super Sunday has come and passed along with yet another abject Arsenal performance.  I attended the game with about 100 of my fellow Bay Area Gooners at Maggie McGarry’s in San Francisco. This is THE place to watch Arsenal. 

We were pumped for the game, only to be let down nine minutes into a game by a stupid foul and the subsequent sending off of Laurent Koscielny.  Why wasn’t the BFG Per Mertsacker playing in the first place?  That’s another rant for another time.

Several Gooners at Maggie’s were talking about Arsenal’s lack of ability to dominate the final third of the pitch, which got me daydreaming back to the days of Robin van PersieArsene Wenger sold RVP to Manchester United over the summer, literally telling Sir Alex Ferguson that he was handing him the title.  Of course, RVP has continued scoring like the 3rd best striker in the World.  I think our manager has lost the plot. 

I pulled some data down from the Barclay’s Premier League website to see how teams were performing through 21 fixtures this year compared to last.  I created this:


Tufte introduced slopegraphs in his book The Visual Display of Quantitative Information.  This type of chart is useful because is helps quickly highlight:
  • The order of the clubs
  • The specific number of points accumulated by each team in each year
  • The slope reveals the change over time and each club’s rate of change compares easily to other teams
  • There’s almost zero non-data ink.  I say almost because I used red to highlight Arsenal.
Presented this way, the data reveals a few simple observations:
  • Manchester United have opened on the rest of the league this year and that they were in 2nd place last year.
  • The gap between Man U and Arsenal is HUGE this season, which is surely directly correlated the RVP’s transfer.
  • Everton and West Brom have had much stronger starts to the season.  Don’t be shocked if Everton snatches the last Champions League spot.  It sure doesn’t look like Arsenal has the heart to do it.
  • Newcastle sucks this year!
  • Most importantly, we’re only 5 points behind Spurs, whereas we were 10 points behind at this point last year.  If we’re not going to make the Champions League, we could take a bit on consolation in finishing ahead of Spurs.
If you have an ideas on how to turn Arsenal’s season around, please feel free to let the club know.

April 24, 2012

Do PK decisions in the EPL even out? Fergie thinks so, but the data disagrees.

7 comments
Are Premier League referees getting worse? It sure seems that way when I watch games.  And despite the opinion of Sir Alex Ferguson, the decisions do not even out.

What makes it even tougher is when the players dive all over the place with no intent other than to con the referee.  Is anyone with me on starting a campaign for retroactive suspensions for diving?  That would stop all of the diving immediately!  Guaranteed!

Ashley Young has been near criminal in two recent matches.  He’s even been mentioned for a position on Great Britain's Olympic diving team.  Refer to the video of Man U vs. Villa and Man U vs. QPR for some of the finest acting in years.  He really ought to be ashamed of himself.

But it’s not only the PKs that are called; it’s those that are not called as well.  Refer to the highlights, if you can find them, of the Man U vs. Fulham game on 26 March 2012.  The game was at Old Trafford, it was late in the game, there was a CLEAR penalty against Man U and, of course, it wasn’t called.

I’m not saying there’s a bias towards the “bigger clubs”, but looking at penalty kick data sure leans me in that direction.  All you need to do is filter the viz below to only include teams that finished 1-4 and you’ll see what I mean.

The top four teams get way more PKs called in their favor than the rest of the clubs AND they significantly more PKs called at home.  I simply can’t believe that referees are NOT intimidated by Fergie and Old Trafford?

Click on the Manchester United logo to focus on them.  Look at those startling trends that appear at the bottom.  Intimidation at its finest!

If you want to see the details behind the charts, go to the Team PK Stats tab. 
  • Look at how many PKs the top four teams have gotten over the year, both overall and at home
  • Now compare that to the relegated teams (18-20)
Maybe it’s because the top teams have the ball more and create more situations where a PK could be called. But still, should the numbers be so overwhelming?


April 16, 2012

When did Arsenal’s season really turn around?

No comments

As we approach kickoff of the Arsenal vs. Wigan game this afternoon, I thought I’d take a quick look back at the Gunners’ season and when the data says the season may have turned around.

It’s well documented that Arsenal got off to one of the club’s worst starts ever, but gradually they have come back and are currently in third place.  With five games remaining, their magic number over Spurs and Newcastle stands at 11 and 8 over Chelsea.

Magic number” is a phrase we use in the States, particularly with baseball, “to indicate how close a front-running team is to clinching a season title (or third place and a Champions League automatic qualifying spot in Arsenal’s case). It represents the total of additional wins by the front-running team or additional losses (or any combination thereof) by the rival team after which it is mathematically impossible for the rival team to capture the title in the remaining games.”

Many people point to the goal below by Bacary Sagna when Arsenal were down 0-2 against Spurs on 26-Feb as the turning point in the season.  (Pardon the poor quality; it’s all I could find on YouTube.)  I must say that I love the way Sagna took the goal, followed the ball into the goal, picked it up, ran it to half field and all but said “I’m sick of this!”  The entire attitude of the team seemed to shift on this one goal.  I get the chills every time I watch it.

Again, I have no doubt about the attitude shift at this single moment, particularly after back-to-back poor results against AC Milan (Champions League) and Sunderland (FA Cup).  But looking at the data for the EPL only, one particular match stands out as the turnaround point..the 7-1 thrashing of Blackburn, whom Arsenal somehow managed to lose to during their early season swoon.

Below you will see four chart, all which highlight this 7-1 game.

  1. Points Trend – the upward trend of full-point matches clearly starts with the Blackburn match
  2. Points vs. Possible – Here, you want to see a flat green line, which indicates full points are taken from the match.  Look at that long run of results that starts with the Blackburn match.
  3. Table position – What an ugly start to the season!  There was a recovery for a few weeks 1/3 of the way into the season, but another string of poor results began with the 0-1 loss to Manchester City.  But the run of results beginning with the Blackburn match, combined with a significant dip in form by Spurs, has pole vaulted the Gunners into 3rd place.
  4. Score vs. Result – This is a simple scatterplot. The darker the bubble, the more results for that score.  Excluding the 2-8 drubbing at the hands of Manchester Units, Arsenal have lost every match, bar a 0-2 defeat by only one goals.  This indicates that they have been in every match, but haven’t been able to score late to turn the result around.  But look at our wins, the scores have been tremendous with a but more than a 4-1 average score.

image

Touch wood that Arsenal will hold on to third place, and please, please, please RVP, sign a new contract!

December 14, 2011

What does it take to survive in the English Premier League?

4 comments

If you love soccer, then it’s likely that you follow the EPL.  My favorite team?  ARSENAL!  Did you see the incredible goal by RVP Saturday against Everton? You may never see better technique and now he’s only one goal behind Thierry Henry’s team record for goals in a calendar year.  Please Lord, keep RVP healthy for a full season!

And if you love soccer and you love stats, then check out Soccer by the Numbers. Chris Anderson writes many quality posts and recently he blogged about points and relegation.  I wanted to take Chris’ ideas a step farther.  I needed a richer dataset than what Chris was able to provide, so I downloaded the final tables (i.e., standings) from the EPL back to the 2001-02 season from ESPNSoccernet. You can download the full dataset here.

I borrowed (or is it stole?) Steve Wexler’s technique for providing instructions (hover over the EPL logo to see what I mean).  There’s lots of interactivity in the viz, so first check out the instructions, then start clicking around. 

Answer this: How many teams have qualified for the Champions League with a negative goal differential?  Who were they? What else can you tell me about the team(s)?  Post your answer in the comments.