Fore!
The SAS Championship tees up this week, so here's a quick bar chart look at the course using PGA-provided data!
* Fun With SAS ODS Graphics: SAS Championship Course-At-A-Glance
Data source: pgatour.com/champions/tournaments/sas-championship/course.html;
FILENAME course url 'https://docs.google.com/spreadsheets/d/1widQUL7LsyodsdrJk8OPMpahhf84Bl88xvpprnOejAk/export?format=csv&gid=0';
proc import datafile=course out=course DBMS=CSV REPLACE; GETNAMES=Yes; DATAROW=2; * Grab SAS Championship course info from Google Sheets;
data logo; * Insert SAS Championship logo (source: Wikipedia);
%SGANNO; * SAS-provided annotation macros;
%SGIMAGE(image="/home/ted.conway/sas_championship_logo_wikipedia.png", drawspace="DATAVALUE", yc1="3", x1=545, width=215, widthunit="DATA");
proc sgplot data=course noborder sganno=logo; * Bar chart of yards by hole;
styleattrs datacolors=(cx00c060 cx00ff7f cx018141); * Use shades of green to distinguish par 4-3-5 holes;
hbar hole / name="bar" response=yards datalabel group=par grouporder=ascending nooutline baselineattrs=(thickness=0);
keylegend "bar" / location=inside position=bottomright across=1 title="PAR"; * Display par legend at lower right;
xaxis display=(noline noticks) label='Yards';
yaxis display=(noline noticks) label='Holes';
run;
It is interesting that for this course, the distances do not have a lot of variation when grouped by "par." The Par 3 holes are all ~200 yds, the Par 4 holes are 400 yds, and the Par 5 holes are > 500 yds:
proc sgplot data=course;
scatter x=Par y=Yards / datalabel=Hole group=Par;
run;
There are no holes on this course that are between 200-385 yds.
Tale of the Tape
Good observations, @Rick_SAS! Just out of curiosity, I dug up scorecard data for the Evergreen Golf & CC course (RIP) that I learned to golf on long ago as a teen ($3 18-hole twilight special, IIRC!) to chart how it measured up to the SAS Championship course. For the SAS Championship, the holes are apparently selected from more than one course at the Prestonwood CC and the tees are also likely set back further for the Pros than for mere mortals, which seems to help explain some of the differences in the distributions. According to the USGA, up to 260 yards can be par 3, 240-490 yards can be par 4, and 450-710 yards can be par 5.
FILENAME course url 'https://docs.google.com/spreadsheets/d/1widQUL7LsyodsdrJk8OPMpahhf84Bl88xvpprnOejAk/export?format=csv&gid=0';
proc import datafile=course out=course DBMS=CSV REPLACE; GETNAMES=Yes; DATAROW=2; * Grab SAS Championship course info from Google Sheets;
FILENAME course2 url 'https://docs.google.com/spreadsheets/d/1Jd2FNUU3xGL7K6oOIGW7CgE-hve3YdcRs-_j1Q10I6o/export?format=csv&gid=0';
proc import datafile=course2 out=course2 DBMS=CSV REPLACE; GETNAMES=Yes; DATAROW=2; * Grab Evergreen Park Golf & CC course info from Google Sheets;
data courses(drop=par rename=(parx=PAR)); * Merge course data;
set course(in=i1) course2;
if i1 then COURSE=' SAS Championship '; else course='Evergreen Park CC';
N=1; parx=put(par,1.)||' '; output; parx=' ALL'; output; * Output twice - once for par, once for 'All';
proc sort; by par course; * Report by par/course;
ods graphics / width=5in height=5in; * Box/scatter plot comparison of hole lengths by par/course;
proc sgpanel data=courses noautolegend;
panelby par / onepanel columns=1 sort=data;
hbox yards / category=course nooutliers nofill; * Box plot distribution of hole lengths;
scatter x=yards y=course / transparency=0 markerattrs=(symbol=circlefilled); * Scatter plot of individual hole lengths;
rowaxistable yards / stat=mean label='Avg' position=left; * Display mean hole length in yards;
rowaxistable N / label='N' position=left; * Display # of holes;
colaxis grid;
format yards 3.;
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.