<?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 Grammy Nominees' Chances of Winning in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Grammy-Nominees-Chances-of/m-p/914448#M24295</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grammys.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93258i80FC4D385B117427/image-size/large?v=v2&amp;amp;px=999" role="button" title="grammys.png" alt="grammys.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Grammy Awards are tonight, so here's a short SAS ODS Graphics program to chart the nominees' chances of winning (&lt;A href="https://www.yahoo.com/entertainment/2024-grammy-predictions-official-odds-150050388.html" target="_self"&gt;input data&lt;/A&gt; from Yahoo,&amp;nbsp;&lt;A href="https://tedconway.github.io/Misc/grammys.html" target="_self"&gt;full output&lt;/A&gt;&amp;nbsp;for all 37 categories 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 Grammy Nominee Odds
  Data soure: yahoo.com/entertainment/2024-grammy-predictions-official-odds-150050388.html
  Odds-to-probability calc from en.wikipedia.org/wiki/Mathematics_of_bookmaking;
  
data nominees;                                                          * Read in data;
length probability 8. category nominee odds : $ 255.; retain minx .005 maxX .295 category;
infile "/home/ted.conway/GrammyOdds.txt" lrecl=255 truncover;
input;
if ^index(_infile_,'—') then do; seq=0; category=_infile_; delete; end; * Category Header?; 
seq+1;                                                                  * Process nominee odds;
seqx=put(seq,z2.);                                                      * Maintain nominee sequence order;
nominee=scan(_infile_,1,'—');                                           * Grab nominee and/or recording; 
odds=scan(_infile_,2,'—');                                              * Grab fractional odds;
probability=scan(odds,2,'/')/(scan(odds,1,'/')+scan(odds,2,'/'));       * Convert to probability (0-1);
output;

ods graphics / width=16in height=9in noborder outputfmt=svg;
proc sgpanel data=nominees noautolegend des="2024 Grammy Awards";       * Draw charts for 9 categories in a 3x3 grid on each page (37 categories);   
panelby category / 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 and/or recording (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&amp;nbsp;VIEW&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="grammysalbums.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93259i0CEA87ECA5014733/image-size/large?v=v2&amp;amp;px=999" role="button" title="grammysalbums.png" alt="grammysalbums.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CORRESPONDING DATA SNIPPET&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ALBUM OF THE YEAR
Taylor Swift, "Midnights" — 5/1
Boygenius, "The Record" — 5/1
SZA, "SOS" — 11/2
Jon Batiste, "World Music Radio" — 7/1
Olivia Rodrigo, "Guts" — 17/2
Lana Del Rey, "Did You Know That There's a Tunnel Under Ocean Blvd" — 17/2
Miley Cyrus, "Endless Summer Vacation" — 19/2
Janelle Monae, "The Age of Pleasure" — 10/1
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 04 Feb 2024 21:59:38 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2024-02-04T21:59:38Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: 2024 Grammy Nominees' Chances of Winning</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Grammy-Nominees-Chances-of/m-p/914448#M24295</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grammys.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93258i80FC4D385B117427/image-size/large?v=v2&amp;amp;px=999" role="button" title="grammys.png" alt="grammys.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Grammy Awards are tonight, so here's a short SAS ODS Graphics program to chart the nominees' chances of winning (&lt;A href="https://www.yahoo.com/entertainment/2024-grammy-predictions-official-odds-150050388.html" target="_self"&gt;input data&lt;/A&gt; from Yahoo,&amp;nbsp;&lt;A href="https://tedconway.github.io/Misc/grammys.html" target="_self"&gt;full output&lt;/A&gt;&amp;nbsp;for all 37 categories 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 Grammy Nominee Odds
  Data soure: yahoo.com/entertainment/2024-grammy-predictions-official-odds-150050388.html
  Odds-to-probability calc from en.wikipedia.org/wiki/Mathematics_of_bookmaking;
  
data nominees;                                                          * Read in data;
length probability 8. category nominee odds : $ 255.; retain minx .005 maxX .295 category;
infile "/home/ted.conway/GrammyOdds.txt" lrecl=255 truncover;
input;
if ^index(_infile_,'—') then do; seq=0; category=_infile_; delete; end; * Category Header?; 
seq+1;                                                                  * Process nominee odds;
seqx=put(seq,z2.);                                                      * Maintain nominee sequence order;
nominee=scan(_infile_,1,'—');                                           * Grab nominee and/or recording; 
odds=scan(_infile_,2,'—');                                              * Grab fractional odds;
probability=scan(odds,2,'/')/(scan(odds,1,'/')+scan(odds,2,'/'));       * Convert to probability (0-1);
output;

ods graphics / width=16in height=9in noborder outputfmt=svg;
proc sgpanel data=nominees noautolegend des="2024 Grammy Awards";       * Draw charts for 9 categories in a 3x3 grid on each page (37 categories);   
panelby category / 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 and/or recording (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&amp;nbsp;VIEW&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="grammysalbums.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93259i0CEA87ECA5014733/image-size/large?v=v2&amp;amp;px=999" role="button" title="grammysalbums.png" alt="grammysalbums.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CORRESPONDING DATA SNIPPET&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ALBUM OF THE YEAR
Taylor Swift, "Midnights" — 5/1
Boygenius, "The Record" — 5/1
SZA, "SOS" — 11/2
Jon Batiste, "World Music Radio" — 7/1
Olivia Rodrigo, "Guts" — 17/2
Lana Del Rey, "Did You Know That There's a Tunnel Under Ocean Blvd" — 17/2
Miley Cyrus, "Endless Summer Vacation" — 19/2
Janelle Monae, "The Age of Pleasure" — 10/1
...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Feb 2024 21:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-2024-Grammy-Nominees-Chances-of/m-p/914448#M24295</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2024-02-04T21:59:38Z</dc:date>
    </item>
  </channel>
</rss>

