Using Optical Tracking Data from Second Spectrum to Visualize Long Goal-scoring Build-ups
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.
Thanks to Major League Soccer and Second Spectrum, some of us lucky folks at American Soccer Analysis 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’s enlightening to see how these attacking teams move and exploit space to ultimately unlock the opposing defense.
Because I used {gridExtra}
to arrange each component of the visualizations, I’m constructing and exporting each individual frame as a still image. To speed things up, I took advantage of {doParallel}
and {foreach}
to distribute the workload. And in order for each process’s {ggsave}
call to be able to write to the same location, I had to set type = "cairo-png"
.
Finally, to stitch all the frames together into an MP4 file, I’m leveraging the {mapmate}
wrapper around the FFmpeg command line tool:
mapmate::ffmpeg(
dir = tile_save_path,
pattern = glue::glue("{save_file_prefix}_%06d.png"),
output_dir = gif_mp4_save_path,
output = glue::glue("{save_file_prefix}.mp4"),
rate = export_fps,
start = start_frame,
overwrite = TRUE
)
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.
August 15, 2021 | Nashville SC (2) - 1 D.C. United
Two weeks ago, #EveryoneN scored a lovely team goal. All 10 field players contributed to a 15-pass sequence, putting Nashville up 2-1.
— Tyler Richardett (@TylerRichardett) August 26, 2021
Thanks to @MLS and @SecondSpectrum, we @AnalysisEvolved get an aerial view of these special build-ups. They’re more common than you might think! pic.twitter.com/gqEUDqrLt1
August 21, 2021 | Columbus Crew 1 - (2) Seattle Sounders FC
More recently, a late-game winner from #Sounders was the product of 19 consecutive passes, a forced turnover immediately after the #Crew96 restart, and an effective long ball from #MLSAllStar captain Cristian Roldan. pic.twitter.com/muW7nIhU3x
— Tyler Richardett (@TylerRichardett) August 26, 2021
July 25, 2021 | Inter Miami CF 1 - (1) Philadelphia Union
This 27-pass sequence from #DOOP had a few quick switches in the #InterMiamiCF half and an impressive exchange between Sullivan and Gazdag at the top of the 18-yard box.
— Tyler Richardett (@TylerRichardett) August 26, 2021
But it was a poor pressing attempt from Gonzalo Higuaín that allowed Philadelphia to strike quickly. pic.twitter.com/e0POv6RV0S
July 17, 2021 | Toronto FC (1) - 0 Orlando City SC
#TFCLive scored their opener in July’s game against #VamosOrlando after stringing together 19 consecutive passes in under 50 seconds.
— Tyler Richardett (@TylerRichardett) August 26, 2021
Altidore’s link-up play also pulled Jansson well out of position and ultimately forced an aerial matchup against Moutinho. pic.twitter.com/wsqKem6QeM
July 3, 2021 | CF Montréal (1) - 0 Inter Miami CF
Side-to-side movement from #CFMTL seemed to lull #InterMiamiCF to sleep in this 22-pass sequence.
— Tyler Richardett (@TylerRichardett) August 26, 2021
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. pic.twitter.com/LQ5AcP1vOb
June 19, 2021 | FC Cincinnati 0 - (2) Colorado Rapids
#Rapids96 scored their goal on the road against #FCCincy after 16 consecutive passes.
— Tyler Richardett (@TylerRichardett) August 26, 2021
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. pic.twitter.com/MkFrhm5D9A
May 2, 2021 | Seattle Sounders FC (2) - 0 LA Galaxy
During week 3, #Sounders strung together 27 consecutive passes en route to Brad Smith’s second goal in two games.
— Tyler Richardett (@TylerRichardett) August 26, 2021
Seattle took advantage of the space out wide in their build-up, pulling the #LAGalaxy defense to one side while Smith floated in at the back post. pic.twitter.com/yqX6mbXVTk
November 22, 2020 | Minnesota United FC (3) - 0 Colorado Rapids
Leading up to their third goal in the opening round of last year’s playoffs, #MNUFC completed 24 consecutive passes.
— Tyler Richardett (@TylerRichardett) August 26, 2021
A smart run from Molino ultimately draws out a #Rapids96 center back, leaving Reynoso with plenty of space to drive forward as other Minnesota attackers join. pic.twitter.com/Z4PJLJzN3B
November 1, 2020 | Colorado Rapids (1) - 0 Seattle Sounders FC
This 17-pass sequence from #Rapids96 against #Sounders is a great illustration of absorbing the opponent’s press and striking quickly when space opens up.
— Tyler Richardett (@TylerRichardett) August 26, 2021
Price is fortunate not to turn the ball over to Ruidíaz in a very dangerous area, but Colorado makes no mistake afterward. pic.twitter.com/iU1mfssJ2e
October 14, 2020 | Vancouver Whitecaps FC (1) - 0 Los Angeles FC
Another example comes courtesy of #VWFC and their 19-pass sequence against #LAFC.
— Tyler Richardett (@TylerRichardett) August 26, 2021
With Vancouver inviting pressure from LAFC'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. pic.twitter.com/GLlMagCIeo
September 23, 2020 | Real Salt Lake (2) - 0 LA Galaxy
Against #LAGalaxy last September, #RSL put 17 consecutive passes together before doubling their lead.
— Tyler Richardett (@TylerRichardett) August 26, 2021
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. pic.twitter.com/yS35khkgCZ
August 26, 2020 | Orlando City SC (1) - 1 Nashville SC
And here, effective counter-pressing from #VamosOrlando deep in the #EveryoneN half yields 17 consecutive passes and an equalizer from Mueller.
— Tyler Richardett (@TylerRichardett) August 26, 2021
Controlled passing in tight quarters — particularly from Méndez — and a killer first-time ball from Pereyra make the difference. pic.twitter.com/CN1LqblkuY
Data: Second Spectrum