Yes, Powerpoint: xG Trend Line.

Maram Per Ninety
7 min readApr 11, 2021

--

How Manchester United’s Goals For and Against Trend Over Time

Dipping my toes in football analytics as a 20 year old Economics undergraduate meant I had no access or understanding to the tools and platforms many use to create visualizations. Python’s definition to me did not extend beyond being a large non-venomous snake and Tableau was, well, beyond my reach. I had to get creative and believe it or not: Powerpoint in 2021 is still really useful.

I want to help others, if only a little, and I want to quell the misconceptions about Expected Goals [xG], so I’ve created this series to highlight the many productive ways you can use Expected Goals as a metric. We begin with a trend line. Let’s get started.

I wanted to stress the usage of free, easily accessible tools, so anyone like you and me can create informative and pretty visualizations.

What you’ll need:
— Microsoft Powerpoint [obviously]
— Microsoft Excel
— FBref

I’ve went ahead and split this article to 3 sections, so you can jump to the part you feel is relevant to you.

— Collecting The Data
— Creating The Chart
— Annotating The Chart

Collecting The Data

For this article, I’ll be recreating a xG timeline for Manchester United. Why? Generally, it’s used to observe patterns within the volume of chances created and conceded by a specific team over time. There seems to be a lot of misunderstandings about the usage and application of xG, so, giving people the tools to make them is the best way to understand it. This will be our first type of chart in the xG series.

We use a rolling average to smooth out the data series, cancel out the noise and be able to identify long term trends.

sWe’ll collect the data from our goldmine: [https://fbref.com/en/]. Just pick the club of your choosing, for the purposes of this tutorial I’ll continue with Manchester United. [Side note: their published data for xG only traces back to the 17/18 PL season]

We’ll select all the data for the Premier League in the given season, this is simply a personal preference. I find using the domestic league competition a better sample to dissect a team’s chance creation trends in comparison to knockouts. Let’s head over to Shooting. From there, we can view xG and npxG [Non-Penalty Expected Goals].

Alright, we obviously don’t need all these columns and it just clutters our data. Let’s clean. We can do that by modifying the table and simply deleting the one’s we don’t need.

We’ll just need the xG values and for context, we’ll take the Opponent and Matchweek. We can export it as an Excel Workbook too. Repeat the same for “Against Manchester United” and we now have both the Expected Goals and Against for every match in the given season. Repeat again per season.

Excel has a custom rolling average feature, but it’s only as an additional trend line, whereas we want it as our primary line graph. To avoid the drama, I just like to use an online calculator: [https://goodcalculators.com/simple-moving-average-calculator/] You can just input the data and it’ll give you the moving average results, and as you can see, I’ve already done that. I’ve chosen a 10 game rolling average as a good sample size since we have multiple seasons. It’ll give us better interpretation and help us reach more solid conclusions.

Our data’s ready. Let’s begin.

Creating The Chart

Ugly Line Chart

Alright. We have an ugly line chart. Let’s begin modifying it. This is where we say thanks and goodbye to Excel. Our good friend Powerpoint’s been waiting.

Removing Gridlines

I’ve added my usual black grid background template, you can choose your own. First, let’s unselect the gridlines. It’ll look much cleaner that way. Let’s remove the legend and the chart title, we won’t need that for now.

Editing Lines

Next, let’s get rid of the generic blue and orange. When choosing your colors, make sure they correspond to their connotations correctly. I picked teal for xG and red for xGA, as the viewer would automatically associate red with negativity which, well, makes sense. Just for design purposes I’ve also changed the compound of the line to double. A staple of many of my designs is a glow: I like to keep it to 3pt. It’s a good balance that allows the line to stand out but not blur out.

Editing Markers

I like to add diamond markers. I just went ahead and set them to the same color of the same line for cohesiveness.

How To Add High-Low Lines
Editing High-Low Lines

High-Low Lines. I like to add them specifically for visualizations that intend to show trends and differences. It’s much easier now for the viewer to contextualize the difference between xG and xGA now seeing the different heights of the lines. Finally, just a fun gradient. To add the teal-red effect, I just move both colors to the middle of the spectrum. I also added a very simple trend-line for each.

Alternative: Up-Down Bars.

You can instead add Up-Down Bars, which formats the color based on which line is above the other. So if xG was higher, the high-low lines would be teal. For this specific visualization though, as xG was almost always higher, I preferred using the first method. It’s all about adjusting according to what you have.

Annotating The Chart

Our final phase. This part’s quite fun and, well, quite simple. So: I’ve just changed the font of both axises to Rockwell, set it to Bold and font size to 12.

Let’s also divide by each season. A personal preference of mine was to highlight important milestones or events i.e Mourinho’s sacking. The way I did this was just cross checking the values in the data we gathered in excel and our chart. Let me demonstrate.

So, I’d simply check the values for the first game of the season, and hover my cursor on our chart and put the line over it. This isn’t the ideal method, I know but hey, it works and you know what they say, if it’s not broke don’t fix it.

Finally, our title. This is our sneaky way of adding a legend without actually adding a legend. The beauty of a visualization is in its details. I just set the corresponding colors for “For” and “Against.”

An important part of our annotation is crediting our goldmine: Statsbomb via FBref. Don’t forget to do that! Crediting is very important.

If you ever feel like you want to highlight a specific segment of our line chart, arrows is a very good friend.

I’ve also added my logo. As important it is to credit resources you’ve used or inspirations, it’s also important to credit yourself!

And: we’re done.

We now have a much better understanding of a particular team’s chance creation patterns over time, rather than referring to single match xG’s that don’t tell us much beyond one game [or even at all!] You can see the dips and rises in form, what happened after a manager’s tenure and overall examine whether a team is creating chances at a sustainable, healthy rate.

I hope this article shows you the many possibilities of Powerpoint. I’ve showed you one method, my way of doing things, but there’s always a your way of doing things. Remember to pursue your own creative style, this is an example of mine. Don’t be afraid to try things.

More importantly, I hope it gives you a better understanding of how to use the xG metric and thats by creating a timeline and using rolling averages, rather than single matches.

We’ll further continue this xG series to show you the many many better and more productive visualizations you can create with these numbers.

If you have any questions or feedback, don’t be afraid to drop me a message in Twitter [@maramperninety] or an email [maramperninety@gmail.com]. If you try this out, please show me, I’d love to see! I’m always happy to help.

See you in Part II.

--

--

Maram Per Ninety
Maram Per Ninety

Written by Maram Per Ninety

A woman who talks, analyze and visualizes football — per ninety.