<?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: 5-4-3-2-1 AP Exam Scores! in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/371535#M12837</link>
    <description>&lt;P&gt;&lt;STRONG&gt;SAS OUTPUT (&lt;A href="https://communities.sas.com/t5/image/serverpage/image-id/9956iF6C3C2DA8E6C6B2B/image-size/original?v=1.0&amp;amp;px=-1" target="_self"&gt;CLICK TO VIEW LARGER IMAGE&lt;/A&gt;)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/image/serverpage/image-id/9956iF6C3C2DA8E6C6B2B/image-size/original?v=1.0&amp;amp;px=-1" target="_self"&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9956iF6C3C2DA8E6C6B2B/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="2017APSCORES.gif" title="2017APSCORES.gif" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was wondering what might be a good way to plot the just-released&amp;nbsp;&lt;A href="https://www.totalregistration.net/AP-Exam-Registration-Service/2017-AP-Exam-Score-Distributions.php" target="_self"&gt;2017 AP Exam Score Distributions&lt;/A&gt; posted by Total Registration, when I stumbled across Robert Allison's fine&amp;nbsp;&lt;A href="http://blogs.sas.com/content/sastraining/2017/06/02/how-to-stack-the-deck-for-a-better-graph/" target="_self"&gt;How to 'stack the deck' for a better graph!&lt;/A&gt; Eureka!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAS CODE&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*-&amp;gt; Fun w/SAS ODS Graphics: 5-4-3-2-1 AP Exam Scores! (2017 AP exam score distributions by subject)
    Data from totalregistration.net/AP-Exam-Registration-Service/2017-AP-Exam-Score-Distributions.php (1 row per exam);

proc import datafile='/folders/myfolders/AP2017ScoreDistributions.xlsx' dbms=xlsx out=APscores replace;

                                                      /* Transform to 1 row per exam/score */
proc transpose data=APscores out=APscores2(rename=(_label_=Score col1=Pct));  
by exam notsorted;

proc sql;                                             /* Calculate pass rate (pass=3/4/5) */
create table APscores3 as                            
select t1.*, t2.pctpass                              
from APscores2 t1
join (select exam, sum(pct) as pctpass from APscores2
      where score between '3' and '5' group by 1) t2 on t1.exam=t2.exam
order by pctpass, exam;                               /* Subjects displayed in hi-&amp;gt;lo pass % order */

data ScoresAttrMap;                                   /* Use attribute map to assign colors */
retain id "scoresID";                                 /* Greens=Pass (5/4/3), Reds=Fail (2/1) */
input value : $1. fillcolor : $15.@@;
cards;
5 LIGHTGREEN 4 FORESTGREEN 3 DARKGREEN 2 RED 1 DARKRED
;                                                     /* Plot score distributions */
ods listing image_dpi=140 gpath='/folders/myfolders'; 
ods graphics on / reset antialias width=14in height=11in imagename="2017APSCORES" imagefmt=gif;                  
proc sgplot data=APscores3 dattrmap=ScoresAttrMap noborder;
title bold "2017 AP EXAM SCORE DISTRIBUTIONS";
xaxis valueattrs=(size=6pt) display=(nolabel) refticks=(values);
yaxis valueattrs=(size=8pt) display=(nolabel noline noticks) discreteorder=data reverse;
hbar exam / response=pct group=score datalabel=pct barwidth=1 
            attrid=scoresID dataskin=crisp name="scores" grouporder=descending;
yaxistable pct / labelattrs=(size=7pt) valueattrs=(size=7pt) titleattrs=(size=7pt);
keylegend "scores" / position=bottom valueattrs=(size=7pt);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;INPUT DATA SCREENSHOT &lt;/STRONG&gt;(cut-and-pasted from totalregistration.net)&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9958iD9167C0B407DB11E/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="APscoredata.jpg" title="APscoredata.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 05:55:50 GMT</pubDate>
    <dc:creator>tc</dc:creator>
    <dc:date>2017-06-29T05:55:50Z</dc:date>
    <item>
      <title>Fun With SAS ODS Graphics: 5-4-3-2-1 AP Exam Scores!</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/371535#M12837</link>
      <description>&lt;P&gt;&lt;STRONG&gt;SAS OUTPUT (&lt;A href="https://communities.sas.com/t5/image/serverpage/image-id/9956iF6C3C2DA8E6C6B2B/image-size/original?v=1.0&amp;amp;px=-1" target="_self"&gt;CLICK TO VIEW LARGER IMAGE&lt;/A&gt;)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/image/serverpage/image-id/9956iF6C3C2DA8E6C6B2B/image-size/original?v=1.0&amp;amp;px=-1" target="_self"&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9956iF6C3C2DA8E6C6B2B/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="2017APSCORES.gif" title="2017APSCORES.gif" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was wondering what might be a good way to plot the just-released&amp;nbsp;&lt;A href="https://www.totalregistration.net/AP-Exam-Registration-Service/2017-AP-Exam-Score-Distributions.php" target="_self"&gt;2017 AP Exam Score Distributions&lt;/A&gt; posted by Total Registration, when I stumbled across Robert Allison's fine&amp;nbsp;&lt;A href="http://blogs.sas.com/content/sastraining/2017/06/02/how-to-stack-the-deck-for-a-better-graph/" target="_self"&gt;How to 'stack the deck' for a better graph!&lt;/A&gt; Eureka!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAS CODE&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*-&amp;gt; Fun w/SAS ODS Graphics: 5-4-3-2-1 AP Exam Scores! (2017 AP exam score distributions by subject)
    Data from totalregistration.net/AP-Exam-Registration-Service/2017-AP-Exam-Score-Distributions.php (1 row per exam);

