OVERVIEW OF THE ENTERPRISE GUIDE INTERFACE



Similar documents
Let SAS Write Your SAS/GRAPH Programs for You Max Cherny, GlaxoSmithKline, Collegeville, PA

Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY

Getting Started With SPSS

William E Benjamin Jr, Owl Computer Consultancy, LLC

LEGEND OPTIONS USING MULTIPLE PLOT STATEMENTS IN PROC GPLOT

Release 2.1 of SAS Add-In for Microsoft Office Bringing Microsoft PowerPoint into the Mix ABSTRACT INTRODUCTION Data Access

Using SAS/GRAPH Software to Create Graphs on the Web Himesh Patel, SAS Institute Inc., Cary, NC Revised by David Caira, SAS Institute Inc.

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

The Basics of Creating Graphs with SAS/GRAPH Software Jeff Cartier, SAS Institute Inc., Cary, NC

Using the SAS Enterprise Guide (Version 4.2)

Crystal Converter User Guide

The Query Builder: The Swiss Army Knife of SAS Enterprise Guide

Graphing in SAS Software

How To Use Spss

Seamless Dynamic Web Reporting with SAS D.J. Penix, Pinnacle Solutions, Indianapolis, IN

Microsoft Excel 2010 Part 3: Advanced Excel

Customized Excel Output Using the Excel Libname Harry Droogendyk, Stratia Consulting Inc., Lynden, ON

Directions for Frequency Tables, Histograms, and Frequency Bar Charts

Build Your First Web-based Report Using the SAS 9.2 Business Intelligence Clients

Market Pricing Override

Producing Listings and Reports Using SAS and Crystal Reports Krishna (Balakrishna) Dandamudi, PharmaNet - SPS, Kennett Square, PA

From The Little SAS Book, Fifth Edition. Full book available for purchase here.

Exploiting Key Answers from Your Data Warehouse Using SAS Enterprise Reporter Software

Scatter Plots with Error Bars

Using SAS to Create Graphs with Pop-up Functions Shiqun (Stan) Li, Minimax Information Services, NJ Wei Zhou, Lilly USA LLC, IN

Scatter Chart. Segmented Bar Chart. Overlay Chart

Business Portal for Microsoft Dynamics GP User s Guide Release 5.1

Formulas, Functions and Charts

Introduction to Microsoft Access 2003

SAS Enterprise Guide A Quick Overview of Developing, Creating, and Successfully Delivering a Simple Project

Microsoft Excel 2010 Pivot Tables

Data Visualization with SAS/Graph

Creating an Excel XY (Scatter) Plot

SAS Add in to MS Office A Tutorial Angela Hall, Zencos Consulting, Cary, NC

Welcome to 360 Reporting Accessing 360 Reporting... 3 MicroEdge Support Program Using 360 Reporting Setting up Quick Find...

Workspaces Creating and Opening Pages Creating Ticker Lists Looking up Ticker Symbols Ticker Sync Groups Market Summary Snap Quote Key Statistics

Quick Guide. Passports in Microsoft PowerPoint. Getting Started with PowerPoint. Locating the PowerPoint Folder (PC) Locating PowerPoint (Mac)

Getting Started Guide

SysAid Remote Discovery Tool

Data Visualization. BUS 230: Business and Economic Research and Communication

Korosi Monitoring System (KMS) Software Manual

STEP 2: UNIX FILESYSTEMS AND SECURITY

MicroStrategy Analytics Express User Guide

Figure 1. An embedded chart on a worksheet.

SAS Visual Analytics dashboard for pollution analysis

Creating Acrobat Forms Acrobat 9 Professional

Getting started in Excel

What you can do:...3 Data Entry:...3 Drillhole Sample Data:...5 Cross Sections and Level Plans...8 3D Visualization...11

"Excel with Excel 2013: Pivoting with Pivot Tables" by Venu Gopalakrishna Remani. October 28, 2014

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

Internet/Intranet, the Web & SAS. II006 Building a Web Based EIS for Data Analysis Ed Confer, KGC Programming Solutions, Potomac Falls, VA

