How to Create Football Pass Networks in Python

Поделиться
HTML-код
  • Опубликовано: 31 янв 2025

Комментарии • 54

  • @benjerome9738
    @benjerome9738 4 года назад +20

    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 4 года назад +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 4 года назад +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 4 года назад +3

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

    • @McKayJohns
      @McKayJohns  4 года назад

      Thank you very much! More on the way!

  • @armansultanov6879
    @armansultanov6879 2 года назад

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

  • @gianantonel9913
    @gianantonel9913 Год назад

    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

  • @mobhamjee786
    @mobhamjee786 11 месяцев назад +2

    How can I find data for new matches

    • @McKayJohns
      @McKayJohns  11 месяцев назад

      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

  • @Drakkarlegion
    @Drakkarlegion 11 месяцев назад

    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

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

  • @wasiuddinshaikh9125
    @wasiuddinshaikh9125 3 года назад

    Thank you very much for all the stuff you put out

  • @gustavobordapoo
    @gustavobordapoo 6 месяцев назад

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

  • @Lekol_ai
    @Lekol_ai 7 месяцев назад

    Great video👏🏿😊

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

  • @hitechj5057
    @hitechj5057 3 года назад

    Great video and Great work!

  • @ahmedmeshaal5537
    @ahmedmeshaal5537 8 месяцев назад

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

  • @aminfaisalla
    @aminfaisalla Месяц назад

    hi john, may i know where can i get the data frame?
    thanks

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

  • @SportPages
    @SportPages 3 года назад +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?

  • @brunoqueiroz8470
    @brunoqueiroz8470 2 года назад

    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  2 года назад

      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

  • @stephanomejia1090
    @stephanomejia1090 3 года назад +1

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

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

  • @jawaharramis3750
    @jawaharramis3750 2 года назад

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

  • @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 👍🏻

  • @elyonpride
    @elyonpride 2 года назад

    have you try integrating into tableau/powerbi?

  • @ItIsInTheDetail
    @ItIsInTheDetail 9 месяцев назад

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

  • @DANNYEL20122
    @DANNYEL20122 Год назад

    You are a Barcelona fan just like me.. Cool

  • @sarabentelli6632
    @sarabentelli6632 3 года назад

    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.

  • @bakhodiryakubov3981
    @bakhodiryakubov3981 Год назад

    Anyone knows how to add passer names to the dots?

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