Data visualization with SAS programming

Best way to create a template/style following Stephen Few's book?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 96
Accepted Solution

Best way to create a template/style following Stephen Few's book?

Hi everyone (and happy new year!),

I've just  got my hands on Stephen Few's "Show me the numbers" and would like to implement to most basics advice automatically by creating a template/style.  Has anyone already created a template that would set the layout automatically (colors, borders, font,..) ?

 

cheers!

 


Accepted Solutions
Solution
‎01-13-2016 09:37 AM
Frequent Contributor
Posts: 96

Re: Best way to create a template/style following Stephen Few's book?

[ Edited ]

It's not perfect, but here's my template, along with examples of use with proc report and proc sgplot.

 

** EDIT  here's my new shade of  light grey for background shading.
%let verylightgrey = %rgb(245,245,245);

View solution in original post


All Replies
Grand Advisor
Posts: 16,350

Re: Best way to create a template/style following Stephen Few's book?

[ Edited ]

SAS supports CSS in many procedures so you can use that. I don't know about Stephen Few's CSS, but Edward Tufte has a CSS out that may be helpful.

https://github.com/edwardtufte/tufte-css

 

And SAS's documentation on CSS:

http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html

I'd also be interested in a Stephen Few/Edward Tufte SAS/CSS style sheet. I find design not entirely SAS forte.

Frequent Contributor
Posts: 96

Re: Best way to create a template/style following Stephen Few's book?

[ Edited ]

Thanks Reeza for the links.  I wasnt aware of it and it looks great.  I'll give it a look as it is very interesting and a good starting point, but I'm afraid learning CSS will have to wait as work is resuming soon.

 

 

Grand Advisor
Posts: 9,740

Re: Best way to create a template/style following Stephen Few's book?

I recommend investigating the various SAS supplied style templates. If one is close to what you need then modifying a few elements is going to be much easier than creating one from scratch.

 

Create a couple of small example data sets to print and graph basic elements and then write a program that loops over the various installed styles to create a document with the same output using the various styles.

SAS Super FREQ
Posts: 3,232

Re: Best way to create a template/style following Stephen Few's book?

This is a very common topic at conferences, so there are multiple papers written about how to use PROC TEMPLATE to create a custom style.  Go to your favorite internet search engine and search for

   sas "proc template" style

If you want to restrict yourself to SAS papers and documentation, add

   site:sas.com

 

If you want a reference book, Kevin Smith wrote the book PROC TEMPLATE Made Easy.

Solution
‎01-13-2016 09:37 AM
Frequent Contributor
Posts: 96

Re: Best way to create a template/style following Stephen Few's book?

[ Edited ]

It's not perfect, but here's my template, along with examples of use with proc report and proc sgplot.

 

** EDIT  here's my new shade of  light grey for background shading.
%let verylightgrey = %rgb(245,245,245);

Grand Advisor
Posts: 16,350

Re: Best way to create a template/style following Stephen Few's book?

Thank You!!!

That looks like a nice style. I've placed a copy on github for quick access in the future and if I update it, I'll post it there as well.

 

https://gist.github.com/statgeek/9845cc3d26e4c35e01a2

Frequent Contributor
Posts: 96

Re: Best way to create a template/style following Stephen Few's book?

Thanks!

One thing I'm looking for is the ability to set different a color palette for small objects vs larger objects.

 

For example, lines would use the medium palette, while bars would use the light palette.

Frequent Contributor
Posts: 96

Re: Best way to create a template/style following Stephen Few's book?

I've changed the background shading of the alternate rows.  Here's my new shade of grey.

 

*** very light grey est utilisé pour le background shading;
%let verylightgrey = %rgb(245,245,245);

Post a Question
Discussion Stats
  • 8 replies
  • 741 views
  • 4 likes
  • 4 in conversation