CC03 PRODUCING SIMPLE AND QUICK GRAPHS WITH PROC GPLOT

INFOASSIST: REPORTING MADE SIMPLE

If there is not a Data Analysis option under the DATA menu, you will need to install the Data Analysis ToolPak as an add-in for Microsoft Excel.

Advanced Microsoft Excel 2010

KaleidaGraph Quick Start Guide

Business Portal for Microsoft Dynamics GP. Key Performance Indicators Release 10.0

I Didn t Know SAS Enterprise Guide Could Do That!

HOW TO COLLECT AND USE DATA IN EXCEL. Brendon Riggs Texas Juvenile Probation Commission Data Coordinators Conference 2008

In this example, Mrs. Smith is looking to create graphs that represent the ethnic diversity of the 24 students in her 4 th grade class.

Introduction to SAS on Windows

Gestation Period as a function of Lifespan

Creating Custom Crystal Reports Tutorial

SimplyCast emarketing User Guide

Using FileMaker Pro with Microsoft Office

DataPA OpenAnalytics End User Training

SAS BI Dashboard 3.1. User s Guide

Information Literacy Program

SAS ODS. Greg Jenkins

Can SAS Enterprise Guide do all of that, with no programming required? Yes, it can.

Introduction. Why Use ODBC? Setting Up an ODBC Data Source. Stat/Math - Getting Started Using ODBC with SAS and SPSS

DiskPulse DISK CHANGE MONITOR

Data Visualization. Prepared by Francisco Olivera, Ph.D., Srikanth Koka Department of Civil Engineering Texas A&M University February 2004

Overview. NT Event Log. CHAPTER 8 Enhancements for SAS Users under Windows NT

SAS BI Dashboard 4.3. User's Guide. SAS Documentation

PharmaSUG Paper QT26

Tips and Tricks: Using SAS/GRAPH Effectively A. Darrell Massengill, SAS Institute, Cary, NC

Microsoft Dynamics GP Audit Trails

SECTION 2-1: OVERVIEW SECTION 2-2: FREQUENCY DISTRIBUTIONS

4 Other useful features on the course web page. 5 Accessing SAS

SAS Add-In 2.1 for Microsoft Office: Getting Started with Data Analysis

Visual Tutorial Basic Edition 1. Visual. Basic Edition Tutorial.

Plotting Data with Microsoft Excel

Generating ABI PRISM 7700 Standard Curve Plots in a Spreadsheet Program

Scientific Graphing in Excel 2010

Getting Started Guide SAGE ACCPAC INTELLIGENCE

Pastel Evolution BIC. Getting Started Guide

Connecting to Manage Your MS SQL Database

Table of Contents Find the story within your data

TIBCO Spotfire Business Author Essentials Quick Reference Guide. Table of contents:

Creating a Patch Management Dashboard with IT Analytics Hands-On Lab

Transcription:

