How to Create a Soccer Pass Map in Python

  Рет қаралды 24,501

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
@daltonharris699
@daltonharris699 6 ай бұрын
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.
@AtNovember
@AtNovember 2 жыл бұрын
Mate, please update github link for this video, it says "404 Page not found" ((
@freddyadongo5896
@freddyadongo5896 Жыл бұрын
How would you get the x, y, endX and endY values if I pulled the pass data from fbref?
@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
@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
@sravanjs6749
@sravanjs6749 2 жыл бұрын
cant get the git hub data page 404 not found pleas replay
@McKayJohns
@McKayJohns 2 жыл бұрын
Sorry. It should be updated now
@rajapanchal4273
@rajapanchal4273 3 жыл бұрын
You inverted the pitch axis. But how to know the orientation of the data from the source?
@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)
@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
@1shot1gol
@1shot1gol 2 жыл бұрын
There is a way to divide the pass 1st half and 2nd half?
@jordanburke4758
@jordanburke4758 Жыл бұрын
How can I find the coordinates on wyscout?
@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.
@shayZ9
@shayZ9 3 жыл бұрын
plt.plot is not giving the output
@dabo6758
@dabo6758 8 ай бұрын
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 8 ай бұрын
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
@blahlol9937
@blahlol9937 3 жыл бұрын
Could you please make a more customisation tutorial please?
@valentinuselzhaww967
@valentinuselzhaww967 3 жыл бұрын
hello bro, great tutorial! where can I get updated dataset for all football matches? thanks :D
@atharvaagate1300
@atharvaagate1300 4 жыл бұрын
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 4 жыл бұрын
reach out to me on twitter
@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
@atawariswarsi5652
@atawariswarsi5652 Жыл бұрын
what does the endX and endY mean?
@McKayJohns
@McKayJohns Жыл бұрын
X and y coordinates of where the passes ended
@abdelmalekboufrida9104
@abdelmalekboufrida9104 3 жыл бұрын
Thanks for sharing coach
@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?
@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..
@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 11 ай бұрын
I’m trying to find out myself any luck with it
@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?
@AH-vu5is
@AH-vu5is 2 жыл бұрын
I really enjoyed to video thank you
@haroonsidheekhikt3015
@haroonsidheekhikt3015 3 жыл бұрын
Done it, thanks a lot...
@McKayJohns
@McKayJohns 3 жыл бұрын
Welcome 👍
@wiganlegend
@wiganlegend 5 ай бұрын
Thanks Diogo Dalot
@imadoulhou7854
@imadoulhou7854 Жыл бұрын
wow, great
How to Create Football Pass Networks in Python
26:25
McKay Johns
Рет қаралды 22 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
NEW Deepseek-R1 Update Is a Total Game-Changer! 🤯
13:29
R tutorial: Creating Maps and mapping data with ggplot2
10:30
Statistics Guides with Prof Paul Christiansen
Рет қаралды 116 М.
How to Scrape SofaScore for Free Football Data (Updated Method)
17:16
Transformers (how LLMs work) explained visually | DL5
27:14
3Blue1Brown
Рет қаралды 4,4 МЛН
How to create Football Pass Maps using Python
20:34
Mad About Sports
Рет қаралды 8 М.
Predict the Outcome of Football Matches Using this Model
21:02
Kie Millett
Рет қаралды 196 М.
Football AI Tutorial: From Basics to Advanced Stats with Python
1:30:19
How to Create Radar Charts for Soccer Analysis in Python
30:32
McKay Johns
Рет қаралды 17 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН