Тёмный
No video :(

Making Your Own Shot and Pass Maps 

Friends of Tracking
Подписаться 23 тыс.
Просмотров 22 тыс.
50% 1

Опубликовано:

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 68   
@Yusuf-dx4hw
@Yusuf-dx4hw 3 года назад
Thank you for your contributes Sir.You got me dreaming by this course.I couldn't be a footballer but I believe I may catch my passion by helping footballer on the pitch.Hope to meet you.Greetings from Turkey.
@jackybec5076
@jackybec5076 3 года назад
Really appreciate what you've done in the video and very much love your accent!
@aliwualk
@aliwualk 4 года назад
Thank you Mr Sumper, I am learning a lot and is enjoyable too. I hope you don't mind I leave the code from the passes exercise Regards. # draw passes for label, thepass in passes.iterrows(): if thepass['player_name'] == 'Sara Caroline Seger': x = thepass['location'][0] y = thepass['location'][1] passCircle=plt.Circle((x, pitchWidthY-y),2, color="blue") passCircle.set_alpha(.2) ax.add_patch(passCircle) dx = thepass['pass_end_location'][0]-x dy = thepass['pass_end_location'][1]-y passArrow = plt.Arrow(x, pitchWidthY-y, dx, dy, width=3, color='blue') ax.add_patch(passArrow) fig.set_size_inches(10, 7) fig.savefig('passes.pdf', dpi=100) plt.show()
@ashayshah7
@ashayshah7 4 года назад
Thanks for the video. Really helpful ! One correction though - It should be " - dy" instead of "dy" in the command >>> passArrow = plt.Arrow(x, pitchWidthY- y, dx, -dy)
@BigDataSport
@BigDataSport 4 года назад
Many thanks very true
@gunasekaranm5775
@gunasekaranm5775 4 года назад
Can you pls explain me the use of dx-x and dy-y and similarly pitchlength-x and pitchwidth-y ?
@sarabentelli6632
@sarabentelli6632 3 года назад
Thank you so much, that's what i need .
@yuchenzhao2663
@yuchenzhao2663 2 года назад
I tried to plot the shot map with (x, y) in dataset. It seem like both team attack from left to right. I also tried to do the same thing with (pitchLengthX-x, pitchLengthY-y) for Sweden shot map which switches Sweden attack from right to left. In both case, Eva Sofia Jakobsson goal is on the right-hand side of offensive side. However, the goal is on the left-hand side of offensive side in the sample code. Could anyone help me sort it out? Did I do anything wrong?
@PeterFMP
@PeterFMP 4 года назад
The github link isn't working. Think this is the one that should be there though... github.com/Friends-of-Tracking-Data-FoTD/SoccermaticsForPython
@gunasekaranm5775
@gunasekaranm5775 4 года назад
Can anyone explain me why the "pitchlengthX-x" and "pitchwidthy-y" when and where to use it ? Why not plot the same ? Is it so that we include the 1st and 2nd halves played by the team when we do that ?
@cirocordeiro1293
@cirocordeiro1293 4 года назад
You don't necessarily have to do that. I believe he did this to leave the pitch at the same orientation of the TV camera, you can check that by watching the videos of that particular match. Also, the positions of both teams come as if they were attacking to the same side.
@danilohenrique516
@danilohenrique516 4 года назад
I don't know if you are still having issues understanding this, but, in contrast with what Ciro said, I don't think it is optional. If you don't do it it won't reflect the correct place of events, imo. It happens because there is a difference between matplotlib's coordinate system and Statsbomb's one. I wrote a blog post about the exercise in this class where I mention this if you are still interested: dunderdanilo.com/plotting-passes/
@L_D9814
@L_D9814 3 года назад
when i open the link to github page browser show me 'Page not found', could you reload the files please? Thank you very much
@71pwr
@71pwr 3 года назад
great stuff
@dabody123456
@dabody123456 3 года назад
Thanks for the video. Really helpful for me , and i try hard to show both off pass and shot in plt . to can see both in displayed ... any hellp thnx
@hervesimons9610
@hervesimons9610 4 года назад
Sorry but I've got a problem impossible to draw the pitch however I open FCPython modul. I draw a pitch but from the FC Python site directly and it works. And after it's impossible to plot the passes but I suppose it's link to the pitch not from the FCPython modul.
@sethlxk
@sethlxk 4 года назад
mate i have an error that says 'no module named FCPython' do you know how to fix it?
@BigDataSport
@BigDataSport 4 года назад
@@sethlxk you should have the working directory in the path of your FCPython.py file check in the upper part of spyder if you are positioned in the folder of SoccermaticsForPython downloaded from github
@stuartmacfarlane2317
@stuartmacfarlane2317 3 года назад
Hi everyone, this is an excellent resource and has got me really into data and analytics. Has been very challenging with no previous background in python or maths/ physics. I'm looking to try and create a pass map of passes played from a specific position on the pitch, can anyone help with this or provide me with some code to look at? I've managed to plot individual player and shot maps using the stats bomb data set. Thanks in advance
@tomk961
@tomk961 3 года назад
at around 4:00, David mentions that the positions of player' not-on-the-ball wouldn't be tracked. Does anybody know of any decent material describing how this can be achieved? It's multi-object tracking, sure. But How to map those objects onto a pitch, using say- two camera angles? Thanks
@AmitKumar-wz4wb
@AmitKumar-wz4wb 3 года назад
Anyone else getting this error: NameError: name 'pitchLengthX' is not defined ? Not able to plot the pitch after importing FCPython
@itaybiran6866
@itaybiran6866 2 года назад
if i want to get all Harry Kane shots on the world cup, what do i need to do? i didnt finde the way to get all matchs data.
@jakubflorek1930
@jakubflorek1930 4 года назад
I am afraid the github link is dead :/ Can anyone repair it?
@michaelgraham2596
@michaelgraham2596 4 года назад
Anyone else had this problem? I get "MemoryError: In RendererAgg: Out of memory" when I try to draw the initial shot map and I can't figure out how to fix it.
@anandverma157
@anandverma157 4 года назад
Did you get the answer?
@carlosg.urbano6888
@carlosg.urbano6888 4 года назад
Good afternoon, David. First of all, THANKS A LOT for what you're doing during these hard times for those who are learning Data Analytics. In my case, I'm getting a Master Degree in Big Data in Sports, but I wanted to learn by myself some Python tools. My problem is that I'm not able to watch the full code you're displaying, which made me unable to display any of these maps and get a full insight of it. Would you please help me? Thanks a lot again.
@hrantbaloyan4652
@hrantbaloyan4652 4 года назад
My advice would be try use 'print' in every statement.If you don't understand some code 'print out' and I think it will help.
@carlosg.urbano6888
@carlosg.urbano6888 4 года назад
@@hrantbaloyan4652 Thanks, mate. I'll try :)
@gerardvilanovapallise8492
@gerardvilanovapallise8492 4 года назад
I couldn't plot the passes. What I'm doing wrong? #Plot the passes from FCPython import createPitch (fig,ax) = createPitch(pitchLengthX,pitchWidthY,'yards','gray') for i,thepass in passes.iterrows(): if thepass ['player_name']=='Sara Caroline Seger': x=thepass['location'][0] y=thepass['location'][1] passCircle=plt.Circle((x,PitchWidthY-y),2,color="blue") passCircle.set_alpha(.2) ax.add_patch(passCircle) dx=thepass['pass_end_location'][0]-x dy=thepass['pass_end_location'][1]-y passArrow=plt.Arrow(x,PitchWidthY-y,dx,-dy,width=3,color="blue") fig-set_size_inches(10,7) fig.savefig('Output/passes.pdf',dpi=100) plt-show()
@gunasekaranm5775
@gunasekaranm5775 4 года назад
Why -dy in Arrow() again, you've already did that in the previous line , I used dy-y only once and it worked fine for me, maybe try that !
@samgustafson4485
@samgustafson4485 4 года назад
For the shot maps, is it possible to get the player’s nickname displayed for the goals instead of their full names?
@atishayjain1563
@atishayjain1563 4 года назад
try using .split()
@fisheatsyourhead
@fisheatsyourhead 2 года назад
if it's a whole string like "firstname lastname" you can use name_variable.split(" ") , or otherwise if it's custom nicknames that aren't in the dataset, i.e. south american nicknames then you can make a map with the original names as keys and the nicknames as values so you would go: nickname=map_name["original name"] to give you the nickname
@benvulu1551
@benvulu1551 4 года назад
Hello, I'm getting an error with line 30, TypeError: json_normalize() got an unexpected keyword argument 'sep'. Has anyone else had this issue? If so, can you provide a solution. No luck searching google. Thanks
@M2N489
@M2N489 4 года назад
Hello, when I try to load in the data, it says the file or directory does not exist. However I went to the source in the comment of the code and found the file and viewing the raw code shows me it is the same data as used before with the correct ID. I know this is a few months later so something could be outdated, but any chance for some help with this?
@damianesene8486
@damianesene8486 3 года назад
The git hub page seems to be out, any other way one can get this code? Thanks
@Buendia41st
@Buendia41st 3 года назад
is that an error? runcell(0, 'C:/Users/zanay/Documents/Base de datos friends of tracking/SoccermaticsForPython-master/2PlotShotsAndPasses.py') Traceback (most recent call last): File "C:\Users\zanay\Documents\Base de datos friends of tracking\SoccermaticsForPython-master\2PlotShotsAndPasses.py", line 23, in with open('Statsbomb/data/events/'+file_name) as data_file: FileNotFoundError: [Errno 2] No such file or directory: 'Statsbomb/data/events/69301.json'
@khchan82
@khchan82 3 года назад
Hi, I have a problem installing FCPython module in Anaconda. I was typing "conda install FCPython" in my terminal but it returns an error code "zsh: command not found: conda". Did I not have my Anaconda properly installed?
@gregtorlinski3249
@gregtorlinski3249 3 года назад
I'm guessing you already figured this out but in case you haven't: 1. FCPython is not a module but a file. In Python importing files and modules has shares the "import" syntax. If you cloned his github repo you should have a file in there called FCPython.py 2. It does look like conda isn't working, maybe you haven't added it to path? stackoverflow.com/questions/31615322/zsh-conda-pip-installs-command-not-found
@frankjimenez9407
@frankjimenez9407 3 года назад
Wouldn't be easier to use json_normalize? It looks way tidier
@alexorlandini7792
@alexorlandini7792 4 года назад
So If I wanted to plot one players shots over the course of multiple games, what’s the best way to go about doing it ?
@gunasekaranm5775
@gunasekaranm5775 4 года назад
So, I started working on it and found out how to do that ! I've written the code for separating a team's shots alone, but you can easily modify it for any particular player ! I'll attach my github link for that ! github.com/guna1199/mi_scripts/blob/chunks/shots_alone_df.py
@NhatPham-px9uj
@NhatPham-px9uj 3 года назад
Hi, I could not access to the discord channel. Can anyone invite me to the group? I would really appreciate it.
@alexrathke5486
@alexrathke5486 4 года назад
How did you bring the pitch in - that step was skipped completely..? I know the code is there yet how do you import it. I'm trying a work around of writing the code and plotting the for loop just before the chart output (plt.show)
@Jimmypenguinboy
@Jimmypenguinboy 4 года назад
he used a library
@Zigabyte97
@Zigabyte97 4 года назад
I'm having a problem when I try and experiment with different competitions and league, when I plot a player's passes most passes seem to be passed to the outside of the pitch. Found this using La Liga competition files and Women's League files. Any help?
@christophd.4278
@christophd.4278 4 года назад
If you try to plot an arrow you have to look at your parameters. They are starting location and dx,dy! Not the end location coordinates.
@sathishprasad8365
@sathishprasad8365 4 года назад
Is anyone else facing issues in converting json file to a pandas dataframe? If yes and you resolved it, Please help me. Thank you!
@gunasekaranm5775
@gunasekaranm5775 4 года назад
use pd.json_normalize(), the code shown in the video has been deprecated when a new pandas was released
@vladimircc1953
@vladimircc1953 4 года назад
interesting
@rafrrf
@rafrrf 4 года назад
Can someone send to me the discord invite again? The invite in the video is expirated. Thanks!
@sethlxk
@sethlxk 4 года назад
I have this error that reads 'No module named FCPython' does anyone know how to fix this?
@aliwualk
@aliwualk 4 года назад
You need to have the file under the same folder of the project look under description to download the code from GitHub
@sethlxk
@sethlxk 4 года назад
@@aliwualk thanks! Any idea why some passes seem to be going out of the pitch?
@aliwualk
@aliwualk 4 года назад
seth lee , No problem, my map show the all passes inside the map, just review the code, is probably a typo. in another comment I have paste my code for the exercise, have a look, Thanks
@aliwualk
@aliwualk 4 года назад
@@sethlxk look comment: Christoph D.1 week ago If you try to plot an arrow you have to look at your parameters. They are starting location and dx,dy! Not the end location coordinates. REPLY
@sethlxk
@sethlxk 4 года назад
@@aliwualk alright thanks mate!
@4lex355
@4lex355 3 года назад
this is a bit annoying. i cannot open the links they upload
@muhammadfaisal6052
@muhammadfaisal6052 4 года назад
Hi i cant do the exercise for pass I wrote code by myself and it didn't work Can you send the pass code for me?
@Jimmypenguinboy
@Jimmypenguinboy 4 года назад
i can send it to you, if you want. However, I have a different code style...
@muhammadfaisal6052
@muhammadfaisal6052 4 года назад
@@Jimmypenguinboy could you please send me via email? muhfsl@gmail.com Thank you ,
@Jimmypenguinboy
@Jimmypenguinboy 4 года назад
@@muhammadfaisal6052 yes, I work with jupyter notebook (instead of spyder) and with lists (instead of multiple ifs). Is that ok? The result is the same
@Jimmypenguinboy
@Jimmypenguinboy 4 года назад
here you have: vascomano.github.io/Futebol/jupyter/2020/04/11/FoTlesson2.html
@gunasekaranm5775
@gunasekaranm5775 4 года назад
@@Jimmypenguinboy Can you explain me why the "pitchlengthX-x" and "pitchwidthy-y" when and where to use it ? Why not plot the same ? Are we considering the 1st and 2nd halves played by the team when we do that ?
@nicolaszuleta
@nicolaszuleta 4 года назад
Hello fellow learners, Can someone send to me the discord invite again?
@AkmalRamadhanArifin
@AkmalRamadhanArifin 2 года назад
Hi, can somebody generate a new discord invitation link? Thanks!
Далее
Good practice in data visualisation
1:16:26
Просмотров 14 тыс.
Paul Power: neural networks for understanding defending
1:46:36
O'ZBEK VA TOJIKLAR ROSSIYADA TERAKT UYUSHTIRISHDI!
08:41
Internet is going wild over this problem
9:12
Просмотров 171 тыс.
The Ultimate Guide to Expected Goals
46:31
Просмотров 16 тыс.
How to Build An Expected Goals Model 1: Data and Model
23:05
How to Create Football Pass Networks in Python
26:25
Просмотров 21 тыс.
This NEW AI Chip From Huawei DESTROYS NVIDIA
9:37
Просмотров 7 тыс.