CMS SAS Users Group Conference Learn more about THE POWER TO KNOW ® October 17, 2011 Using SAS® to Create Custom Healthcare Graphics Barbara B. Okerson.

Slides:



Advertisements
Similar presentations
Zhongmin Li and Geeta Mahendra
Advertisements

County Health Rankings User’s Guide Atlanta Regional Commission For more information contact:
Minitab® 15 Tips and Tricks
Using ODS Regions to Create Custom Reports Kate Morrow, M.S. Statistician Vermont Oxford Network, Burlington, VT.
BCIS IB (Test 2) Excel Lessons 4 – 8 Press space bar to Advance Frame.
Business Computer Information Systems 1B Microsoft Office XP Final Exam Review.
Excel Tutorial 4: Enhancing a Workbook with Charts and Graphs
® Microsoft Office 2010 Excel Tutorial 4: Enhancing a Workbook with Charts and Graphs.
Controlling SAS Graphics using ANNOTATE Datasets Elizabeth Campagna University of Colorado Denver Colorado Health Outcomes Program Colorado Day – Denver.
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
FIRST COURSE Excel Tutorial 4 Working with Charts and Graphics.
Distance Mapping With SAS® Barbara B. Okerson, PhD HMC.
Planning and Statistics ADVIZOR TRAINING PLANNING AND STATISTICS V.1 1 ADVIZOR Tips.
McGraw-Hill Technology Education © 2004 by the McGraw-Hill Companies, Inc. All rights reserved. Office Excel 2003 Lab 2 Charting Worksheet Data.
2 Part II Enhancing a Presentation Changing the Presentation Design Design template Professionally created slide designs contain –Color schemes –Custom.
COMPREHENSIVE Excel Tutorial 4 Working with Charts and Graphics.
SAS Lecture 6 – SAS/GRAPH Aidan McDermott, May 3, 2005.
Excel Lesson 6 Enhancing a Worksheet
How to Build Tabular Dashboards Using Proc Report
The gchart Procedure The gchart Procedure is used to create bar charts of various types (it can also create pie charts. It’s most basic form would look.
Copyright © 2005, SAS Institute Inc. All rights reserved. Need Java Graphics? Use of BIP Graph Components NameRavi Devarajan TitleSoftware Manager DepartmentData.
Charts and Graphs V
Introduction to SAS/Graph Don Miller 812 Oswald Tower
SAS® Maps as Tools to Display and Clarify Healthcare Outcomes Barbara B. Okerson, HMC, Richmond, VA.
Drill-down Graphs By Heather Hoffman. Family Practice Department Project  Create drill-down graphs that depict % of patients for each CCS* over a given.
Dashboards With PROC GKPI September 25, 2009 Barry Hong
Microsoft Office Illustrated Introductory, Premium Edition A Worksheet Formatting.
Microsoft Office XP Illustrated Introductory, Enhanced A Worksheet Formatting.
Graphics COM 365 Newspaper Layout & Design. Why graphics? Need them to break up text, liven up page –Adds visual element Allow journalist to show visual.
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Introduction to SAS Essentials Mastering SAS for Data Analytics Alan Elliott and Wayne Woodward SAS ESSENTIALS -- Elliott & Woodward1.
Tips & Tricks MASUG02/18/2005. Multiple Graphs on One Page.
TS02 SAS GTL - Injecting New Life into Graphs
Chapter 3 Creating a Business Letter with a Letterhead and Table
Copyright © 2008 SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks.
Microsoft ® Office Excel 2007 Working with Charts.
1 Excel Lesson 8 Working with Charts Microsoft Office 2010 Introductory Pasewark & Pasewark.
Copyright © 2005, SAS Institute Inc. All rights reserved. Effective Use of SAS/GRAPH® Stored Processes Pat Berryman Senior Software Manager Data Visualization.
Introduction to SAS/Graph 9.2 Ken Barz Colorado Prevention Center 22Oct2009 Ken Barz Colorado Prevention Center.
Advanced Stata Workshop FHSS Research Support Center.
Session 9 Managerial Spreadsheet Modeling -- Prof. Juran1.
Templates – Graphs US Business Group. General rules Presenter/timing Bar and column graphs Presenter/timing Line and combination graphs Presenter/timing.
ON PATHS LESS TRODDEN… Excursions in SAS/GRAPH ® and PROC TABULATE Presented by Aaron Rabushka © Aaron Rabushka 2000.
Results Figure 4. If you make your chart in PowerPoint, it is much easier to edit using the formatting palette 1.When inserting a graph, photo or diagram.
Statistical Graphics for the SAS System Computing for Research I 01/29/2014 Nathaniel L Baker.
Effective SAS greplay’ing and how to avoid stretching By David Mottershead Senior Programmer, Quanticate.
WORD VOCABULARY LIST #5 MICROSOFT OFFICE WORD VOCABULARY LIST #5 bar chart - A chart with bars that compares the quantities of two or more items.
PROC GPLOT GPLOT is used to make two dimensional scatter-plots. General Syntax: proc gplot data=data-set options; plot y-variable*x-variable/options; run;
MASUG September 15, Agenda  Guest Introductions  John Boling – SAS inSchool  Tim Garton – Health Forecasts  Announcements  Tips & Tricks 
Walkthrough example including SAS output How to create a mobile WebApp? PhUSE / 12. October 2015 / Katja Glaß BHC 4:3 Template 2010 June 2014Page 1.
Microsoft® Excel Use the Chart Tools Design tab. 1 Use the Chart Tools Layout and Format tabs. 2 Create chart sheets and chart objects. 3 Edit.
Creating Geographic Rating Area Maps: How to Combine Counties, Split Counties, & use Zip Code Boundaries Rick Andrews Office of the Actuary Centers for.
SAS ® is a very powerful tool when producing Graphics. A single graphical data step can easily create a Kaplan Meier Plot, but there is no single graphical.
SAS/GRAPH The Basics. Today’s Topics GOPTIONS GPLOT GCHART GCONTOUR G3D.
Excel Part 4 Working with Charts and Graphics. XP Objectives Create an embedded chart Work with chart titles and legends Create and format a pie chart.
Introduction to SAS ODS Graphics September 16, 2015 Rocio Lopez.
CMS SAS Users Group Conference Learn more about THE POWER TO KNOW ® October 17, 2011 PROC GMAP, HTML and You Thomas Kornfield, CMS.
Based on Learning SAS by Example: A Programmer’s Guide Chapters 1 & 2
Behind the Scenes with SAS®: Using Customer Graphics in SAS® Output Louise Hadden Abt Associates Inc.
Reporting The Facts: The ODSmemo macro suite for making reproducible RTF memos within SAS® Rocio Lopez Cleveland Clinic.
ODS Graphics By Example March 16, 2016 Rocio Lopez.
Add More Zing to your Dashboards – Creating Zing Plot Gadgets
Microsoft Excel Illustrated
INTRODUCTION TO SGPLOT Zahir Raihan OVERVIEW  ODS Graphics  SGPLOT overview  Plot Content  High value plot statements  High value plot options 
Computing for Research I 01/26/2011 N. Baker
Making a Publication-quality Graph in SAS
Insert Tab.
Presentation transcript:

CMS SAS Users Group Conference Learn more about THE POWER TO KNOW ® October 17, 2011 Using SAS® to Create Custom Healthcare Graphics Barbara B. Okerson

SAS Graphics Options SAS/GRAPH® procedures SAS/IML® graphics ODS Statistical Graphics Graph-N-Go Graphics primitives

Tools to Customize SAS Graphics Graph Template Language Style Templates SAS Graphics Editor ODS Graphics Editor

Examples Historical timelines Project timelines Waterfall charts Distance charts

Project and Proposal Timelines

Project Timelines Convenient for organizing tasks – Manage time and resources – Track progress – Tell project story Project proposals – What will happen – When

Report Timeline Single page view Color-coded areas of responsibility Graphic duration of each task Easy to read Scalable

Create the Report Timeline Proc GPLOT Long axis names stored in macro Task duration lines with annotate VREVERSE

Report Code /*Create Annotate Data Set to Draw Lines*/ data anno; length function color $8; retain xsys ysys '2' size 10; set process; line=linetype; color=color; function='move'; x=end+.3; y=nobs; output; function='draw'; x=begin; y=nobs; output; run; /* Set Titles Symbols and Axes*/ title1 h=4 c=black "Quality Improvement Report Timeline"; symbol1 i=none; axis1 label=none major=none minor=none style=0 ; axis2 label=none major=none minor=none style=0 order= "20Feb10"d to "16Mar10"d value=none length=45; axis3 label=none value=(j=l %longtasks) major=none minor=none style=0; /*Plot the Timeline*/ proc gplot annotate=anno; plot nobs*end/ vaxis=axis1 haxis=axis2 lhref=33 href="01MAR02"d "12MAR02"d vreverse; plot2 nobs*end/vaxis=axis3 haxis=axis2 vreverse; format nobs order.; footnote2 box=1 f=marker c=red h=1.5 'U' f='Arial' c=black h=1.5 ' QI ‘ f=marker c=gray h=1.5 'U' f='Arial' c=black h=1.5 ' Analytic ‘ f=marker c=blue h=1.5 'U' f='Arial' c=black h=1.5 ' Other ‘; Run; quit;

Proposal Timeline One page activity proposal Useful for grant applications with page limitations Color-coded by activity type

Create the Proposal Timeline Four axes Left axis indents created with format Tasks in formatted order Colors and symbols set in Annotate Annotate data set for top axis

Additional Uses

Historical Timelines

Timelines Convenient display for event progression Dates/times for any process or event Two examples – Training schedule – Medical History

Training Schedule Example Schedule of tasks for basic training sessions Tasks to be completed by due date Chronological order No hierarchy beyond calendar order

Create the Plot SAS/GRAPH® GPLOT procedure Needle interpolation Annotate labels and arrowheads True type font with bold and italic options Distance from axis stored in variable

The Code - Annotate data anno; length function color $ 8; retain when 'a' position '3' hsys '3' ysys '2' xsys '2'; set timeline; if space > 0 then do; function='label'; size=3; style ="'Calibri/it/bo'"; color='black'; text=cat(' ',label);x=date-5; y=space; cborder= 'black‘;cbox= 'beige'; output;end; if space < 0 then do; function='label‘; size=3; style ="'Calibri/it/bo'"; color='black'; text=cat(' ',label);x=date-5;y=space-2;cborder= 'black‘;cbox= 'beige'; output;end; if space > 0 then do; function="symbol"; color='black'; style='marker'; text='C'; size=2; angle=0; x=date; y=space-.001; end; if space < 0 then do; function="symbol"; color='black'; style='marker'; text='D'; size=2; angle=0; x=date; y=space+.32; end; cborder= ' '; cbox= ' ‘; output; run;

The Code - GPLOT /*Set Symbols and Axes*/ title2 c=black h=2.5 f='Calibri/bo' "Prevention Agency Training Schedule 2010"; axis1 order=(-14 to 14 by 1) major=none minor=none value=none style=0 label=none; axis2 label=none order=(15235 to by 10) minor=none; symbol c=black i=needle; /*Plot the Timeline*/ proc gplot data=timeline annotate=anno; plot space*date/vaxis=axis1 haxis=axis2; format date mmddyy5.; run;

Medical History Example Medical history events in order of occurrence Event marked by illustrations Event labels – Timeframe and legend Images used by permission of U.S. National Library of Medicine and can be found at:

Create the Timeline SAS/GRAPH® GPLOT procedure Images set as plot points Annotate image function IMGPATH variable Suppress normal plot axes, values and symbols

The Code - Annotate /*Create annotate data set to set images as plot points*/ data images; length function $ 8 style $ 15 imgpath $200.; retain xsys ysys '2' hsys '3' when 'a' position '4' style 'fit'; set wars; x=timeperiod-.5; y=level-1; if timeperiod=1 then do; function='move'; output; imgpath='r:\bokerson\sgf 2011\faiw.bmp'; x=x+1.1; y=y+1; function='image'; output; end; else if timeperiod=2 then do;....

The Code - GPLOT /*Set Symbols and Axes*/ symbol value=none; axis1 split='/' label=none minor=none major=none style=0 order=(0 to 5 by 1); axis2 label=none minor=none major=none order=(0 to 4 by 1) value=none style=0; /*Plot the timeline*/ proc gplot data=wars; plot level * timeperiod /annotate=images haxis=axis1 vaxis=axis2 noframe; format timeperiod wardate.; run; quit;

Enhancements Color coding of events Pop-ups, roll-overs, and drill-downs Links to web pages Unlimited possibilities

Waterfall Charts

Flying bricks chart Display cumulative effect of sequential values Areas of loss and gain between start and end Isolation of categories

Proc GCHART Waterfall Quarterly political campaign contributions Cumulative and by category Categories color-coded Variation – – no ‘parts in a whole’

Create the Waterfall Chart SAS/GRAPH GCHART procedure Stacked bar Invisible bar for floating effect PATTERN color = CFRAME & COUTLINE color

The Code /*Set Patterns*/ pattern1 v=s c=cxe8e8e8; pattern2 v=s c=blue; pattern3 v=s c=yellow; pattern4 v=s c=green; /*Produce the Waterfall Chart */ proc gchart data=hospitals; vbar period / discrete sumvar=cost raxis=axis1 autoref lref=34 cref=black subgroup=class cframe=cxe8e8e8 width=15 space=15 coutline=cxe8e8e8 nolegend; format period yyq6. cost dollar4.0; footnote1 move=(-12,0) f='Arial' h=1.1 box=1 c=green f=Marker 'U' c=black f='Arial' ' Small' c=yellow f=Marker ' U' c=black f='Arial' ' Medium' c=blue f=Marker ' U' c=black f='Arial' ' Large'; run; quit;

Proc GPLOT Waterfall Types of birth by risk factor Cumulative and by category Type color-coded Totals column

Create the Waterfall Plot Bars created in Annotate data set Axis offset option Symbol interpolation set to none

The Code - Annotate data anno; length function color $8; retain xsys ysys '2' size 40 color 'cx66CC33' when 'a'; set waterfall; line=line; if type="C" then color='cxFF9900'; else color='cx66CC33'; function='move'; y=begin; xc=Risk; output; function='draw'; y=end; xc=Risk; output; run

The Code - GPLOT /*Set Titles, Symbols and Axes*/ title "Type of Birth by Risk Factors"; symbol1 i=none; axis1 order=("Low Risk" "Hypertension" "Diabetes" "Smoking" "Total") offset=(10,0) label = none style=0 ; axis2 Order=(0 to by 2000) minor=none label=none; /*Plot the Waterfall*/ proc gplot annotate=anno; plot end*Risk/haxis=axis1 vaxis=axis2 autovref lvref=34 hminor=0; format end comma6.; run;quit;

SAS Support for Waterfall Charts SAS BI Dashboard 4.3 SAS Web Report Studio Proc SGPLOT with Vector and Scatter

Distance Charts

New Distance Tools in SAS 9.2 GEODIST Function—calculates distance from point to point ZIPCITYDISTANCE —calculates distances between centers of U.S. Zip codes. %REDUCE macro—reduces map data optimally for a desired resolution. PROC GINSIDE—applies regional (polygonal) values to a point.

Distance Maps Geographic – Tied to geographic coordinates – Distance between places – Elevation Non-geographic – distance relationships

Create the Distance Map GEOCODE for ZIP+4 centroid location Calculate distance between centroids Great Circle Distance Formula Plot with Proc GPLOT MemberMD1MD2MD3MD4MD

The Code /*Geocode for distance calculation*/ proc geocode plus4 lookup=lookup.zip4 data=work.members out=work.geo_members run; quit; /*Plot the distance map*/ proc gplot data=provider2; plot p5*interval p4*interval p3*interval p2*interval p1*interval /overlay autovref autohref cvref=black chref=black lautovref=34 lautohref=34 haxis=axis1 vaxis=axis2 caxis=black vminor=3 areas=5; footnote2 box=1 f=marker c=ltgray 'U' f='Arial' c=black ‘ 1 Provider ‘ f=marker c=cxFFFF00 'U' f='Arial' c=black ‘ 2 Providers ‘ f=marker c=cx00CC66 'U' f='Arial' c=black ' 3 Providers ‘ f=marker c=cxD80000 'U' f='Arial' c=black ‘ 4 Providers ‘ f=marker c=cx7Ba7E1 'U' f='Arial' c=black ‘ 5 Providers '; run; quit;

Distance Bubble Plot Bubble Plot available – custom use is as distance chart (use with geocoded data) Proportion of population within a distance Distance to dental provider example Bubble plot Annotate and Proc GPLOT

Annotate Code data annoplot; set dental; length function $8 text \$1; retain XSYS YSYS '2' style 'Marker' function 'LABEL' when 'b' color 'cxF2F2DF'; size = size; X=distance; y=population; text='W'; output; run; data annoplot2; set dental; length function $8 text $1; retain XSYS YSYS '2' style 'Markere' function 'LABEL' when 'a' color 'brown'; size = size; X=distance; y=population; text='W'; output; run;

Plot Code goptions ftext='Arial' ftitle='Arial' htext=1.4; title h=2 'Population vs. Distance to Dental Provider'; axis1 order=0 to 7 by 1 minor=none label=("Miles"); axis2 minor=none order= 0 to 100 by 25 label=("Percent"); symbol i=join v=dot h=2; proc gplot data=dental anno=annoplot; plot population*distance/ vaxis=axis2 haxis=axis1 anno=annoplot2; run; quit;

Conclusion Flexibility of SAS allows creation of custom graphics Current procedures and products as base Additional flexibility from: – ODS – SG procedures – Enterprise Guide

Contact Info Your comments and questions are valued and encouraged. For more information contact: Barbara B. Okerson, Ph.D., CPHQ, FAHM Senior Health Information Consultant WellPoint Enterprise Information Management 8831 Park Central Drive, Suite 100 Richmond, VA Office: Fax: