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

Super Bowl LVI QB MatchupSuper Bowl LVI QB Matchup

 

Super Bowl LVI quarterback boxplot matchup (more QB stats for Joe Burrow and Matthew Stafford at NFL.com).

 

SAS CODE

 

* Fun With SAS ODS Graphics: Super Bowl LVI QB Boxplot Tale of the Tape (Burrow vs. Stafford)
  Football markers courtesy of Bruno Landowski thenounproject.com/icon/football-243375/;

proc import file='/home/ted.conway/QBLVI.xlsx' dbms=xlsx out=qb replace; * Grab 2021 regular/postseason QB stats (copied-and-pasted from NFL.com); 

%SGANNO;  * Anotate chart with NFL.com potos of Burrow, Stafford using SAS-provided macros;         
data qbpics;
%SGIMAGE (image="/home/ted.conway/burrow.jpg",drawspace="DATAVALUE",xc1="Joe Burrow",y1=-10,height=140,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/stafford.jpg",drawspace="DATAVALUE",xc1="Matthew Stafford",y1=-10,height=140,heightunit="DATA",anchor="BOTTOM");

proc sgplot data=qb noautolegend sganno=qbpics;  * Annotated box + scatter plot of passing yardage in each game of 2021 season; 
inset "SUPER BOWL LVI" / textattrs=(size=14pt weight=bold) position=top;
symbolimage name=football image='/home/ted.conway/football.png'; * Use football image for scatterplot markers;
scatter y=YDS x=QB / markerattrs=(symbol=football size=24pt); * Markers with passing yards in each of the 2021 games (pre- and post-season);
vbox YDS / category=QB boxwidth=.25 nofill meanattrs=(color=red symbol=diamondfilled); * Boxplot to show distributions (quartiles + mean);
xaxis grid display=(nolabel) discreteorder=data; 
yaxis display=all label="PASSING YARDS IN EACH 2021 REGULAR/POSTSEASON GAME" min=-15 offsetmin=0;
inset "QB MATCHUP" / textattrs=(size=12pt weight=bold) position=bottom;
run;

 

 

DATA SCREENSHOT (DATA SOURCE: NFL.COM)

QB Data Sample (Source: NFL.comQB Data Sample (Source: NFL.com

 

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
  • 946 views
  • 6 likes
  • 1 in conversation