<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Fun With SAS ODS Graphics: 2025 NFL Draft Picks At-A-Glance in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2025-NFL-Draft-Picks-At-A-Glance/m-p/965479#M25475</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025_NFL_DRAFT_PICKS.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106628i86C5B425D13099B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025_NFL_DRAFT_PICKS.png" alt="2025_NFL_DRAFT_PICKS.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using &lt;A href="https://www.espn.com/nfl/draft/rounds" target="_self"&gt;2025 NFL Draft data&lt;/A&gt;, here's a SAS ODS Graphics scatter + box plot of all 257 draft picks by position. A version with interactive tool tips containing some info on all draftees can be &lt;A href="https://tedconway.github.io/Misc/nfldraft2025.html" target="_self"&gt;found on GitHub Pages&lt;/A&gt;. Go [&lt;EM&gt;your team here&lt;/EM&gt;]!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: 2025 NFL Draft Picks At-A-Glance
  Data from sportingnews.com/us/nfl/news/nfl-draft-picks-2025-live-results/1df59786e708218d8793ee67,
            espn.com/nfl/draft/rounds, nfl.com/draft/tracker/picks/1/1/2025;
            
proc import datafile='/home/ted.conway/NFL_DRAFT_PICKS_2025.xlsx' out=nflpicks dbms=xlsx replace; * Get data (was copied/pasted/tweaked in Excel);

proc sql;                                             * Split up composite field into individual fields;                                                    
create table nflpicks2a as
select round as Round, roundpick as RoundPick, overallpick as OverallPick, team as Team, scan(playerpositionschool,1,',') as Player, 
scan(playerpositionschool,2,',') as Position, scan(playerpositionschool,3,',') as School
from nflpicks p;
                                                      * Calc total # players at each position;
create table nflpicks2b as
select p.*, tot.players 
from nflpicks2a p
left join (select position, count(*) as players from nflpicks2a group by 1) tot on p.position=tot.position;
                                                      * Highlight top picks for each position (and one unexpectedly late pick!);
create table nflpicks2 as 
select n.*, case when toppick is not null or player='Shedeur Sanders' then trim(player)||' '||cats('(',school,')') end as topplayer
from nflpicks2b n 
left join (select position, min(overallpick) as toppick from nflpicks2b group by 1) p on n.overallpick=toppick
order by players desc;
                                                      * Calc xaxis points for reference lines for beginning of each round; 
select overallpick into :reflines separated by ' ' from nflpicks2 where roundpick=1 and overallpick&amp;gt;1 order by 1;  

proc sort data=nflpicks2 out=nflpicks3; 
by overallpick;
                                                      * Calc positions for Round 1 ... Round 7 headers at top of chart (x2axis);
data rounds(keep=round overallpick);                  * Figure out overall draft # for first pick in each round;
set nflpicks3 end=eof;
n=_n_;
if roundpick=1 or eof;                                * Also keep overall draft # of last pick;

