<?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 Re: Fun w/ODS Graphics: Stacked Bar Chart of Women's 4x100m Freestyle Swimming Relay Final Results in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290612#M10251</link>
    <description>&lt;P&gt;Love these visualizations and not only because it shows the Gold medal Australian swimmers. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; I like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc﻿&lt;/a&gt;&amp;nbsp;how your visual also looks like the pool with the lanes, was that something you had in mind?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I like your splits comparison chart&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54﻿&lt;/a&gt;, although I think I'd prefer to see the fastest time figure at the end of the bar group for each split instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nice SASsy #dataviz work!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2016 03:45:29 GMT</pubDate>
    <dc:creator>MichelleHomes</dc:creator>
    <dc:date>2016-08-10T03:45:29Z</dc:date>
    <item>
      <title>Fun w/ODS Graphics: Stacked Bar Chart of Women's 4x100m Freestyle Swimming Relay Final Results</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290099#M10247</link>
      <description>&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4462iEBA9AE1E26061B78/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="swimmers.png" title="swimmers.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OK, finally got around to downloading the latest-and-greatest &lt;A href="http://www.sas.com/en_us/software/university-edition.html" target="_self"&gt;SAS University Edition&lt;/A&gt; to replace my expired version, and decided to take it for a spin by charting the results of Saturday's &lt;A href="https://www.rio2016.com/en/swimming-womens-4-x-100m-freestyle-relay-final" target="_self"&gt;Women's 4x100m Freestyle Swimming Relay Final&lt;/A&gt;.&amp;nbsp;If it looks familiar to some, that may be because it's pretty much a&amp;nbsp;horizontal take on the vertical &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2013/09/20/stacked-bar-chart-with-segment-labels/" target="_self"&gt;Stacked Bar Chart with Segment Labels&lt;/A&gt; from Sanjay Matange's Graphically Speaking blog post.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* Read in data for Women's 4x100m Freestyle Swimming Relay Final;

data swimmers(keep=rank lane abbr team swimmer leg reactiontime meter50time time low high mid);
length name team swimmer : $ 30 abbr $ 3; 
retain team abbr ' '; retain rank lane low high;
infile cards firstobs=3 missover dlm="," dsd;
input irank ilane name reactiontime : hhmmss. meter50time : hhmmss. time : hhmmss.;
if irank^=. then do; * Does line contain team info?;
  rank=irank;
  lane=ilane;
  abbr=substr(name,1,3);
  team=substr(name,4);
  leg=0;
  low=0;
  high=0;
  delete;
  end; 
swimmer=trim(name)||'*'||compress(put(time,mmss7.2),' '); * Append time to swimmer's name;
leg+1;
high+time;
mid=low+(high-low)/2; * Compute midpoint of swimmer's time (used to center name/time);
output;
low=high;
cards;
Source: https://www.rio2016.com/en/swimming-womens-4-x-100m-freestyle-relay-final
RANK,LANE,TEAM,REACTION TIME,50M,TIME
1,4,AUSAustralia,,,03:30.7
,,MCKEON Emma,0.76,25.67,53.41
,,ELMSLIE Brittany,0.21,25.59,53.12
,,CAMPBELL Bronte,0.22,24.47,52.15
,,CAMPBELL Cate,0.34,24.15,51.97
2,5,USAUnited States,,,03:31.9
,,MANUEL Simone,0.69,25.64,53.36
,,WEITZEIL Abbey,0.21,24.94,52.56
,,VOLLMER Dana,0.21,25.01,53.18
,,LEDECKY Kathleen,0.18,25.39,52.79
3,3,CANCanada,,,03:32.9
,,MAINVILLE Sandrine,0.64,25.85,53.86
,,VAN LANDEGHEM Chantal,0.17,25.23,53.12
,,RUCK Taylor Madison,0.2,25.15,53.19
,,OLEKSIAK Penny,0.13,25.29,52.72
4,2,NEDNetherlands,,,03:33.8
,,STEENBERGEN Marrit,0.86,26.28,54.29
,,HEEMSKERK Femke,0.16,25.06,53.47
,,DEKKER Inge,0.2,25.38,53.85
,,KROMOWIDJOJO Ranomi,0.25,24.73,52.2
5,7,SWESweden,,,03:35.9
,,COLEMAN Michelle,0.74,26.33,54.19
,,SJOSTROM Sarah,0.19,25.36,52.47
,,MARKO-VARGA Ida,0.37,26.29,54.7
,,HANSSON Louise,0.22,26.13,54.54
6,6,ITAItaly,,,03:36.8
,,FERRAIOLI Erika,0.72,26.17,55.21
,,DI PIETRO Silvia,0.17,25.38,53.69
,,PEZZATO Aglaia,0.1,25.61,53.99
,,PELLEGRINI Federica,0.18,26.02,53.89
7,8,FRAFrance,,,03:37.4
,,GASTALDELLO Beryl,0.68,26.58,54.83
,,BONNET Charlotte,0.13,25.57,53.17
,,CINI Mathilde,0.14,26.29,54.92
,,SANTAMANS Anna,0.13,25.89,54.53
8,1,JPNJapan,,,03:37.8
,,UCHIDA Miki,0.7,26.3,54.23
,,IKEE Rikako,0.41,25.79,53.98
,,YAMAGUCHI Misaki,0.23,26.27,55.11
,,MATSUMOTO Yayoi,0.31,26.12,54.46
;
&lt;BR /&gt;* Compute team and winning times, append to swimmer-level data;

