BookmarkSubscribeRSS Feed
tc
Lapis Lazuli | Level 10 tc
Lapis Lazuli | Level 10

MWSUG2019PaperSizes.png

 

In addition to hosting SAS conference papers galore, lexjansen.com displays the sizes of the files that contain them. So, here's a quick box plot of the sizes of the MWSUG 2019 papers by section, including my own Oh, There's No Place Like SAS ODS Graphics for the Holidays!, which is revealed to be quite an outlier at 8,887 Kb (it's chock-full of Twitter images). The accompanying (25.6 Mb) PowerPoint e-Poster - with 27 holiday-themed SAS ODS Graphics charts and the code that created them - is available for viewing or downloading on Microsoft OneDrive. The e-Poster's designed for a 41" x 23" screen, so it'll show better on a bigger, higher-resolution monitor or TV!

 

SAS CODE

* Fun with SAS ODS Grapics: MWSUG 2019 Conference Proceedings - Paper Sizes by Section;

data mwsugPapers(keep=size section paper);          * Scrape paper sections, names, sizes from lexjansen.com;
filename mwsug url "https://lexjansen.com/cgi-bin/xsl_transform.php?x=mwsug2019";
infile mwsug recfm=v truncover column=c;
input @;
_infile_=tranwrd(_infile_,"c2a0"x," ");             * Translate non-breaking spaces in web page to Ascii space;
length size 3. section paper $ 255.; retain section paper;
s=index(_infile_,'<span class="stream">');          * Grab paper section;
if s then section=scan(substr(_infile_,s),2,'<>');
input @"<b>Size</b>:" size;                         * Grab paper size;
if size then output;
if index(_infile_,'class="paper') then              /* Grab paper name */
  paper=scan(_infile_,-3,'<>');

proc format;                                        * Display sizes as megabytes;
picture mb low-high='00mB' (multiplier=.001);

proc summary data=mwsugPapers nway;                 * Calc # papers, mean/median paper size by section for table;
class section; var size;
output out=mwsugStats n=N mean=Mean median=Median;

proc sql;                                           * Merge paper detail and summary stats;
create table mwsugPapers2 as 
select t1.*, t2.n, t2.mean, t2.median from mwsugPapers t1 left join mwsugStats t2 on t1.section=t2.section;

ods graphics on / antialias height=4in width=8in;                        
proc sgplot data=mwsugPapers2 noautolegend;        * Box plots of paper sizes by section, show paper name for far outliers;
styleattrs datacolors=(CXAEC7E8 CXFFBB78 CX98DF8A CXFF9896 CXC5B0D5 CXC49C94 CXF7B6D2); * Light colors for boxes;
hbox size / category=section datalabel=paper labelfar group=section lineattrs=(color=black) meanattrs=(color=black) 
            medianattrs=(color=black) whiskerattrs=(color=black) outlierattrs=(color=black size=9pt) datalabelattrs=(color=black size=9pt);
inset "MWSUG 2019 Paper Sizes" / position=topright textattrs=(size=14pt);
xaxis display=(nolabel) offsetmin=0 offsetmax=.02 valuesformat=mb. grid values=(0 to 9500 by 1000) valueshint;
yaxis display=(nolabel); 
yaxistable N Mean Median / stat=mean valueattrs=(color=black size=8pt); * Stats pre-calculated and on every obs, so specify stat=mean;
format n mean median comma7.;

e-Poster Screenshot

OhTheresNoPlaceLikeSasOsdsGraphicsForTheHolidays.jpg

1 REPLY 1
RoyPardee
Obsidian | Level 7
Woah--never knew about yaxistable before--love that.

I would also love the ability to set box width to indicate the number of obs in the category.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 790 views
  • 4 likes
  • 2 in conversation