data midpoints(keep=midpoint);                        * Calc midpoints of round picks for "ROUND N" x2axis headings;
set rounds end=eof;
lagr=lag(round);
lagp=lag(overallpick);
if lagr=. then midpoint=0;                            * First point on x2axis;                
else midpoint=lagp+(overallpick-lagp)/2;              * Points for "ROUND N" headings (N=1-7);
output;
if eof; midpoint=overallpick; output;                 * Last point on x2axis (last draft pick #);

proc sql;                                             * Save x2axis values for proc sgplot;
select distinct midpoint into :midpoints  separated by ' ' from midpoints order by 1;

ods html5 path='/home/ted.conway/nfldraft2025' body='nfldraft2025.html' options(bitmap_mode="inline");
ods graphics / reset imagemap=on height=9in width=16in imagefmt=png noborder imagename='NFLDRAFT2025'; 

proc sgplot data=nflpicks2 noautolegend;
title height=14pt bold '2025 NFL DRAFT PICKS';
hbox overallpick / group=position fillattrs=(transparency=.6) category=position Fill noOutliers nomean lineattrs=(thickness=0); * Box plot to show distributions/quartiles;
scatter x=overallpick y=position / x2axis markerattrs=(symbol=circle size=7pt) tip=(overallpick round RoundPick player position school team);  * Scatter plot of individual picks with tooltips;
scatter x=overallpick y=position / markerattrs=(symbol=circle size=0pt) datalabel=topplayer datalabelattrs=(size=9pt); * Scatter plot to display names of top picks;
yaxis discreteorder=data display=none;                 * y-axis is player positions;
yaxistable position / position=left label="POS" labelattrs=(size=9pt) valueattrs=(size=9pt) labeljustify=left;
yaxistable players / position=left stat=MEAN label='#' labelattrs=(size=9pt) valueattrs=(size=9pt);
xaxis label='OVERALL DRAFT PICK';                      * x-axis is overall draft pick numbers;
x2axis display=(noline noticks nolabel) valueattrs=(size=9pt) values=(&amp;amp;midpoints) valuesdisplay=('' 'ROUND 1' 'ROUND 2' 'ROUND 3' 'ROUND 4' 'ROUND 5' 'ROUND 6' 'ROUND 7' ''); * Show Round headings at top on x2axis;
refline &amp;amp;reflines / axis=x;                            * Show reference lines at beginning of each round;
run;
ods html5 close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAMPLE DATA&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025_NFL_DRAFT_PICKS_DATA.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106630i0BDC4CBBDCA9613F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025_NFL_DRAFT_PICKS_DATA.png" alt="2025_NFL_DRAFT_PICKS_DATA.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;HTML5 Version With Tooltips&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025_NFL_DRAFT_PICKS_TOOL_TIPS.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106629iA404302C28D6DFEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025_NFL_DRAFT_PICKS_TOOL_TIPS.png" alt="2025_NFL_DRAFT_PICKS_TOOL_TIPS.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 May 2025 07:47:29 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2025-05-01T07:47:29Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: 2025 NFL Draft Picks At-A-Glance</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2025-NFL-Draft-Picks-At-A-Glance/m-p/965479#M25475</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025_NFL_DRAFT_PICKS.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106628i86C5B425D13099B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025_NFL_DRAFT_PICKS.png" alt="2025_NFL_DRAFT_PICKS.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using &lt;A href="https://www.espn.com/nfl/draft/rounds" target="_self"&gt;2025 NFL Draft data&lt;/A&gt;, here's a SAS ODS Graphics scatter + box plot of all 257 draft picks by position. A version with interactive tool tips containing some info on all draftees can be &lt;A href="https://tedconway.github.io/Misc/nfldraft2025.html" target="_self"&gt;found on GitHub Pages&lt;/A&gt;. Go [&lt;EM&gt;your team here&lt;/EM&gt;]!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Fun With SAS ODS Graphics: 2025 NFL Draft Picks At-A-Glance
  Data from sportingnews.com/us/nfl/news/nfl-draft-picks-2025-live-results/1df59786e708218d8793ee67,
            espn.com/nfl/draft/rounds, nfl.com/draft/tracker/picks/1/1/2025;
            
proc import datafile='/home/ted.conway/NFL_DRAFT_PICKS_2025.xlsx' out=nflpicks dbms=xlsx replace; * Get data (was copied/pasted/tweaked in Excel);

proc sql;                                             * Split up composite field into individual fields;                                                    
create table nflpicks2a as
select round as Round, roundpick as RoundPick, overallpick as OverallPick, team as Team, scan(playerpositionschool,1,',') as Player, 
scan(playerpositionschool,2,',') as Position, scan(playerpositionschool,3,',') as School
from nflpicks p;
                                                      * Calc total # players at each position;
create table nflpicks2b as
select p.*, tot.players 
from nflpicks2a p
left join (select position, count(*) as players from nflpicks2a group by 1) tot on p.position=tot.position;
                                                      * Highlight top picks for each position (and one unexpectedly late pick!);
create table nflpicks2 as 
select n.*, case when toppick is not null or player='Shedeur Sanders' then trim(player)||' '||cats('(',school,')') end as topplayer
from nflpicks2b n 
left join (select position, min(overallpick) as toppick from nflpicks2b group by 1) p on n.overallpick=toppick
order by players desc;
                                                      * Calc xaxis points for reference lines for beginning of each round; 
select overallpick into :reflines separated by ' ' from nflpicks2 where roundpick=1 and overallpick&amp;gt;1 order by 1;  

proc sort data=nflpicks2 out=nflpicks3; 
by overallpick;
                                                      * Calc positions for Round 1 ... Round 7 headers at top of chart (x2axis);
data rounds(keep=round overallpick);                  * Figure out overall draft # for first pick in each round;
set nflpicks3 end=eof;
n=_n_;
if roundpick=1 or eof;                                * Also keep overall draft # of last pick;

data midpoints(keep=midpoint);                        * Calc midpoints of round picks for "ROUND N" x2axis headings;
set rounds end=eof;
lagr=lag(round);
lagp=lag(overallpick);
if lagr=. then midpoint=0;                            * First point on x2axis;                
else midpoint=lagp+(overallpick-lagp)/2;              * Points for "ROUND N" headings (N=1-7);
output;
if eof; midpoint=overallpick; output;                 * Last point on x2axis (last draft pick #);

proc sql;                                             * Save x2axis values for proc sgplot;
select distinct midpoint into :midpoints  separated by ' ' from midpoints order by 1;

ods html5 path='/home/ted.conway/nfldraft2025' body='nfldraft2025.html' options(bitmap_mode="inline");
ods graphics / reset imagemap=on height=9in width=16in imagefmt=png noborder imagename='NFLDRAFT2025'; 

proc sgplot data=nflpicks2 noautolegend;
title height=14pt bold '2025 NFL DRAFT PICKS';
hbox overallpick / group=position fillattrs=(transparency=.6) category=position Fill noOutliers nomean lineattrs=(thickness=0); * Box plot to show distributions/quartiles;
scatter x=overallpick y=position / x2axis markerattrs=(symbol=circle size=7pt) tip=(overallpick round RoundPick player position school team);  * Scatter plot of individual picks with tooltips;
scatter x=overallpick y=position / markerattrs=(symbol=circle size=0pt) datalabel=topplayer datalabelattrs=(size=9pt); * Scatter plot to display names of top picks;
yaxis discreteorder=data display=none;                 * y-axis is player positions;
yaxistable position / position=left label="POS" labelattrs=(size=9pt) valueattrs=(size=9pt) labeljustify=left;
yaxistable players / position=left stat=MEAN label='#' labelattrs=(size=9pt) valueattrs=(size=9pt);
xaxis label='OVERALL DRAFT PICK';                      * x-axis is overall draft pick numbers;
x2axis display=(noline noticks nolabel) valueattrs=(size=9pt) values=(&amp;amp;midpoints) valuesdisplay=('' 'ROUND 1' 'ROUND 2' 'ROUND 3' 'ROUND 4' 'ROUND 5' 'ROUND 6' 'ROUND 7' ''); * Show Round headings at top on x2axis;
refline &amp;amp;reflines / axis=x;                            * Show reference lines at beginning of each round;
run;
ods html5 close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAMPLE DATA&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025_NFL_DRAFT_PICKS_DATA.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106630i0BDC4CBBDCA9613F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025_NFL_DRAFT_PICKS_DATA.png" alt="2025_NFL_DRAFT_PICKS_DATA.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;HTML5 Version With Tooltips&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025_NFL_DRAFT_PICKS_TOOL_TIPS.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/106629iA404302C28D6DFEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2025_NFL_DRAFT_PICKS_TOOL_TIPS.png" alt="2025_NFL_DRAFT_PICKS_TOOL_TIPS.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 May 2025 07:47:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2025-NFL-Draft-Picks-At-A-Glance/m-p/965479#M25475</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2025-05-01T07:47:29Z</dc:date>
    </item>
  </channel>
</rss>

