<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>American Soccer Analysis | Tyler Richardett</title><link>https://tylerrichardett.com/tag/american-soccer-analysis/</link><atom:link href="https://tylerrichardett.com/tag/american-soccer-analysis/index.xml" rel="self" type="application/rss+xml"/><description>American Soccer Analysis</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>© 2022 Tyler Richardett</copyright><lastBuildDate>Thu, 26 Aug 2021 00:00:00 +0000</lastBuildDate><image><url>https://tylerrichardett.com/media/logo_hu63450d64904b2806a1378e907e93ac54_121699_300x300_fit_lanczos_2.png</url><title>American Soccer Analysis</title><link>https://tylerrichardett.com/tag/american-soccer-analysis/</link></image><item><title>Using Optical Tracking Data from Second Spectrum to Visualize Long Goal-scoring Build-ups</title><link>https://tylerrichardett.com/blog/2021/08/26/using-optical-tracking-data-from-second-spectrum-to-visualize-long-goal-scoring-build-ups/</link><pubDate>Thu, 26 Aug 2021 00:00:00 +0000</pubDate><guid>https://tylerrichardett.com/blog/2021/08/26/using-optical-tracking-data-from-second-spectrum-to-visualize-long-goal-scoring-build-ups/</guid><description>&lt;p>Two weeks ago, Nashville SC scored a lovely team goal. All 10 field players contributed to a 15-pass sequence, putting Nashville up 2-1 over D.C. United.&lt;/p>
&lt;p>Thanks to &lt;a href="https://www.mlssoccer.com/" target="_blank" rel="noopener">Major League Soccer&lt;/a> and &lt;a href="https://www.secondspectrum.com/index.html" target="_blank" rel="noopener">Second Spectrum&lt;/a>, some of us lucky folks at &lt;a href="https://www.americansocceranalysis.com/" target="_blank" rel="noopener">American Soccer Analysis&lt;/a> have access to 2D tracking data for every regular season and playoff MLS game. Just by plotting each frame of these special goal-scoring sequences, it&amp;rsquo;s enlightening to see how these attacking teams move and exploit space to ultimately unlock the opposing defense.&lt;/p>
&lt;p>Because I used &lt;code>{gridExtra}&lt;/code> to arrange each component of the visualizations, I&amp;rsquo;m constructing and exporting each individual frame as a still image. To speed things up, I took advantage of &lt;code>{doParallel}&lt;/code> and &lt;code>{foreach}&lt;/code> to distribute the workload. And in order for each process&amp;rsquo;s &lt;code>{ggsave}&lt;/code> call to be able to write to the same location, I had to set &lt;code>type = &amp;quot;cairo-png&amp;quot;&lt;/code>.&lt;/p>
&lt;p>Finally, to stitch all the frames together into an MP4 file, I&amp;rsquo;m leveraging the &lt;code>{mapmate}&lt;/code> &lt;a href="https://leonawicz.github.io/mapmate/articles/ffmpeg.html" target="_blank" rel="noopener">wrapper&lt;/a> around the &lt;a href="https://www.ffmpeg.org/" target="_blank" rel="noopener">FFmpeg command line tool&lt;/a>:&lt;/p>
&lt;pre>&lt;code class="language-r">mapmate::ffmpeg(
dir = tile_save_path,
pattern = glue::glue(&amp;quot;{save_file_prefix}_%06d.png&amp;quot;),
output_dir = gif_mp4_save_path,
output = glue::glue(&amp;quot;{save_file_prefix}.mp4&amp;quot;),
rate = export_fps,
start = start_frame,
overwrite = TRUE
)
&lt;/code>&lt;/pre>
&lt;p>This content was originally developed as part of a Twitter thread, and each original tweet is embedded below. The videos are best viewed on desktop.&lt;/p>
&lt;h4 id="august-15-2021--nbspnbsp-nashville-sc-2---1-dc-united">August 15, 2021  |  Nashville SC (2) - 1 D.C. United&lt;/h4>
&lt;blockquote class="twitter-tweet">&lt;p lang="en" dir="ltr">Two weeks ago, &lt;a href="https://twitter.com/hashtag/EveryoneN?src=hash&amp;amp;ref_src=twsrc%5Etfw">#EveryoneN&lt;/a> scored a lovely team goal. All 10 field players contributed to a 15-pass sequence, putting Nashville up 2-1.&lt;br>&lt;br>Thanks to &lt;a href="https://twitter.com/MLS?ref_src=twsrc%5Etfw">@MLS&lt;/a> and &lt;a href="https://twitter.com/SecondSpectrum?ref_src=twsrc%5Etfw">@SecondSpectrum&lt;/a>, we &lt;a href="https://twitter.com/AnalysisEvolved?ref_src=twsrc%5Etfw">@AnalysisEvolved&lt;/a> get an aerial view of these special build-ups. They’re more common than you might think! &lt;a href="https://t.co/gqEUDqrLt1">pic.twitter.com/gqEUDqrLt1&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430980050220994561?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="august-21-2021--nbspnbsp-columbus-crew-1---2-seattle-sounders-fc">August 21, 2021  |  Columbus Crew 1 - (2) Seattle Sounders FC&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">More recently, a late-game winner from &lt;a href="https://twitter.com/hashtag/Sounders?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Sounders&lt;/a> was the product of 19 consecutive passes, a forced turnover immediately after the &lt;a href="https://twitter.com/hashtag/Crew96?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Crew96&lt;/a> restart, and an effective long ball from &lt;a href="https://twitter.com/hashtag/MLSAllStar?src=hash&amp;amp;ref_src=twsrc%5Etfw">#MLSAllStar&lt;/a> captain Cristian Roldan. &lt;a href="https://t.co/muW7nIhU3x">pic.twitter.com/muW7nIhU3x&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430980520452710400?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="july-25-2021--nbspnbsp-inter-miami-cf-1---1-philadelphia-union">July 25, 2021  |  Inter Miami CF 1 - (1) Philadelphia Union&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">This 27-pass sequence from &lt;a href="https://twitter.com/hashtag/DOOP?src=hash&amp;amp;ref_src=twsrc%5Etfw">#DOOP&lt;/a> had a few quick switches in the &lt;a href="https://twitter.com/hashtag/InterMiamiCF?src=hash&amp;amp;ref_src=twsrc%5Etfw">#InterMiamiCF&lt;/a> half and an impressive exchange between Sullivan and Gazdag at the top of the 18-yard box.&lt;br>&lt;br>But it was a poor pressing attempt from Gonzalo Higuaín that allowed Philadelphia to strike quickly. &lt;a href="https://t.co/e0POv6RV0S">pic.twitter.com/e0POv6RV0S&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430980932845154313?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="july-17-2021--nbspnbsp-toronto-fc-1---0-orlando-city-sc">July 17, 2021  |  Toronto FC (1) - 0 Orlando City SC&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">&lt;a href="https://twitter.com/hashtag/TFCLive?src=hash&amp;amp;ref_src=twsrc%5Etfw">#TFCLive&lt;/a> scored their opener in July’s game against &lt;a href="https://twitter.com/hashtag/VamosOrlando?src=hash&amp;amp;ref_src=twsrc%5Etfw">#VamosOrlando&lt;/a> after stringing together 19 consecutive passes in under 50 seconds.&lt;br>&lt;br>Altidore’s link-up play also pulled Jansson well out of position and ultimately forced an aerial matchup against Moutinho. &lt;a href="https://t.co/wsqKem6QeM">pic.twitter.com/wsqKem6QeM&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981203553886217?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="july-3-2021--nbspnbsp-cf-montréal-1---0-inter-miami-cf">July 3, 2021  |  CF Montréal (1) - 0 Inter Miami CF&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">Side-to-side movement from &lt;a href="https://twitter.com/hashtag/CFMTL?src=hash&amp;amp;ref_src=twsrc%5Etfw">#CFMTL&lt;/a> seemed to lull &lt;a href="https://twitter.com/hashtag/InterMiamiCF?src=hash&amp;amp;ref_src=twsrc%5Etfw">#InterMiamiCF&lt;/a> to sleep in this 22-pass sequence.&lt;br>&lt;br>And Toye’s run at 40:29 enables Quioto, Mihailović, and Choinière to turn and run hard at what’s left of Miami’s defense. &lt;a href="https://t.co/LQ5AcP1vOb">pic.twitter.com/LQ5AcP1vOb&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981269597343746?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="june-19-2021--nbspnbsp-fc-cincinnati-0---2-colorado-rapids">June 19, 2021  |  FC Cincinnati 0 - (2) Colorado Rapids&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">&lt;a href="https://twitter.com/hashtag/Rapids96?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Rapids96&lt;/a> scored their goal on the road against &lt;a href="https://twitter.com/hashtag/FCCincy?src=hash&amp;amp;ref_src=twsrc%5Etfw">#FCCincy&lt;/a> after 16 consecutive passes.&lt;br>&lt;br>Cruz and Kubo simultaneously apply pressure to the ball, leaving Price with plenty of space to drive at the Cincinnati defense and play an incisive pass toward Lewis. &lt;a href="https://t.co/MkFrhm5D9A">pic.twitter.com/MkFrhm5D9A&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981323443822601?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="may-2-2021--nbspnbsp-seattle-sounders-fc-2---0-la-galaxy">May 2, 2021  |  Seattle Sounders FC (2) - 0 LA Galaxy&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">During week 3, &lt;a href="https://twitter.com/hashtag/Sounders?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Sounders&lt;/a> strung together 27 consecutive passes en route to Brad Smith’s second goal in two games.&lt;br>&lt;br>Seattle took advantage of the space out wide in their build-up, pulling the &lt;a href="https://twitter.com/hashtag/LAGalaxy?src=hash&amp;amp;ref_src=twsrc%5Etfw">#LAGalaxy&lt;/a> defense to one side while Smith floated in at the back post. &lt;a href="https://t.co/yqX6mbXVTk">pic.twitter.com/yqX6mbXVTk&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981390254977024?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="november-22-2020--nbspnbsp-minnesota-united-fc-3---0-colorado-rapids">November 22, 2020  |  Minnesota United FC (3) - 0 Colorado Rapids&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">Leading up to their third goal in the opening round of last year’s playoffs, &lt;a href="https://twitter.com/hashtag/MNUFC?src=hash&amp;amp;ref_src=twsrc%5Etfw">#MNUFC&lt;/a> completed 24 consecutive passes.&lt;br>&lt;br>A smart run from Molino ultimately draws out a &lt;a href="https://twitter.com/hashtag/Rapids96?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Rapids96&lt;/a> center back, leaving Reynoso with plenty of space to drive forward as other Minnesota attackers join. &lt;a href="https://t.co/Z4PJLJzN3B">pic.twitter.com/Z4PJLJzN3B&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981455371456518?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="november-1-2020--nbspnbsp-colorado-rapids-1---0-seattle-sounders-fc">November 1, 2020  |  Colorado Rapids (1) - 0 Seattle Sounders FC&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">This 17-pass sequence from &lt;a href="https://twitter.com/hashtag/Rapids96?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Rapids96&lt;/a> against &lt;a href="https://twitter.com/hashtag/Sounders?src=hash&amp;amp;ref_src=twsrc%5Etfw">#Sounders&lt;/a> is a great illustration of absorbing the opponent’s press and striking quickly when space opens up.&lt;br>&lt;br>Price is fortunate not to turn the ball over to Ruidíaz in a very dangerous area, but Colorado makes no mistake afterward. &lt;a href="https://t.co/iU1mfssJ2e">pic.twitter.com/iU1mfssJ2e&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981533452615684?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="october-14-2020--nbspnbsp-vancouver-whitecaps-fc-1---0-los-angeles-fc">October 14, 2020  |  Vancouver Whitecaps FC (1) - 0 Los Angeles FC&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">Another example comes courtesy of &lt;a href="https://twitter.com/hashtag/VWFC?src=hash&amp;amp;ref_src=twsrc%5Etfw">#VWFC&lt;/a> and their 19-pass sequence against &lt;a href="https://twitter.com/hashtag/LAFC?src=hash&amp;amp;ref_src=twsrc%5Etfw">#LAFC&lt;/a>.&lt;br>&lt;br>With Vancouver inviting pressure from LAFC&amp;#39;s forwards, Rossi and BWP commit, Bush breaks the first line with a pass to Bikel, Bikel finds Dájome with a long ball, and Vancouver is off to the races. &lt;a href="https://t.co/GLlMagCIeo">pic.twitter.com/GLlMagCIeo&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981598380498956?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="september-23-2020--nbspnbsp-real-salt-lake-2---0-la-galaxy">September 23, 2020  |  Real Salt Lake (2) - 0 LA Galaxy&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">Against &lt;a href="https://twitter.com/hashtag/LAGalaxy?src=hash&amp;amp;ref_src=twsrc%5Etfw">#LAGalaxy&lt;/a> last September, &lt;a href="https://twitter.com/hashtag/RSL?src=hash&amp;amp;ref_src=twsrc%5Etfw">#RSL&lt;/a> put 17 consecutive passes together before doubling their lead.&lt;br>&lt;br>After a switch from Glad, smart running from Baird and Rusnák draws out LA’s right back — leaving Rusnák with ample space and time to find Kreilach alone at the penalty spot. &lt;a href="https://t.co/yS35khkgCZ">pic.twitter.com/yS35khkgCZ&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981663123779589?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;h4 id="august-26-2020--nbspnbsp-orlando-city-sc-1---1-nashville-sc">August 26, 2020  |  Orlando City SC (1) - 1 Nashville SC&lt;/h4>
&lt;blockquote class="twitter-tweet" data-conversation="none">&lt;p lang="en" dir="ltr">And here, effective counter-pressing from &lt;a href="https://twitter.com/hashtag/VamosOrlando?src=hash&amp;amp;ref_src=twsrc%5Etfw">#VamosOrlando&lt;/a> deep in the &lt;a href="https://twitter.com/hashtag/EveryoneN?src=hash&amp;amp;ref_src=twsrc%5Etfw">#EveryoneN&lt;/a> half yields 17 consecutive passes and an equalizer from Mueller.&lt;br>&lt;br>Controlled passing in tight quarters — particularly from Méndez — and a killer first-time ball from Pereyra make the difference. &lt;a href="https://t.co/CN1LqblkuY">pic.twitter.com/CN1LqblkuY&lt;/a>&lt;/p>&amp;mdash; Tyler Richardett (@TylerRichardett) &lt;a href="https://twitter.com/TylerRichardett/status/1430981724054360066?ref_src=twsrc%5Etfw">August 26, 2021&lt;/a>&lt;/blockquote> &lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;p>&lt;em>Data: Second Spectrum&lt;/em>&lt;/p></description></item><item><title>Building a New In-Game Win Probability Model for American Soccer Analysis</title><link>https://tylerrichardett.com/blog/2021/07/19/building-a-new-in-game-win-probability-model-for-american-soccer-analysis/</link><pubDate>Mon, 19 Jul 2021 00:00:00 +0000</pubDate><guid>https://tylerrichardett.com/blog/2021/07/19/building-a-new-in-game-win-probability-model-for-american-soccer-analysis/</guid><description>&lt;p>Across recent weeks, we’ve set out to improve the performance of our in-game win probability model, while:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>starting to take each team’s strength into account, based on its performance in prior games; and&lt;/p>
&lt;/li>
&lt;li>
&lt;p>introducing more fluctuation between goal-scoring events, to better reflect teams’ chance creation throughout the game.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>In this article, we’ll cover our methods for accomplishing those goals, how we plan to use this new and improved model, and how deconstructing that model can teach us more about the conditions under which goal-scoring events occur.&lt;/p>
&lt;p>&lt;em>Read the remainder of this post on &lt;a href="https://www.americansocceranalysis.com/home/2021/7/16/we-have-a-new-win-probability-model" target="_blank" rel="noopener">American Soccer Analysis&lt;/a>.&lt;/em>&lt;/p></description></item></channel></rss>