Return to Snippet

Revision: 5733
at March 31, 2008 13:16 by webonomic


Initial Code
data tempdata;
length Q1 $15;
input Site Q1 $ evaltot_Sum Red Amber Green;
cards;
3 Cleanliness 2 4 2 4
3 Friendliness 3 4 4 3
3 Responsiveness 3 4 4 3
3 Condition 3 4 4 3
3 Safety 3 4 4 3
4 Cleanliness 1 1 4 4
4 Friendliness 3 4 4 3
4 Responsiveness 3 4 4 3
4 Condition 3 4 4 3
4 Safety 3 4 4 3
9 Cleanliness 2 4 2 4
9 Friendliness 3 4 4 3
9 Responsiveness 3 4 4 3
9 Condition 3 4 4 3
9 Safety 1 1 4 4
;
run;

Proc Format ;
Value BGColor
1 = CXFF0000
2 = CXFFFF00
3 = CX00FF00
4 = CXD3D3D3
5 = CXA69F7A ;
Run ;


ods html;
proc print data = tempdata noobs label;
var Q1;
var Red / style={background=bgcolor.};
var Amber / style={background=bgcolor.};
var Green / style={background=bgcolor.};
by Site;
label Red=’R’ Amber=’A’ Green=’G’ Q1=’Services and Facilities’;
run;
ods html close;

Initial URL
http://jaredprins.squarespace.com/blog/2008/3/31/more-colours-with-proc-print-and-traffic-light-analysis.html

Initial Description
Colour code table cells to help visually reveal results.

Initial Title
Traffic Light Analysis

Initial Tags
format

Initial Language
SAS