proc sql;
create table teamtimes as select lane, sum(time) as teamtime from swimmers group by 1;
create table swimmers2plot as
select s.*, t.teamtime, w.winningtime, t.teamtime-w.winningtime as timebehind
from swimmers s, teamtimes t, (select min(teamtime) as winningtime from teamtimes) w where s.lane=t.lane;

* Chart data - highlow and text plot combo;

ods listing image_dpi=300 gpath='/folders/myfolders';
ods graphics on / reset antialias width=11in height=4.5in imagename="swimmers";
proc sgplot data=swimmers2plot noautolegend noborder;
title "Women's 4x100m Freestyle Swimming Relay Final";
highlow y=rank low=low high=high / group=leg type=bar barwidth=1 fill nooutline;
text y=rank x=mid text=swimmer / textattrs=(weight=bold color=white size=8pt) 
                                 splitpolicy=splitalways splitjustify=center splitchar="*";
yaxis display=(nolabel noticks novalues noline) reverse;
xaxis offsetmin=0 offsetmax=0 display=(nolabel noline) tickvalueformat=mmss8.2 valueattrs=(size=8pt);
yaxistable rank abbr / stat=mean nolabel position=left valueattrs=(size=8pt);
yaxistable teamtime / title="TIME" titleattrs=(size=8pt) stat=mean nolabel position=right valueattrs=(size=8pt);
yaxistable timebehind / title="DIFF" titleattrs=(size=8pt) stat=mean nolabel position=right valueattrs=(size=8pt);
refline winningtime / axis=x lineattrs=(pattern=dot color=white); * Winning time;
refline 1.5 2.5 3.5 4.5 5.5 6.5 7.5 / axis=y lineattrs=(pattern=dash thickness=3.5pt color=white); * "Lane markers";
format teamtime timebehind winningtime mmss8.2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 07:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290099#M10247</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2016-08-08T07:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/ODS Graphics: Stacked Bar Chart of Women's 4x100m Freestyle Swimming Relay Final Results</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290175#M10249</link>
      <description>&lt;P&gt;Wow -- this really shows you how&amp;nbsp;&lt;STRONG&gt;close&lt;/STRONG&gt; these times are, especially in the first couple of legs. &amp;nbsp;And it shows the importance of the anchor leg (final swimmer).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 13:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290175#M10249</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-08-08T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/ODS Graphics: Stacked Bar Chart of Women's 4x100m Freestyle Swimming Relay Final Results</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290207#M10250</link>
      <description>&lt;P&gt;Awesome. &amp;nbsp;Horizontal bar is more appropriate for this example. Clearly, Campbell made the difference&amp;nbsp;in the anchor leg.&lt;/P&gt;
&lt;P&gt;Also helps to see the data clustered by leg to see each contribution. &amp;nbsp;We could add the name of the swimmer, but I took the shortcut. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4469i988D4F42613E203B/image-size/medium?v=v2&amp;amp;px=-1" border="0" alt="swimmers_2.png" title="swimmers_2.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4470i50C09153A23E0F84/image-size/medium?v=v2&amp;amp;px=-1" border="0" alt="swimmers_3.png" title="swimmers_3.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 14:39:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290207#M10250</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2016-08-08T14:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Fun w/ODS Graphics: Stacked Bar Chart of Women's 4x100m Freestyle Swimming Relay Final Results</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290612#M10251</link>
      <description>&lt;P&gt;Love these visualizations and not only because it shows the Gold medal Australian swimmers. &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt; I like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc﻿&lt;/a&gt;&amp;nbsp;how your visual also looks like the pool with the lanes, was that something you had in mind?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I like your splits comparison chart&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54﻿&lt;/a&gt;, although I think I'd prefer to see the fastest time figure at the end of the bar group for each split instead.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nice SASsy #dataviz work!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2016 03:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-w-ODS-Graphics-Stacked-Bar-Chart-of-Women-s-4x100m-Freestyle/m-p/290612#M10251</guid>
      <dc:creator>MichelleHomes</dc:creator>
      <dc:date>2016-08-10T03:45:29Z</dc:date>
    </item>
  </channel>
</rss>

