Hello everyone !!
This blog explains about how to create the Premier League animation chart by using MATLAB.
The chart looks like this …
The animated line represents accumulated points which a team gained throughout the season (I used data of season 2019/20). X axis is each game, and y axis is accumulated points. The blue and green shaded area is teams which were qualified for the Champions League and Europa League, respectively. The red shaded area is teams which were relegated from the Premier League.
Procedure
1, Importing data
The data comes from a website called “Football data“. You can download soccer statistic data in almost all leagues such as Premier League, Bundesliga, Serie A … etc. Also, you can pick the conference games, the second league, and championship games. Once you pick any data you want to make the chart, just download and import it into MATLAB.
2, Calculating accumulated points
Unfortunately, the data does not have the accumulated points, so you have to calculate them for each team… but, don’t worry !! I explain how to do it in my YouTube video and provide the MATLAB code below.
3, Modeling data
To make the animated plot, you have to change a format of the data a little bit. Basically, you just need to find accumulated points for each team and store the points team by team. Again, MATLAB code with my YouTube video will help you with this procedure.
4, Plotting the data
After modeling the data, you are ready to plot. The code is somewhat complicated, but it would be still doable. Then, you can save the plot with a video file so that you can use and maybe share it on social media (Show off !!).
My YouTube video
Check out my YouTube video !!
MATLAB code
MATLAB code with data and sample video
Enjoy !!