Це відео не доступне.
Перепрошуємо.
How to Create Football Pass Networks in Python
Вставка
- Опубліковано 17 сер 2024
- One of the absolute best visuals you can make for analysis in Football. After this video you will be able to create a pass network in python. Any questions you may have you can hit me up on Twitter!
Github for the files: github.com/mck...
Sam (@goalanalysis) on Twitter: / goalanalysis
Follow me on Twitter: / mckayjohns
My favorite books for learning python and data visualization:
- amzn.to/38TPPbw (Python Crash Course)
- amzn.to/38qCfeT (Data Visualization by Andy Kirk)
I recently started my PhD in soccer analytics and work with Opta data just like this! Extremely useful stuff, thank you very much.
Hello Ben - I have started looking for a PhD in Football Analysis. Could you give some more information about yours, please? It would be really helpful for me - thanks in advance!
@@theocharistousios1281
Unfortunately I can’t give any specifics as my research is funded by a private collaborator.
What I can say, is that I have access to both tracking (physical) and event (technical/tactical) data, which I am using to create new insights into soccer performance and building an understanding of the relationship between physical and technical/tactical performance, as these have predominantly been researched in isolation of each other. There is certainly a greater need for a more integrated approach.
I do know that Leicester City are now advertising a soccer analytics PhD, so perhaps take a look there and you’ll get some further insights into the sort of research expected on a club level.
If you have any more general questions please don’t hesitate to get in touch.
Ben
Hi Ben. This is a field that I'm really interested in as well.
Would it be possible to share some more general information such as what degrees and work experience could help pursue a career in sports analytics? I'm a CS grad myself.
@@kumarteja5564 Hi Kumar. Sure, I think a MSc in CS or mathematics would be a useful progression from your undergrad (assuming that's what you've complete). Use some of the free data (e.g. event data) provided by analytics companies to create interesting visualisations/graphics, offer your services (likely free) to sports analytics companies to get some industry experience and showcase any work you've done. Hope this helps. Ben
I'm very impressed by your job, great video. Hyped for the next Johns 🔜
Thank you very much! More on the way!
Great video! Any ideas of how to make the arrows shorter?
Thank you! I work in R and your walkthrough was very helpful🔥
How to grab the number using passer? Just include it within node parameters?
Hi MxKay, Great video !! super usefull tutorial !
Thank you very much for sharing your knowledge ane code to the community
Great job !
Gian from Argentina
So when I got to the pass between portion of the video I had 128 columns where you had 90 and there was a player passing from the left back position to 2 players and I can t find where they were coming from at the 19:35 mark ish
Hi McKay great tutorial! I'm trying to do a pass network but in my data the outcome for a successful pass is blank. You can only really tell if the pass was successful by looking at the event type where it says ball recipient in the row directly below the pass. Could you tell me how to change the code in order to create the pass network? Cheers
Excelent work, can you do it wiyh instat xlm please?
Thank you very much for all the stuff you put out
This is good stuff! Quick question: what's the significance of doing average location of the passes? Is it because of how many passes are in the dataframe? Or is it something that's generally used when creating pass maps for analysis? Thanks for the videos, they're super helpful!
Good question! The average just gives us a pretty good idea of where a player is making their passes from, and it is generally used. You could try a different tactic of the median to see if results changed as well.
Great video👏🏿😊
Thanks!
Hi mate, just wondering if you can amend the link for the Github files please?
How can I find data for new matches
I built a course that teaches how to do it :) if that interest you
mckay-s-site.thinkific.com/
use code "youtube" and you can get 25% off
Hi John,
Kindly share the code of how to add labels to the nodes.
did you find out how to make it? I have the same question?
Awesome job! Like many others I also wanted to ask how and where you get this type of data :) So I reached out to you on twitter.
Hi Johns, could you explain for me again the reason you use the number 1.2 and 8 to calculate arrows? I'm begginer and I really appreciate and learn by your content, thanks and greetings from Brazil
Our data is 100 x 100 but the pitch is 120 x 80 so to scale properly we multiple by 1.2 and by .8
Is there a way to download these data from understat? for passing and dribbling
You are a Barcelona fan just like me.. Cool
Anyone knows how to add passer names to the dots?
Great video and Great work!
Thank you very much!
Hi, thanks for this video . The instruction “.id.count().reset_index()” doesn’t work for me , can you help me please?
Ps . I don’t use the same data.
have you try integrating into tableau/powerbi?
hey, is there anyway to label each node so we know which player is in which place
Ya if you reach out on Twitter or in the discord I can send you some code that does it
Could be possible that the average positions in the pass network were inverted? Once I plotted the number on each player I realized that Jordi Alba is playing in RB position while Sergiño Dest in LB, for example. Maybe the zero in the y-axis of the pitch starts on the opposite side of the plot than in matplotlib.
I think that this problem can be solved by writting plt.gca().invert_yaxis() while doing the plot.
Ya the statsbomb y is inverted so by doing what you mentioned solves it
Hi McKay,
Great video. What is I want to plot also the subs? How can I do that?
You would need to either have it so it doesn't filter out until the first sub, or you could create a separate pass network, of the time after the first sub
Awesome job! What are your main source of data for current matches? I try to replicate it but it's a bit hard to find new data.
If you reach out to me on Twitter I can explain it to you 👍🏻
Wouldn't the width of the arrows correspond to the number of passes made?
Yes you could do it that way too
Does this provide the graph till the first substitution occurs.!?
how to handle the situation if the subs occurs in first minutes..
Yep until the first sub occurs. You'd have to find out when the sub occurred and then filter for the minutes that you want it to be