<?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: USA Men's 4x100m Gold Medal-Winning Freestyle Relay Times in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-USA-Men-s-4x100m-Gold-Medal-Winning/m-p/937377#M24848</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mens4x100FreestyleRelay.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98765i3078C806E79A46DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mens4x100FreestyleRelay.png" alt="Mens4x100FreestyleRelay.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First gold medal for Team USA! Enjoy the Olympics, all!&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: USA Men's 4x100m Freestyle Relay Stacked Bar Chart
  Source: olympics.com/en/paris-2024/results/swimming/men-s-4-x-100m-freestyle-relay/fnl-000100--;

proc import file="~/UsaMen4x100FreeRelay.xlsx" out=usa dbms=xlsx replace;  * Get data;

data usaswimmers;                                                          * Reshape data;
set usa; 
split='1st 50m'; splittime='50m'n; output;                                 * 50M split;
split='2nd 50m'; splittime='100m'n-'50m'n; output;                         * 100M split;                                                * Calc split times;

%SGANNO;                                                                   * Add photos using SAS macros;         
data swimmerpics;
%SGIMAGE (image="/home/ted.conway/JackAlexy.png",drawspace="DATAVALUE",xc1="Jack Alexy",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/ChrisGuiliano.png",drawspace="DATAVALUE",xc1="Chris Guiliano",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/HunterArmstrong.png",drawspace="DATAVALUE",xc1="Hunter Armstrong",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/CaelebDressel.png",drawspace="DATAVALUE",xc1="Caeleb Dressel",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");

ods graphics / noborder;                                                   * Stacked bar charts of each swimmer's times;
proc sgplot data=usaswimmers nowall noborder sganno=swimmerpics;           * Annotate each bar with swimmer's pic;
styleattrs datacolors=(cx05C3DD cx05D0EB) backcolor=gold;                  * Aqua bars, gold background; 
inset "USA Men's 4x100M Freestyle Relay Gold Medal-Winning Team (3:09.28)" / position=top textattrs=(size=12.75pt); 
vbar swimmer / response=splittime group=split datalabel datalabelattrs=(size=10.5pt) 
               seglabel seglabelformat=mmss7.2 seglabelattrs=(size=10.5pt); 
xaxis display=(nolabel)	 discreteorder=data; 
yaxis display=none tickvalueformat=mmss. offsetmax=.125; 
keylegend / title="" noborder noopaque; 
format splittime mmss7.2; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Input Data&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="365"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="109"&gt;Swimmer&lt;/TD&gt;
&lt;TD width="64"&gt;Reaction&lt;BR /&gt;Time&lt;/TD&gt;
&lt;TD width="64"&gt;50m&lt;/TD&gt;
&lt;TD width="64"&gt;100m&lt;/TD&gt;
&lt;TD width="64"&gt;Total&lt;BR /&gt;Time&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Jack Alexy&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.69&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:22.70&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.67&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.67&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Chris Guiliano&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.11&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:21.70&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.33&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1:35.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Hunter Armstrong&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.37&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:22.35&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:46.75&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2:21.75&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Caeleb Dressel&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.27&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:22.39&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.53&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;3:09.28&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Sun, 28 Jul 2024 07:22:02 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2024-07-28T07:22:02Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: USA Men's 4x100m Gold Medal-Winning Freestyle Relay Times</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-USA-Men-s-4x100m-Gold-Medal-Winning/m-p/937377#M24848</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mens4x100FreestyleRelay.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98765i3078C806E79A46DC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Mens4x100FreestyleRelay.png" alt="Mens4x100FreestyleRelay.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First gold medal for Team USA! Enjoy the Olympics, all!&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: USA Men's 4x100m Freestyle Relay Stacked Bar Chart
  Source: olympics.com/en/paris-2024/results/swimming/men-s-4-x-100m-freestyle-relay/fnl-000100--;

proc import file="~/UsaMen4x100FreeRelay.xlsx" out=usa dbms=xlsx replace;  * Get data;

data usaswimmers;                                                          * Reshape data;
set usa; 
split='1st 50m'; splittime='50m'n; output;                                 * 50M split;
split='2nd 50m'; splittime='100m'n-'50m'n; output;                         * 100M split;                                                * Calc split times;

%SGANNO;                                                                   * Add photos using SAS macros;         
data swimmerpics;
%SGIMAGE (image="/home/ted.conway/JackAlexy.png",drawspace="DATAVALUE",xc1="Jack Alexy",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/ChrisGuiliano.png",drawspace="DATAVALUE",xc1="Chris Guiliano",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/HunterArmstrong.png",drawspace="DATAVALUE",xc1="Hunter Armstrong",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");
%SGIMAGE (image="/home/ted.conway/CaelebDressel.png",drawspace="DATAVALUE",xc1="Caeleb Dressel",y1=0,height=9,heightunit="DATA",anchor="BOTTOM");

ods graphics / noborder;                                                   * Stacked bar charts of each swimmer's times;
proc sgplot data=usaswimmers nowall noborder sganno=swimmerpics;           * Annotate each bar with swimmer's pic;
styleattrs datacolors=(cx05C3DD cx05D0EB) backcolor=gold;                  * Aqua bars, gold background; 
inset "USA Men's 4x100M Freestyle Relay Gold Medal-Winning Team (3:09.28)" / position=top textattrs=(size=12.75pt); 
vbar swimmer / response=splittime group=split datalabel datalabelattrs=(size=10.5pt) 
               seglabel seglabelformat=mmss7.2 seglabelattrs=(size=10.5pt); 
xaxis display=(nolabel)	 discreteorder=data; 
yaxis display=none tickvalueformat=mmss. offsetmax=.125; 
keylegend / title="" noborder noopaque; 
format splittime mmss7.2; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Input Data&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE width="365"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="109"&gt;Swimmer&lt;/TD&gt;
&lt;TD width="64"&gt;Reaction&lt;BR /&gt;Time&lt;/TD&gt;
&lt;TD width="64"&gt;50m&lt;/TD&gt;
&lt;TD width="64"&gt;100m&lt;/TD&gt;
&lt;TD width="64"&gt;Total&lt;BR /&gt;Time&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Jack Alexy&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.69&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:22.70&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.67&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.67&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Chris Guiliano&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.11&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:21.70&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.33&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;1:35.00&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Hunter Armstrong&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.37&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:22.35&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:46.75&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;2:21.75&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="font-weight: 400;"&gt;Caeleb Dressel&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:00.27&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:22.39&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;0:47.53&lt;/TD&gt;
&lt;TD style="font-weight: 400;"&gt;3:09.28&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Sun, 28 Jul 2024 07:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-USA-Men-s-4x100m-Gold-Medal-Winning/m-p/937377#M24848</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2024-07-28T07:22:02Z</dc:date>
    </item>
  </channel>
</rss>

