<?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: 2024 Emmy Nominee Odds &amp;amp; Probabilities in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944001#M25030</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emmys2024.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100365iB0DB0A217F435E05/image-size/large?v=v2&amp;amp;px=999" role="button" title="emmys2024.png" alt="emmys2024.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Emmy Awards are tonight, so tweaked some old SAS ODS Graphics code and &lt;A href="https://www.yahoo.com/entertainment/primetime-emmy-predictions-2024-final-160032406.html" target="_self"&gt;grabbed some data from Yahoo&lt;/A&gt; to chart the nominees' chances of winning. &lt;A href="https://tedconway.github.io/Misc/emmys2024.html" target="_self"&gt;Full output for all 25 award categories&lt;/A&gt; on GitHub.&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: 2024 Emmy Nominee Odds &amp;amp; Probabilities
  Data soure: yahoo.com/entertainment/primetime-emmy-predictions-2024-final-160032406.html
  Odds-to-probability calc from en.wikipedia.org/wiki/Mathematics_of_bookmaking;
  
data emmys;                                                             * Read in data;
length category award nominee odds $ 255.; 
retain category award; 
retain minx .005 maxX .295;                                             * X-axis positions for nominee, odds;
infile '~/Emmys2024Odds.txt';
input;
if verify(_infile_,'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=0 then                 /* Category header? */ 
  do; category=_infile_; delete; end;
if not(index(_infile_,'/')&amp;gt;0 and find(_infile_,' - ')&amp;gt;0) then           /* Award header? */
  do; award=_infile_; seq=0; delete; end;
seq+1;                                                                  * Process nominee odds;
seqx=put(seq,z2.);                                                      * Maintain nominee sequence order;
nominee=substr(_infile_,1,find(_infile_,' - ')-1);                      * Grab nominee;
odds=substr(_infile_,find(_infile_,' - ')+3);                           * Grab odds;
probability=scan(odds,2,'/')/(scan(odds,1,'/')+scan(odds,2,'/'));       * Calc probability;
nominee=trim(nominee)||', '||compress(put(probability,percent7.1),' '); * Append probability to nominee;
 
ods graphics / width=16in height=9in noborder outputfmt=svg;            * SVG format to make image scalable;
proc sgpanel data=emmys noautolegend des="2024 Emmy Awards";            * Draw charts for nine awards in a 3x3 grid on each page (25 awards total);   
panelby award / headerattrs=(weight=bold color=black) novarname nowall noheaderborder noborder rows=3 columns=3 headerbackcolor=white sparse skipemptycells; 
hbarparm category=seqx response=probability / nooutline fillattrs=(color=cXA8D8FF); * Bar chart with light blue bars;
text x=minX y=seqx text=nominee / position=right strip contributeoffsets=none textattrs=(size=9pt color=black) splitchar='|' splitpolicy=splitalways; * Text plot of nominee + probability (left-aligned over bars);
text x=maxX y=seqx text=odds / position=left strip contributeoffsets=none textattrs=(size=9pt color=black); * Text plot showing fractional odds (to the right of nominees);
rowaxis display=(nolabel novalues noticks noline);                      * Suppress most axis info, but show probabilities; 
colaxis display=(nolabel noticks) values=(0 .1 .2 .3) valuesdisplay=('0%' '10%' '20%' '30%') grid valueattrs=(size=8pt);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DETAIL&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bestcomedyseries.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100366iC940AED229832093/image-size/large?v=v2&amp;amp;px=999" role="button" title="bestcomedyseries.png" alt="bestcomedyseries.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 15 Sep 2024 18:28:08 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2024-09-15T18:28:08Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: 2024 Emmy Nominee Odds &amp; Probabilities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944001#M25030</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="emmys2024.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100365iB0DB0A217F435E05/image-size/large?v=v2&amp;amp;px=999" role="button" title="emmys2024.png" alt="emmys2024.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Emmy Awards are tonight, so tweaked some old SAS ODS Graphics code and &lt;A href="https://www.yahoo.com/entertainment/primetime-emmy-predictions-2024-final-160032406.html" target="_self"&gt;grabbed some data from Yahoo&lt;/A&gt; to chart the nominees' chances of winning. &lt;A href="https://tedconway.github.io/Misc/emmys2024.html" target="_self"&gt;Full output for all 25 award categories&lt;/A&gt; on GitHub.&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: 2024 Emmy Nominee Odds &amp;amp; Probabilities
  Data soure: yahoo.com/entertainment/primetime-emmy-predictions-2024-final-160032406.html
  Odds-to-probability calc from en.wikipedia.org/wiki/Mathematics_of_bookmaking;
  
data emmys;                                                             * Read in data;
length category award nominee odds $ 255.; 
retain category award; 
retain minx .005 maxX .295;                                             * X-axis positions for nominee, odds;
infile '~/Emmys2024Odds.txt';
input;
if verify(_infile_,'ABCDEFGHIJKLMNOPQRSTUVWXYZ')=0 then                 /* Category header? */ 
  do; category=_infile_; delete; end;
if not(index(_infile_,'/')&amp;gt;0 and find(_infile_,' - ')&amp;gt;0) then           /* Award header? */
  do; award=_infile_; seq=0; delete; end;
seq+1;                                                                  * Process nominee odds;
seqx=put(seq,z2.);                                                      * Maintain nominee sequence order;
nominee=substr(_infile_,1,find(_infile_,' - ')-1);                      * Grab nominee;
odds=substr(_infile_,find(_infile_,' - ')+3);                           * Grab odds;
probability=scan(odds,2,'/')/(scan(odds,1,'/')+scan(odds,2,'/'));       * Calc probability;
nominee=trim(nominee)||', '||compress(put(probability,percent7.1),' '); * Append probability to nominee;
 
ods graphics / width=16in height=9in noborder outputfmt=svg;            * SVG format to make image scalable;
proc sgpanel data=emmys noautolegend des="2024 Emmy Awards";            * Draw charts for nine awards in a 3x3 grid on each page (25 awards total);   
panelby award / headerattrs=(weight=bold color=black) novarname nowall noheaderborder noborder rows=3 columns=3 headerbackcolor=white sparse skipemptycells; 
hbarparm category=seqx response=probability / nooutline fillattrs=(color=cXA8D8FF); * Bar chart with light blue bars;
text x=minX y=seqx text=nominee / position=right strip contributeoffsets=none textattrs=(size=9pt color=black) splitchar='|' splitpolicy=splitalways; * Text plot of nominee + probability (left-aligned over bars);
text x=maxX y=seqx text=odds / position=left strip contributeoffsets=none textattrs=(size=9pt color=black); * Text plot showing fractional odds (to the right of nominees);
rowaxis display=(nolabel novalues noticks noline);                      * Suppress most axis info, but show probabilities; 
colaxis display=(nolabel noticks) values=(0 .1 .2 .3) valuesdisplay=('0%' '10%' '20%' '30%') grid valueattrs=(size=8pt);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;DETAIL&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bestcomedyseries.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/100366iC940AED229832093/image-size/large?v=v2&amp;amp;px=999" role="button" title="bestcomedyseries.png" alt="bestcomedyseries.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Sep 2024 18:28:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944001#M25030</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2024-09-15T18:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: 2024 Emmy Nominee Odds &amp; Probabilities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944058#M25034</link>
      <description>&lt;P&gt;And...Shogun really cleaned up! Thanks for the great visualization&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 12:05:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944058#M25034</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2024-09-16T12:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: 2024 Emmy Nominee Odds &amp; Probabilities</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944158#M25036</link>
      <description>&lt;P&gt;This is a great technique to simulate independent discrete axes in a PANEL layout using SGPANEL. Nice job!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 20:42:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Emmy-Nominee-Odds-amp/m-p/944158#M25036</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2024-09-16T20:42:47Z</dc:date>
    </item>
  </channel>
</rss>

