BookmarkSubscribeRSS Feed
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

SuperBowlLX.png

   

The New England Patriots' Drake Maye squares up against the Seattle Seahawks' Sam Darnold Sunday in Super Bowl LX, so here's a boxplot scouting report comparing the pair's passing yardages for the 2025-26 season. Go [your team here]!

 

* Fun With SAS ODS Graphics: Super Bowl LX QB Boxplot Tale of the Tape (Maye vs. Darnold)
  Football markers courtesy of Bruno Landowski thenounproject.com/icon/football-243375/
  NFL QB stats/images courtesy of ESPN.com, Super Bowl LX logo courtesy of Wikipedia;

proc import file='~/superbowl_lx_qbs.xlsx' dbms=xlsx out=qb replace; * Grab 2025-26 regular and postseason QB stats (copied-and-pasted from ESPN.com); 
 
%SGANNO;     * Use SAS-provided macros to annotate chart with ESPN.com photos of Maye+Darnold and Super Bowl LX logo from Wikipedia;         
data qbpics;
%SGIMAGE (image="/home/ted.conway/drakemaye.png",drawspace="DATAVALUE",xc1="Drake Maye",y1=-38,height=112,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/samdarnold.png",drawspace="DATAVALUE",xc1="Sam Darnold",y1=-38,height=118,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/Super_Bowl_LX_Logo.svg.png",imagescale="fitheight",layer="back",drawspace="datapercent",x1=52,y1=50,height=418,anchor="center",transparency=.75);
  
proc sql;    * Add yard labels for only highest and lowest passing yardage games;
create table qb3 as select qb.*, case when yds=minyds or yds=maxyds then Yds end as Ydsminmax
from qb join (select qb, min(yds) as minYds, max(yds) as maxYds from qb group by 1) as qb2 on qb.qb=qb2.qb order by qb;

ods graphics / reset noborder imagefmt=svg; * Generate annotated box + scatter plots of passing yardage in each game of 2025-26 season (regular + playoffs); 
proc sgplot data=qb3 noautolegend sganno=qbpics noborder nowall;  
inset "SUPER BOWL LX" / textattrs=(size=15pt weight=bold) position=top;
symbolimage name=football image='/home/ted.conway/football.png'; * Use football image for scatterplot markers;
scatter y=YDS x=QB / datalabel=Ydsminmax datalabelpos=left datalabelattrs=(size=9pt color=black weight=bold) markerattrs=(symbol=football size=24pt) transparency=0; * Markers with passing yards in each game;
vbox YDS / category=QB boxwidth=.25 nofill meanattrs=(color=red symbol=diamondfilled) ; * Boxplot to show distributions (quartiles + mean);
xaxis display=(noline noticks nolabel) discreteorder=data valueattrs=(size=12pt color=black weight=bold); 
yaxis display=all label="PASSING YDS 2025-26 REGULAR SEASON + PLAYOFF GAMES" valueattrs=(weight=bold color=black) min=-40 offsetmin=0;
inset "QB" "PASSING" "MATCHUP" / valuealign=center textattrs=(size=14pt weight=bold) position=bottom;
run;

  

SCREENSHOT - INPUT DATA FROM ESPN.COM

DarnoldMayeStats.png

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 101 views
  • 2 likes
  • 1 in conversation