Це відео не доступне.
Перепрошуємо.

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)

КОМЕНТАРІ • 53

  • @benjerome9738
    @benjerome9738 3 роки тому +16

    I recently started my PhD in soccer analytics and work with Opta data just like this! Extremely useful stuff, thank you very much.

    • @theocharistousios1281
      @theocharistousios1281 3 роки тому +1

      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!

    • @benjerome9738
      @benjerome9738 3 роки тому +4

      @@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

    • @kumarteja5564
      @kumarteja5564 3 роки тому

      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.

    • @benjerome9738
      @benjerome9738 3 роки тому +3

      ​@@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

  • @tasour6725
    @tasour6725 3 роки тому +3

    I'm very impressed by your job, great video. Hyped for the next Johns 🔜

    • @McKayJohns
      @McKayJohns  3 роки тому

      Thank you very much! More on the way!

  • @gustavobordapoo
    @gustavobordapoo Місяць тому

    Great video! Any ideas of how to make the arrows shorter?

  • @armansultanov6879
    @armansultanov6879 2 роки тому

    Thank you! I work in R and your walkthrough was very helpful🔥

  • @ahmedmeshaal5537
    @ahmedmeshaal5537 2 місяці тому

    How to grab the number using passer? Just include it within node parameters?

  • @gianantonel9913
    @gianantonel9913 9 місяців тому

    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

  • @Drakkarlegion
    @Drakkarlegion 6 місяців тому

    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

  • @grogg2243
    @grogg2243 3 роки тому +2

    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

  • @stephanomejia1090
    @stephanomejia1090 3 роки тому +1

    Excelent work, can you do it wiyh instat xlm please?

  • @wasiuddinshaikh9125
    @wasiuddinshaikh9125 2 роки тому

    Thank you very much for all the stuff you put out

  • @jackturek7401
    @jackturek7401 2 роки тому +1

    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!

    • @McKayJohns
      @McKayJohns  2 роки тому

      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.

  • @Lekol_ai
    @Lekol_ai Місяць тому

    Great video👏🏿😊

  • @ItIsInTheDetail
    @ItIsInTheDetail 4 місяці тому

    Hi mate, just wondering if you can amend the link for the Github files please?

  • @mobhamjee786
    @mobhamjee786 6 місяців тому +1

    How can I find data for new matches

    • @McKayJohns
      @McKayJohns  6 місяців тому

      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

  • @SportPages
    @SportPages 2 роки тому +1

    Hi John,
    Kindly share the code of how to add labels to the nodes.

    • @zhenli1630
      @zhenli1630 2 роки тому

      did you find out how to make it? I have the same question?

  • @adamprochazka2479
    @adamprochazka2479 3 роки тому

    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.

  • @brunoqueiroz8470
    @brunoqueiroz8470 Рік тому

    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

    • @McKayJohns
      @McKayJohns  Рік тому

      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

  • @jawaharramis3750
    @jawaharramis3750 2 роки тому

    Is there a way to download these data from understat? for passing and dribbling

  • @DANNYEL20122
    @DANNYEL20122 Рік тому

    You are a Barcelona fan just like me.. Cool

  • @bakhodiryakubov3981
    @bakhodiryakubov3981 11 місяців тому

    Anyone knows how to add passer names to the dots?

  • @hitechj5057
    @hitechj5057 2 роки тому

    Great video and Great work!

  • @sarabentelli6632
    @sarabentelli6632 2 роки тому

    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.

  • @Pride.S
    @Pride.S 2 роки тому

    have you try integrating into tableau/powerbi?

  • @liamholgate1815
    @liamholgate1815 3 роки тому +1

    hey, is there anyway to label each node so we know which player is in which place

    • @McKayJohns
      @McKayJohns  3 роки тому

      Ya if you reach out on Twitter or in the discord I can send you some code that does it

  • @gerardcaverosiscart345
    @gerardcaverosiscart345 3 роки тому

    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.

    • @gerardcaverosiscart345
      @gerardcaverosiscart345 3 роки тому

      I think that this problem can be solved by writting plt.gca().invert_yaxis() while doing the plot.

    • @McKayJohns
      @McKayJohns  3 роки тому +1

      Ya the statsbomb y is inverted so by doing what you mentioned solves it

  • @williamashoti8825
    @williamashoti8825 Рік тому

    Hi McKay,
    Great video. What is I want to plot also the subs? How can I do that?

    • @McKayJohns
      @McKayJohns  Рік тому

      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

  • @jpucela
    @jpucela 3 роки тому

    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.

    • @McKayJohns
      @McKayJohns  3 роки тому

      If you reach out to me on Twitter I can explain it to you 👍🏻

  • @saulo_foot
    @saulo_foot 3 роки тому

    Wouldn't the width of the arrows correspond to the number of passes made?

    • @McKayJohns
      @McKayJohns  3 роки тому +1

      Yes you could do it that way too

  • @haroonsidheekhikt3015
    @haroonsidheekhikt3015 3 роки тому

    Does this provide the graph till the first substitution occurs.!?
    how to handle the situation if the subs occurs in first minutes..

    • @McKayJohns
      @McKayJohns  3 роки тому +1

      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