proc import datafile='/folders/myfolders/AP2017ScoreDistributions.xlsx' dbms=xlsx out=APscores replace;

                                                      /* Transform to 1 row per exam/score */
proc transpose data=APscores out=APscores2(rename=(_label_=Score col1=Pct));  
by exam notsorted;

proc sql;                                             /* Calculate pass rate (pass=3/4/5) */
create table APscores3 as                            
select t1.*, t2.pctpass                              
from APscores2 t1
join (select exam, sum(pct) as pctpass from APscores2
      where score between '3' and '5' group by 1) t2 on t1.exam=t2.exam
order by pctpass, exam;                               /* Subjects displayed in hi-&amp;gt;lo pass % order */

data ScoresAttrMap;                                   /* Use attribute map to assign colors */
retain id "scoresID";                                 /* Greens=Pass (5/4/3), Reds=Fail (2/1) */
input value : $1. fillcolor : $15.@@;
cards;
5 LIGHTGREEN 4 FORESTGREEN 3 DARKGREEN 2 RED 1 DARKRED
;                                                     /* Plot score distributions */
ods listing image_dpi=140 gpath='/folders/myfolders'; 
ods graphics on / reset antialias width=14in height=11in imagename="2017APSCORES" imagefmt=gif;                  
proc sgplot data=APscores3 dattrmap=ScoresAttrMap noborder;
title bold "2017 AP EXAM SCORE DISTRIBUTIONS";
xaxis valueattrs=(size=6pt) display=(nolabel) refticks=(values);
yaxis valueattrs=(size=8pt) display=(nolabel noline noticks) discreteorder=data reverse;
hbar exam / response=pct group=score datalabel=pct barwidth=1 
            attrid=scoresID dataskin=crisp name="scores" grouporder=descending;
yaxistable pct / labelattrs=(size=7pt) valueattrs=(size=7pt) titleattrs=(size=7pt);
keylegend "scores" / position=bottom valueattrs=(size=7pt);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;INPUT DATA SCREENSHOT &lt;/STRONG&gt;(cut-and-pasted from totalregistration.net)&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9958iD9167C0B407DB11E/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="APscoredata.jpg" title="APscoredata.jpg" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 05:55:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/371535#M12837</guid>
      <dc:creator>tc</dc:creator>
      <dc:date>2017-06-29T05:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: 5-4-3-2-1 AP Exam Scores!</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/371654#M12847</link>
      <description>&lt;P&gt;Very nice, TC. &amp;nbsp;If you have SAS 9.40M3, you can make the color swatches of the legend bigger. &amp;nbsp;See FILLHEIGHT, FILLASPECT or AUTOITEMSIZE in KEYLEGEND statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I wonder how the visual&amp;nbsp;would look if you were to center the &amp;nbsp;boundry between "Pass" and "Fail".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sort of like the 3rd graph in this article:&amp;nbsp;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2014/10/30/likert-graphs/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2014/10/30/likert-graphs/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 12:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/371654#M12847</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-06-29T12:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Fun With SAS ODS Graphics: 5-4-3-2-1 AP Exam Scores!</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/372152#M12859</link>
      <description>&lt;P&gt;Thanks for this&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4628"&gt;@tc&lt;/a&gt;.&amp;nbsp;I shared with my daughter, who took&amp;nbsp;&lt;STRONG&gt;4&lt;/STRONG&gt; of these exams this past May (Stat, Psych, Eng Lit, and Music Theory). &amp;nbsp;She hasn't yet received her scores, but she certainly hopes to be "in the green" for all of them!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 13:30:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Fun-With-SAS-ODS-Graphics-5-4-3-2-1-AP-Exam-Scores/m-p/372152#M12859</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2017-06-30T13:30:10Z</dc:date>
    </item>
  </channel>
</rss>

