{"id":927,"date":"2021-03-01T00:14:57","date_gmt":"2021-03-01T00:14:57","guid":{"rendered":"http:\/\/miguelpdl.com\/weblog\/?p=927"},"modified":"2021-03-01T00:14:57","modified_gmt":"2021-03-01T00:14:57","slug":"mini-challenge-plotting-actions-of-an-assister","status":"publish","type":"post","link":"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/","title":{"rendered":"Mini-challenge: Plotting Actions of an Assister"},"content":{"rendered":"<div class=\"paragraph\">\n<p>One of the <a href=\"https:\/\/uppsala.instructure.com\/courses\/28112\/pages\/1-visualising-actions\">first challenges of the Mathematical Modelling of Football<\/a><br \/>\nlecturer series was to:<\/p>\n<\/div>\n<div class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>Think of a player who you enjoyed watching at the recent Men\u2019s or Women\u2019s World Cups.<\/li>\n<li>What actions did they perform that were important and why?<\/li>\n<li>Plot the actions and describe how the data supports or contradicts your own analysis.<\/li>\n<li>Write a short text using at most two figures that illustrate your point.<\/li>\n<\/ol>\n<\/div>\n<div class=\"paragraph\">\n<p>I\u2019ll address this challenge with a view on a player (or set of players as it turns out), and later in the piece I\u2019ll also share some code snippets on how the information was extracted from the StatsBomb data.<\/p>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_think_of_a_player\">Think of a player<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>The first challenge and I must admit I\u2019m floundering a little already as I can barely remember the Mens 2018 World Cup, bar the eventual winners, the golden boot winner and the best player award.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>However the one thing I do like in football is the player assisting goals.<br \/>\nSo for this challenge I thought I would look at the one player that came out on top in this regard at the 2018 World Cup and to state the important actions they performed.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>However on first glance it is the case that there is a <a href=\"https:\/\/en.wikipedia.org\/wiki\/2018_FIFA_World_Cup_statistics#Assists\">16 way tie for the most goal assists at the World Cup 2018<\/a>, well according to Wikipedia, when I head to another site <a href=\"https:\/\/www.worldfootball.net\/assists\/wm-2018-in-russland\/\">there is a 19 player tie<\/a>.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>So the first thing I\u2019ve done is take the Team names for all the players listed as the top assist players, have a look at all the passes, and especially all the passes that lead to a goal (or more so a shot on goal) and try and find out the top three players that assisted shots on goal.<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>This lead to a surprise, for me anyway, because the top three that popped out from this exercise was:<\/p>\n<\/div>\n<div class=\"olist arabic\">\n<ol class=\"arabic\">\n<li>Kieran Trippier (England) : 25<\/li>\n<li>Neymar da Silva Santos Junior (Brazil) : 24<\/li>\n<li>Philippe Coutinho Correia (Brazil) : 13<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_what_actions_did_they_perform\">What actions did they perform<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Kieran Trippier had 25 passes that lead to a shot on goal.<\/p>\n<\/div>\n<div id=\"img-ktpasses\" class=\"imageblock\">\n<div class=\"content\">\n<div id=\"attachment_936\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-936\" data-attachment-id=\"936\" data-permalink=\"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/kierantrippier-passesleadingtoshot\/\" data-orig-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?fit=3000%2C2100&amp;ssl=1\" data-orig-size=\"3000,2100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"KieranTrippier-passesleadingtoshot\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?fit=300%2C210&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?fit=1024%2C717&amp;ssl=1\" class=\"wp-image-936 size-large\" src=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?resize=1024%2C717\" alt=\"\" width=\"1024\" height=\"717\" srcset=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?resize=1024%2C717&amp;ssl=1 1024w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?resize=300%2C210&amp;ssl=1 300w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?resize=768%2C538&amp;ssl=1 768w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?resize=1536%2C1075&amp;ssl=1 1536w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?resize=2048%2C1434&amp;ssl=1 2048w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-passesleadingtoshot.png?w=3000 3000w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><p id=\"caption-attachment-936\" class=\"wp-caption-text\">Figure 1: Kieran Trippier passes that assisted a shot on goal<\/p><\/div>\n<\/div>\n<div>&nbsp;<\/div>\n<div class=\"title\"><span style=\"font-size: inherit;\">However Kieran Trippier does not appear on the top player to assist goals chart because for all these passes only one of them lead to an assisted goal (for John Stones).<\/span><\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Now it\u2019s time to look at the Expected Goal plot of the shots that happened, straight after Kieran Trippier gave in the pass for that shot. As far as I can tell Kieran Trippier could have had at least 2, if not 3, other assisted goals, however there are many of those passes that are into areas where the Expected Goal of that next shot is low.<\/p>\n<\/div>\n<div class=\"content\">&nbsp;<\/div>\n<div id=\"img-ktshotspasses\" class=\"imageblock\">\n<div>\n<div id=\"attachment_935\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-935\" data-attachment-id=\"935\" data-permalink=\"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/kierantrippier-shotsfrompasses\/\" data-orig-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?fit=3000%2C2100&amp;ssl=1\" data-orig-size=\"3000,2100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"KieranTrippier-shotsfrompasses\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?fit=300%2C210&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?fit=1024%2C717&amp;ssl=1\" class=\"wp-image-935 size-large\" src=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?resize=1024%2C717\" alt=\"\" width=\"1024\" height=\"717\" srcset=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?resize=1024%2C717&amp;ssl=1 1024w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?resize=300%2C210&amp;ssl=1 300w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?resize=768%2C538&amp;ssl=1 768w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?resize=1536%2C1075&amp;ssl=1 1536w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?resize=2048%2C1434&amp;ssl=1 2048w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/KieranTrippier-shotsfrompasses.png?w=3000 3000w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><p id=\"caption-attachment-935\" class=\"wp-caption-text\">Figure 2: Expected goals from Kieran Trippier passes<\/p><\/div>\n<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>It is also worth noting that a larger number of Trippiers actions are from set plays (corners and the like).<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>So who was the top assistor at the 2018 World Cup, is it Neymar of Brazil ?<\/p>\n<\/div>\n<div class=\"paragraph\">\n<p>Neymar comes in second on the list gathered earlier, however he only assisted 1 goal also.<\/p>\n<\/div>\n<div class=\"content\">&nbsp;<\/div>\n<div id=\"img-Nymshotspasses\" class=\"imageblock\">\n<div>\n<div id=\"attachment_934\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-934\" data-attachment-id=\"934\" data-permalink=\"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/neymardasilvasantosjunior-passesleadingtoshot\/\" data-orig-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?fit=3000%2C2100&amp;ssl=1\" data-orig-size=\"3000,2100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"NeymardaSilvaSantosJunior-passesleadingtoshot\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?fit=300%2C210&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?fit=1024%2C717&amp;ssl=1\" class=\"wp-image-934 size-large\" src=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?resize=1024%2C717\" alt=\"\" width=\"1024\" height=\"717\" srcset=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?resize=1024%2C717&amp;ssl=1 1024w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?resize=300%2C210&amp;ssl=1 300w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?resize=768%2C538&amp;ssl=1 768w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?resize=1536%2C1075&amp;ssl=1 1536w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?resize=2048%2C1434&amp;ssl=1 2048w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/NeymardaSilvaSantosJunior-passesleadingtoshot.png?w=3000 3000w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><p id=\"caption-attachment-934\" class=\"wp-caption-text\">Figure 3: Expected goals from Neymars passes<\/p><\/div>\n<\/div>\n<div class=\"title\">&nbsp;<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Therefore it must be Philippe Coutinho, with 13 passes that assisted a shot on goal and 2 actual goal assists he is the top player in this category.<\/p>\n<\/div>\n<div id=\"img-Pcshotspasses\" class=\"imageblock\">\n<div class=\"content\">&nbsp;<\/div>\n<div>\n<div id=\"attachment_932\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-932\" data-attachment-id=\"932\" data-permalink=\"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/philippecoutinhocorreia-passesleadingtoshot\/\" data-orig-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?fit=3000%2C2100&amp;ssl=1\" data-orig-size=\"3000,2100\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"PhilippeCoutinhoCorreia-passesleadingtoshot\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?fit=300%2C210&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?fit=1024%2C717&amp;ssl=1\" class=\"wp-image-932 size-large\" src=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?resize=1024%2C717\" alt=\"\" width=\"1024\" height=\"717\" srcset=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?resize=1024%2C717&amp;ssl=1 1024w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?resize=300%2C210&amp;ssl=1 300w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?resize=768%2C538&amp;ssl=1 768w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?resize=1536%2C1075&amp;ssl=1 1536w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?resize=2048%2C1434&amp;ssl=1 2048w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/PhilippeCoutinhoCorreia-passesleadingtoshot.png?w=3000 3000w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><p id=\"caption-attachment-932\" class=\"wp-caption-text\">Figure 4: Expected goals from Philippe Coutinho passes<\/p><\/div>\n<\/div>\n<div class=\"title\">&nbsp;<\/div>\n<\/div>\n<div class=\"paragraph\">\n<p>Or is he ? A little addendum, when I look to the positions that Neymars passes went into and the Expected Goal setting for each one of those shots taken after a Neymar pass, for me he should be the player of note.<\/p>\n<\/div>\n<div id=\"img-Neymar\" class=\"imageblock\">\n<div class=\"content\">&nbsp;<\/div>\n<div>\n<div id=\"attachment_937\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-937\" data-attachment-id=\"937\" data-permalink=\"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/fwc_2018_-_group_e_-_srb_v_bra_-_photo_039\/\" data-orig-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg?fit=512%2C384&amp;ssl=1\" data-orig-size=\"512,384\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039\" data-image-description=\"&lt;p&gt;Oleg Bkhambri (Voltmetro), CC BY-SA 3.0 &amp;lt;https:\/\/creativecommons.org\/licenses\/by-sa\/3.0&amp;gt;, via Wikimedia Commons&lt;\/p&gt;\n\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg?fit=300%2C225&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg?fit=512%2C384&amp;ssl=1\" class=\"wp-image-937 size-medium\" src=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg?resize=300%2C225\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/FWC_2018_-_Group_E_-_SRB_v_BRA_-_Photo_039.jpg?w=512&amp;ssl=1 512w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-937\" class=\"wp-caption-text\">FWC 2018 &#8211; Group E &#8211; SRB v BRA Neymar Jr<\/p><\/div>\n<\/div>\n<div class=\"title\">&nbsp;<\/div>\n<\/div>\n<div id=\"img-topthreesp\" class=\"imageblock\">\n<div>\n<div id=\"attachment_930\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-930\" data-attachment-id=\"930\" data-permalink=\"https:\/\/miguelpdl.com\/weblog\/mini-challenge-plotting-actions-of-an-assister\/scatterplot-shotsfrompasses\/\" data-orig-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?fit=1920%2C1440&amp;ssl=1\" data-orig-size=\"1920,1440\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"scatterplot-shotsfrompasses\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?fit=300%2C225&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?fit=1024%2C768&amp;ssl=1\" class=\"wp-image-930 size-large\" src=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?resize=1024%2C768\" alt=\"\" width=\"1024\" height=\"768\" srcset=\"https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?resize=768%2C576&amp;ssl=1 768w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?resize=1536%2C1152&amp;ssl=1 1536w, https:\/\/i0.wp.com\/miguelpdl.com\/weblog\/wp-content\/uploads\/2021\/03\/scatterplot-shotsfrompasses.png?w=1920&amp;ssl=1 1920w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><p id=\"caption-attachment-930\" class=\"wp-caption-text\">Figure 5: Scatter plot of expected goals from Top 3 player passes<\/p><\/div>\n<\/div>\n<\/div>\n<div class=\"content\">&nbsp;<\/div>\n<div class=\"paragraph\">\n<p>A large number of Neymars assists for a shot are close to the goal (120 is the goal line) and central to the goal (40 is the centre of the goal).<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_code_snippets\">Code snippets<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>I also want to share some of the code snippets that helped gather the data from Statsbomb in regards to this challenge.<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_extracting_data_from_competitions_json\">Extracting data from competitions.json<\/h3>\n<div class=\"paragraph\">\n<p>I found it handy to extract the <code>season_id<\/code> from the <code>competitions.json<\/code> file and using this to find all the matches with teams I was interested in. This also helped to identify which matches in the events folder had to be picked up.<\/p>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_the_assisted_shot_id\">The Assisted Shot Id<\/h3>\n<div class=\"paragraph\">\n<p>When iterating through the passes finding the <code>pass_assisted_shot_id<\/code> was very handy, but there was a bit that stumped me for a while when a pass didn\u2019t turn into an assisted shot then that id is set as NaN or not a number, which is a little off putting at first.<br \/>\nThere are also times when there are duplicate entries for the <code>pass_assisted_shot_id<\/code> for related events which in one iteration of this code had Kieran Trippier (England) with 37 actions.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-python\" data-lang=\"python\">        #Find passes with pass_assisted_shot_id set\n        if isinstance(passasid, str):\n            #If the pass_assisted_shot_id is a nan (Not a Number) then\n            # we don't want it. Usually the assisted_shot_id is some hex value\n            playersAsisstingShotsOnGoal.append(tpassplayerdir)<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_finding_the_expected_goal_data_for_the_related_shot_from_a_pass\">Finding the Expected Goal data for the related shot from a pass<\/h3>\n<div class=\"paragraph\">\n<p>Given that the dataframe of shots for the matches set\u2019s the index name as the Id of the event, well I took me a while to figure how to re-access that index name when doing a compare later on in the code. Of course it\u2019s simple when you see how with the <code>.name<\/code>.<\/p>\n<\/div>\n<div class=\"listingblock\">\n<div class=\"content\">\n<pre class=\"highlight\"><code class=\"language-python\" data-lang=\"python\">    for shotOnGoal in matchesShotsOnGoal:\n        if (shotOnGoal.name in assistedShotId):\n            x=shotOnGoal['location'][0]\n            y=shotOnGoal['location'][1]<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_acknowledgements\">Acknowledgements<\/h2>\n<div class=\"sectionbody\">\n<div class=\"paragraph\">\n<p>Thanks to feedback from Eoin O\u2019Brien, Eoin Slattery, Michael Kerley, Oliver Critchfield and David Sumpter as this has lead to a revision of the text and images.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of the first challenges of the Mathematical Modelling of Football lecturer series was to: Think of a player who you enjoyed watching at the recent Men\u2019s or Women\u2019s World Cups. What actions did they perform that were important and why? Plot the actions and describe how the data supports or contradicts your own analysis. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18,199],"tags":[208,210,211,209,22],"class_list":["post-927","post","type-post","status-publish","format-standard","hentry","category-football","category-mathematical-modelling-of-football","tag-208","tag-assist","tag-goal","tag-plot-actions","tag-world-cup"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7O9Cj-eX","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/posts\/927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/comments?post=927"}],"version-history":[{"count":2,"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/posts\/927\/revisions"}],"predecessor-version":[{"id":938,"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/posts\/927\/revisions\/938"}],"wp:attachment":[{"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/media?parent=927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/categories?post=927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/miguelpdl.com\/weblog\/wp-json\/wp\/v2\/tags?post=927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}