Paper HOW-007 Graphing the Easy Way with SAS Enterprise Guide (or How to Look Good With Less Effort) Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY ABSTRACT Have you ever wanted to make some fancy graphs but were intimidated by coding them from scratch? Let Enterprise Guide do the hard part for you. This hands-on workshop will provide a brief overview of Enterprise Guide then walk you through creating different types of graphs. Bar charts, pie charts, scatter plots and more will be created. Once the graphs are done, we ll borrow the generated code, put it in another SAS program, make a few modifications, and then voila - fancy graphs from your program. We will use both the programming interface and Enterprise Guide in this workshop. INTRODUCTION Creating graphs from code can be challenging if you are not familiar with the graphing procedures. Therefore you may avoid graphing in SAS. You may even be tempted to export your data and create your graph in another application. SAS Enterprise Guide (EG) eliminates the need for avoidance and resorting to other software. With just a few clicks of the mouse you can create custom colorful graph code that can be dropped into your existing program. Once this is done there will be no need to export data; your graphs will become part of your SAS output. This hands-on workshop uses EG 4.1. All screenshots in this paper are also from EG 4.1. The datasets used are class and retail found in the sashelp library. This paper is intended to serve as a guide to what will be covered in the workshop. More detail and examples will be covered during the workshop at the conference. OVERVIEW OF THE ENTERPRISE GUIDE INTERFACE EG uses a point-and-click interface that is graphically orientated. Most of what you can do in the programming environment can be done in EG. There are some limitations to what EG can do and some of it depends on what SAS products you have licensed. A link to more information is in the References section of this paper. The menu bar in EG is very similar to those used on other Windows applications. It is not hard to get around in the software. There are some additions to the standard SAS menu selections that are only for EG, but the others are very much the same. Even the icons are intuitive as seen below. It is easy to get started using EG since the look and feel are similar to other software. Even without training, you can get started without much difficulty. Even though this hands-on workshop is only covering graphing, it is worth noting that more complex tasks such as statistical analysis and parameterized queries can be done in EG. Once EG is open, you can see that it has a much different look and feel than the programming environment. The screenshot below shows what EG looks like when you open it with the default settings: 1

BRINGING IN DATA Accessing the data you want to graph is the first step in creating a graph. Just like other SAS products, there is more than one way to do things. You can browse to your data or you can assign a libname. Since we are just working to create code to add to another program, the browse option will be used in this workshop. Here are three ways to add data to you project: 1. Select File Open Data from the menu bar 2

2. Right click in the Process Flow 3. Select Data from the open icon on the task bar Here is what the data icon looks like on the Process Flow. Once the data has been added to the Process Flow, tasks can be run against it. The data can be an existing SAS dataset or you can connect to a remote source. In order to create the graph code to add to a SAS program later, you will want to point to the same data that you are using in that program or create a subset of the data. This way there will be less editing of the code later. CREATING A BASIC GRAPH Creating the graph is a step-by-step process that can be launched from the menu bar or Task List. The Task List is a pop out menu that allows you to select by category or name. There are several types of graphs that can be created with EG. Bar Chart Pie Chart Line Plot Scatter Plot Area Plot Bar-Line Chart Bubble Plot Donut Chart Contour Plot Box Plot 3

Map Graph Radar Chart Surface Plot Wizards are available for the Bar, Pie, and Line plot types. The workshop will create a pie chart using the class dataset and a line plot using the retail dataset. The exercises will use both the regular interface for building the graph and the wizard. This is the bare bones version of a pie chart of the variable sex from the class dataset: Here is a line chart using the retail dataset: 4

Just a few clicks were all it took to get a nice graph. They are easy to understand and incorporate color. If this is all you need then you are set. However, you may want to do just a bit more to make you graphs a bit fancier. Again all it will take is a few more clicks. SPRUCING IT UP There are many things that can be done to the appearance of a graph. Different selections will be tested on each graph type to create a unique graph. Below are the different items that can be changed on a line plot. The available wizards for bar, pie, and line graphs take you through the graph creation process step by step. This makes it easy to get a custom look without clicking through all of the options. Each wizard will walk you through four or five steps to create a chart. Each step has a number of selections you can make to change the look of your chart. If you decide that you would like to make additional changes to your graph that were not available in the wizard, you can access the additional options by right clicking on the task and choosing Open in Advanced View This opens up the full task for you to make changes in. Once a task had been modified in the advanced view, you cannot go back to using the wizard. Here is a look at the second of four steps in the pie chart wizard. 5

Different styles are available to use or modify within EG. They are the same as those available in Base SAS. Using a style is a quick way to change the overall appearance of your graph. This is an extremely easy way to make yourself look good! After making some adjustments, here is a new version of the pie chart: 6

Now here is the enhanced line chart: CODE STEALING Now that the graph has been created, we need to get to the SAS code that has been created. Getting to the code is very easy. All you need to do is double click on the Last Submitted Code for the task you want to recreate in your program. This is the code created for the enhanced line plot. It does contain some comments and extraneous code that you can remove later. %macro _SASTASK_DROPDS(dsname); %IF %SYSFUNC(EXIST(&dsname)) %THEN %DO; DROP TABLE &dsname; %END; %IF %SYSFUNC(EXIST(&dsname, VIEW)) %THEN %DO; DROP VIEW &dsname; %END; 7

