How to Create a Soccer Pass Map in Python

  Рет қаралды 23,754

McKay Johns

McKay Johns

Күн бұрын

Пікірлер: 56
@sauravkumar9454
@sauravkumar9454 3 жыл бұрын
Finally found someone who is doing visualisation on football data. Great stuff. Keep it coming mate.
@chunhang4709
@chunhang4709 3 жыл бұрын
You deserve more subscribers, this is top class
@McKayJohns
@McKayJohns 3 жыл бұрын
I appreciate that!
@sujithappaiah5874
@sujithappaiah5874 3 жыл бұрын
where was the data in this tutorial from? depending on the source do we need to change the dimensions like you explained in the video of creating a pitch?
@tsaminamina_eheh
@tsaminamina_eheh Жыл бұрын
Yeah that makes a huge difference. Most datasets don't contain the info for passmaps unfortunately
@HimanshuYadav-nt9zp
@HimanshuYadav-nt9zp 4 жыл бұрын
Really interesting video for any begineer, I am really curious how one can plot coordinates manually??
@McKayJohns
@McKayJohns 4 жыл бұрын
There’s a lot of ways you could do it. The easiest for me would be to use a scatter plot to plot the individual pass locations then you can use the plot function to plot the lines. You wouldn’t need the for loop that I used in the video.
@AtNovember
@AtNovember 2 жыл бұрын
Mate, please update github link for this video, it says "404 Page not found" ((
@blahlol9937
@blahlol9937 3 жыл бұрын
Could you please make a more customisation tutorial please?
@abdelmalekboufrida9104
@abdelmalekboufrida9104 2 жыл бұрын
Thanks for sharing coach
@freddyadongo5896
@freddyadongo5896 Жыл бұрын
How would you get the x, y, endX and endY values if I pulled the pass data from fbref?
@hamzashariq9057
@hamzashariq9057 Жыл бұрын
hey great work, is data collection via computer vision possible? We use match footages, and using player tracking/detection we assign x y oordinates
@atharvaagate1300
@atharvaagate1300 3 жыл бұрын
Got to say one of the best tutorial channels for footy data analysis. But can you please tell me where I can get premier league games data with such x and y coordinates?for free?
@McKayJohns
@McKayJohns 3 жыл бұрын
reach out to me on twitter
@wiganlegend
@wiganlegend 2 ай бұрын
Thanks Diogo Dalot
@daltonharris699
@daltonharris699 4 ай бұрын
Hey McKay, I am curious as to where the plot points on the CSV file for x, y, endX, and endY come from. Wondering how to setup a csv file for when i become a data scientist for a team.
@dabo6758
@dabo6758 6 ай бұрын
Hello :) Thanks a lot for sharing : I have got a question though . why in these kind of lines : plt.plot((df['x'][x],df['endX'][x]),(df['y'][x],df['endY'][x]),color='red') plt.scatter(df['x'][x],df['y'][x],color='red') you have df['y'][x], namely why is it the x in the last brackets for the df['y'] column and for the endY as well?
@McKayJohns
@McKayJohns 6 ай бұрын
Hi! so the [x] is the variable for which row we are on. and allows us to select that rows values. if you do print(x) you can see exactly what that value is I'll be honest I made this video a while ago so there's definitely better ways to do this that i've learned haha but it still works
@1shot1gol
@1shot1gol 2 жыл бұрын
There is a way to divide the pass 1st half and 2nd half?
@rajapanchal4273
@rajapanchal4273 3 жыл бұрын
You inverted the pitch axis. But how to know the orientation of the data from the source?
@valentinuselzhaww967
@valentinuselzhaww967 3 жыл бұрын
hello bro, great tutorial! where can I get updated dataset for all football matches? thanks :D
@jordanburke4758
@jordanburke4758 Жыл бұрын
How can I find the coordinates on wyscout?
@str-tw4zk
@str-tw4zk 2 жыл бұрын
Thank you that was a really helpful video! Is there a way you can add arrows to the end of a pass line?
@McKayJohns
@McKayJohns 2 жыл бұрын
you'd have to use a different method of mplsoccer which has the arrows in them, or you can use matplotlib as well
@shayZ9
@shayZ9 3 жыл бұрын
After running exactly as shown, i am getting the dots where the passes began, but the lines are not at all showing. I cannot seem to understand why as no error is popping up either
@rattlesnake3837
@rattlesnake3837 3 жыл бұрын
Hi everyone, maybe it's stupid question but I had to ask - when i put df = pd.read_csv with the name of file i get an error AttributeError: module 'pandas' has no attribute 'read' I'm totally newbie to Python, trying to learn new staff, can someone have this problem? Thanks a lot if someone answer (sorry for my english)
@chiradeepg
@chiradeepg 3 жыл бұрын
So awesome, very inspiring stuff for beginners. Do you know how expensive are statsbomb datas?
@McKayJohns
@McKayJohns 3 жыл бұрын
It’s pretty expensive. try using just their free data at first
@chiradeepg
@chiradeepg 3 жыл бұрын
@@McKayJohns Ha ha.. Ya of course.. I was curious as the website doesn’t even show the price, so thought must be a lot..Therefore wanted to check, whether you know. Until now I was doing excel to analyze, however realised it has its limitations as the amount of data rises.. Thanks again for your lovely training..
@williamziniuk1228
@williamziniuk1228 3 жыл бұрын
To plot coordinates manually, could there be a way to do it through mouse tracking and a mouse clicking function? lets say that you were tracking shots and all you had to do is click where on the map the shot took place. I have no idea if this is possible as I'm just starting out with coding. Also then being able to identify goals from shots would be useful for something like this. I also understand that there would be an accuracy issue but if it's possible I'd love to know if it is and how it could be done. Very good video, I'm watching this and the heat maps tutorial, thank you very much.
@McKayJohns
@McKayJohns 3 жыл бұрын
maybe check this out to see if it solves your question
@shayZ9
@shayZ9 3 жыл бұрын
plt.plot is not giving the output
@AH-vu5is
@AH-vu5is 2 жыл бұрын
I really enjoyed to video thank you
@sravanjs6749
@sravanjs6749 Жыл бұрын
cant get the git hub data page 404 not found pleas replay
@McKayJohns
@McKayJohns Жыл бұрын
Sorry. It should be updated now
@imadoulhou7854
@imadoulhou7854 Жыл бұрын
wow, great
@atawariswarsi5652
@atawariswarsi5652 Жыл бұрын
what does the endX and endY mean?
@McKayJohns
@McKayJohns Жыл бұрын
X and y coordinates of where the passes ended
@garydavis2964
@garydavis2964 3 жыл бұрын
Where did you get the data to create the CSV file? I'd like to make some for other games, and wouldn't mind creating a few until I can save up to buy data.
@mobhamjee786
@mobhamjee786 9 ай бұрын
I’m trying to find out myself any luck with it
@DCFC-tr2nz
@DCFC-tr2nz 3 жыл бұрын
You said you can get pass coordinates from Wyscout - how so? Do you scrape it from here? Would love a tutorial if so!
@McKayJohns
@McKayJohns 3 жыл бұрын
wyscout is paid but they do provide some free data! if you reach out to me on twitter I can try to explain a couple of different ideas.
@adildx1
@adildx1 3 жыл бұрын
@@McKayJohns how to get data for pass and heat map. Do Fbref provide such data?
@haroonsidheekhikt3015
@haroonsidheekhikt3015 3 жыл бұрын
Done it, thanks a lot...
@McKayJohns
@McKayJohns 3 жыл бұрын
Welcome 👍
@rohitsoans5781
@rohitsoans5781 3 жыл бұрын
Hey, where do we get the CSV fie form?
@McKayJohns
@McKayJohns 3 жыл бұрын
you can download it in my github the link is in the description
@rohitsoans5781
@rohitsoans5781 3 жыл бұрын
@@McKayJohns Thank you. Do you get this kind of data from statbomb? Could you do a video on how you get the json data out of statbomb and make your own heat/pass maps?
How to Create Football Pass Networks in Python
26:25
McKay Johns
Рет қаралды 21 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 53 МЛН
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 125 МЛН
МЕНЯ УКУСИЛ ПАУК #shorts
00:23
Паша Осадчий
Рет қаралды 4 МЛН
How to Make Graphs Like The Athletic in Python
31:38
McKay Johns
Рет қаралды 46 М.
Passing networks
22:15
David Sumpter
Рет қаралды 3,8 М.
How I animate 3Blue1Brown | A Manim demo with Ben Sparks
53:41
3Blue1Brown
Рет қаралды 1 МЛН
How to Become a Football Analyst
10:59
Football Meta
Рет қаралды 122 М.
How to create football shot maps in python
12:34
McKay Johns
Рет қаралды 11 М.
Introduction to football analysis with tracking data in python.
36:01
Friends of Tracking
Рет қаралды 81 М.
How to create Football Pass Maps using Python
20:34
Mad About Sports
Рет қаралды 8 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 53 МЛН