%mend _SASTASK_DROPDS; %LET _EGCHARTWIDTH=0; %LET _EGCHARTHEIGHT=0; /* ------------------------------------------------------------------- Code generated by SAS Task Generated on: Monday, July 20, 2009 at 9:37:29 AM By task: Line Plot Input Data: SASHELP.RETAIL Server: Local ------------------------------------------------------------------- */ PROC SQL; %_SASTASK_DROPDS(WORK.SORTTempTableSorted); QUIT; /* ------------------------------------------------------------------- Sort data set SASHELP.RETAIL ------------------------------------------------------------------- */ PROC SORT DATA=SASHELP.RETAIL(KEEP=DATE SALES) OUT=WORK.SORTTempTableSorted ; BY DATE; RUN; GOPTIONS xpixels=&_egchartwidth ypixels=&_egchartheight; SYMBOL1 INTERPOL=JOIN HEIGHT=10pt VALUE=NONE CV=BLUE LINE=1 WIDTH=2 ; Axis1 STYLE=1 WIDTH=1 MINOR=NONE ; Axis2 STYLE=1 WIDTH=1 MINOR=NONE ; TITLE; TITLE1 "Line Plot"; FOOTNOTE; FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %SYSFUNC(DATE(), EURDFDE9.) at %SYSFUNC(TIME(), TIMEAMPM8.)"; PROC GPLOT DATA = WORK.SORTTempTableSorted; PLOT SALES * DATE / VAXIS=AXIS1 HAXIS=AXIS2 FRAME; /* ------------------------------------------------------------------- End of task code. ------------------------------------------------------------------- */ RUN; QUIT; PROC SQL; %_SASTASK_DROPDS(WORK.SORTTempTableSorted); QUIT; 8

TITLE; FOOTNOTE; GOPTIONS RESET=ALL; Once you have the code open it can be cut and pasted into your program or exported as a SAS program to a chosen destination. Now that you have the code, it will be relatively easy to make the changes necessary to have it work in your program. PUTTING IT INTO YOUR PROGRAM (A.K.A. LOOKING GOOD) Once you have the SAS code open, sections can be copied, put into your program, and slightly modified to make you look good. EG creates some extra code that is not necessarily needed in your program. The most important items to include are the GOPTIONS and whichever graphing / plotting procedure was used. Next, the code generated from EG can be incorporated into an existing program. Edits will be necessary and it will be important to make sure that the libname and dataset name are correct. Then the code will be ready to run. Now, you have complete, functioning graph code in your program. You can keep it as is or choose to add additional options. Either way, you have saved yourself time by getting the graph you want from EG. CONCLUSION The purpose of this hands-on workshop is to give you the practice necessary to use EG to create SAS code to use in your other SAS programs to create professional (a.k.a. good looking) graphs. This may save you some time since much of what makes a graph look good is a combination of the GOPTIONS and specific PROC that is used. Complex code is sometimes required and it can be daunting to do from scratch. Letting EG help will get you on your way to getting the code you need. REFERENCES License requirements for EG Tasks: http://support.sas.com/documentation/onlinedoc/guide/sastasksandprocs.htm ACKNOWLEDGEMENT I would like to acknowledge the excellent paper A SAS Programmer s Guide to the SAS Enterprise Guide by Marje Fecht and Rupinder Dhillon presented at SESUG 2008 for providing a take off point for this paper. Please consult this paper for more useful information on using EG. CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at the following address: Stephanie R. Thompson Rochester Institute of Technology Nine Lomb Memorial Drive Rochester, NY 14623-5603 Work Phone: (585) 475-7237 Fax: (585) 475-7950 Email: Stephanie.Thompson@rit.edu Web: http://finweb.rit.edu/irps/ SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies. 9