Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

Similar documents
Information Visualization

Information Visualization

Easing into Data Exploration, Reporting, and Analytics Using SAS Enterprise Guide

SAS Studio: A New Way to Program in SAS

Paper ###-YYYY. SAS Enterprise Guide: A Revolutionary Tool! Jennifer First, Systems Seminar Consultants, Madison, WI

SAS Web Report Studio 3.1

SAS Visual Analytics 8.2: Getting Started with Reports

PowerPoint Tips and Tricks

Chapter 10 Working with Graphs and Charts

PowerPoint 2010 Introduction

Microsoft PowerPoint 2002

PowerPoint X. 1. The Project Gallery window with the PowerPoint presentation icon already selected. 2. Click on OK.

A Frontpage Tutorial. Contents Page

Outlook Web Access. In the next step, enter your address and password to gain access to your Outlook Web Access account.

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Password Memory 7 User s Guide

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007

ChemSense Studio Client Version 3.0.7

Grade: 7 Lesson name: Creating a School News Letter Microsoft Word 2007

Interface. 2. Interface Adobe InDesign CS2 H O T

Let s begin by naming the first folder you create Pictures.

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version):

Microsoft Word Tutorial

ABSTRACT MORE THAN SYNTAX ORGANIZE YOUR WORK THE SAS ENTERPRISE GUIDE PROJECT. Paper 50-30

CROMWELLSTUDIOS. Content Management System Instruction Manual V1. Content Management System. V1

Enterprise Client Software for the Windows Platform

Paper William E Benjamin Jr, Owl Computer Consultancy, LLC

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

Microsoft Word 2007 on Windows

I KNOW HOW TO PROGRAM IN SAS HOW DO I NAVIGATE SAS ENTERPRISE GUIDE?

No previous knowledge of Java is required for this workshop.

Unit 8. Lesson 8.1. Microsoft FrontPage. Introduction. Microsoft FrontPage-1. Microsoft FrontPage

Introduction. Using Styles. Word 2010 Styles and Themes. To Select a Style: Page 1

PowerPoint Launching PowerPointX

Creating Simple Links

Microsoft Excel 2007 Lesson 7: Charts and Comments

Introduction To Inkscape Creating Custom Graphics For Websites, Displays & Lessons

FrontPage. Directions & Reference

Using Windows 7 Explorer By Len Nasman, Bristol Village Computer Club

Viewing Reports in Vista. Version: 7.3

Elixir Ad-hoc Report. Release Elixir Technology Pte Ltd

Note: For more information on creating labels in CDS, watch Volume 22 of the Fast Class Update: Label Creation.

PowerPoint for Art History Presentations

There are six main steps in creating web pages in FrontPage98:

QuickStart Guide MindManager 7 MAC

Week 5 Creating a Calendar. About Tables. Making a Calendar From a Table Template. Week 5 Word 2010

NCMail: Microsoft Outlook User s Guide

How to insert table in Excel?

Using the Web in Mathematics Foundations Course An Introduction to Microsoft PowerPoint Sarah L. Mabrouk, Framingham State College

About Freeway. Freeway s Tools and Palettes

Working with Images 1 / 12

Microsoft PowerPoint Tutorial

Microsoft Word 2011 Tutorial

Sedao Ltd. QuickChange PROject. User Manual for QuickChange PROject version 2.1.5

The Fundamentals. Document Basics

NCMail: Microsoft Outlook User s Guide

Data Grid Utilities - Searching Data Grids

Microsoft Excel 2013: Part 3 More on Formatting Cells And Worksheet Basics. To apply number formatting:

DecisionPoint For Excel

DETECTING ANOMALIES IN YOUR DATA USING ROUNDED NUMBERS Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

Lesson 1 New Presentation

VERINT EFM 8.0 Release Overview

Basic Intro to ETO Results

USING DRUPAL. Hampshire College Website Editors Guide

Microsoft Expression Web Quickstart Guide

ADOBE DREAMWEAVER CS4 BASICS

ZP NEWS ZONEPRO CUSTOMER SUPPORT NEWSLETTER. August 2010 Volume 14, Number 2

Interactive Tourist Map

Browsing the World Wide Web with Firefox

MindView Online - Quick Start Guide

Microsoft Excel 2007

Session 7 MS Word. Graphics. Inserting Clipart, and Graphics Modify graphics Position graphics

Microsoft FrontPage Practical Session

This book is about using Microsoft Excel to

AEMLog users guide V User Guide - Advanced Engine Management 2205 West 126 th st Hawthorne CA,

Creating Charts in Office 2007 Table of Contents

Word 2013 Quick Start Guide

Electronic Portfolios in the Classroom

The following instructions cover how to edit an existing report in IBM Cognos Analytics.

SharePoint 2010 Site Owner s Manual by Yvonne M. Harryman

AEMLog Users Guide. Version 1.01

ABOUT THIS COURSE... 3 ABOUT THIS MANUAL... 4 LESSON 1: MANAGING LISTS... 5

Appleworks 6.0 Word Processing

Solo 4.6 Release Notes

Introduction to Microsoft Word 2010

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

COMSC-031 Web Site Development- Part 2. Part-Time Instructor: Joenil Mistal

Excel 2013 Workshop. Prepared by

Where Did I Save That File?

Understanding the Interface

Getting the most out of Microsoft Edge

Teacher Activity: page 1/9 Mathematical Expressions in Microsoft Word

Orckestra, Europe Nygårdsvej 16 DK-2100 Copenhagen Phone

Microsoft PowerPoint Tutorial

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

SAS/ASSIST Software Setup

NVU Web Authoring System

Multi-Sponsor Environment. SAS Clinical Trial Data Transparency User Guide

PaperClip32. Revision 2.0

Excel 2013 Intermediate

Transcription:

Paper 160-26 Using Graph-N-Go With ODS to Easily Present Your Data and Web-Enable Your Graphs Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA ABSTRACT Visualizing and presenting data effectively using reports and listings can be a difficult task. The SAS System overcomes this difficulty by offering a wide variety of graphing capabilities with the SAS/Graph module. Using the SAS System you can use graphs as a data exploration technique to see patterns, trends, and anomalies and you can present your data as graphs to make data easier to understand. But hey, writing code for those SAS/Graph procedures is not for everyone. There is now great news for those who do want graphs but do not want to write program code. SAS recently introduced Graph-N-Go, a completely interactive interface for making several types of graphs from your SAS data sets. I know it's a goofy name, but Graph-N-Go is anything but goofy. Graph-N-Go provides you with the facility to create great looking two and three-dimensional graphs without any programming and with only a little effort. This paper will lead you through the features of Graph-N-Go to start you on your way to turning data into information graphically with point-and-click, drag-and-drop ease. As an added bonus, you will learn how to use Graph-N-Go to create Web enabled HTML documents containing your graphs. INTRODUCTION Graph-N-Go isn t exactly brand new any more. But I am amazed at how many people have not yet heard of it. It s like SAS best kept secret. I stumbled across it a couple years ago while looking around the SAS web site. I immediately began using it. Wow! I couldn t believe how easy it is to use to create great looking graphs. But what's even better, Graph-N-Go provides the facility to save your great looking graphs to web ready HMTL files with JAVA, ActiveX, and GIF formatted graphs. You say you can't program JAVA and ActiveX - no worries. Graph-N-Go will let you create your JAVA and ActiveX graphs with point-and-click, drag-and-drop ease. Graph-N-Go will even save the SAS/Graph code with ODS statements. To start Graph-N-Go in version 6.12, 7, or 8 use the Display Manager command 'af c=sashelp.gng.gng.scl'. In version 8 you will find a pull-down menu selection for Graph-N-Go under "Solutions"Reporting"Graph-N-Go. These commands launch the Primary Graph-N-Go Window as seen below (this view being of an already completed Graph-N-Go project). Using Graph-N-Go you can:. create a wide variety of graphical views of your SAS data, including plot, bar, and pie formats. choose the statistics for your graphical views, including frequency, percent, mean, and sum. customize the look of the graphical views. create multiple graphical views of the same or different data. filter your source SAS data by row and column. export your graphical views to a wide variety of file formats. save and recall your work Graph-N-Go is well documented in the Graph-N-Go help file. To view Graph-N-Go help, after launching Graph-N-Go use the pull-down menu "Help"This Window. GETTING STARTED The Graph-N-Go interface is a SAS/AF application. If you are running the SAS System version 6.12 you will need to first install the Graph-N-Go interface. You can find the Graph-N-Go interface for version 6.12 on the SAS Institute web site (http://www.sas.com). If you are running version 7 or 8 the Graph-N-Go interface is included in the SAS installation. However, the version 7 help file is not. You can get the version 7 help file from the SAS Institute web site (http://www.sas.com). There are two areas in the Primary Graph-N-Go Window: the Model workarea and the Viewer workarea. The Model workarea is where you define your SAS data models from which you will create your graphs. The Viewer workarea is where you will place your graphs, or graphical views. To create graphs, you will follow a process of first creating your data models, then creating your graphs, and then outputting your results. 1

Graph-N-Go is identical under SAS version 6.12 and 7. In version 8 Graph-N-Go has a few additional features and a different look in some places. In this paper you will see Graph-N-Go as it appears in SAS version 8. If you haven t upgraded to SAS version 8 yet, now is a good time to do so. CREATING A DATA MODEL In the beginning, you will need to create one or more data models. A data model comes from an existing SAS data set or a multidimensional database that you define in the model work area. By doing so, you can establish particular attributes for the SAS data set or a multidimensional database and include row and column filters. You can define as many data models as you like: they can be different views of the same SAS data file or they can be from different SAS data files. You might wonder why you must create a data model. Well, by doing so you can quickly and easily access your data (ready with any filters and attributes you assign to your model) each time you create a new graph. It might seem like an extra step at first, but as you create ever more graphs from the same SAS files you will find the data model concept to be a great time saver. After opening the desired SAS data set, information about that SAS data set will appear in the dialog box. You can use the 'Table View' tab to view the SAS data set. You can also use the 'Column Filter' tab to remove columns from your model. Doing so will not remove the columns from the source SAS data file. Press 'OK' to continue. To create a data model, from the Primary Graph-N-Go Window press one of the 'New Model' icons. This will bring up the 'SAS Dataset Selection' dialog box. First, select the desired SAS data set by pressing the button to the right of the SAS Dataset box. Returning to the 'Graph-N-Go' project window, we now see our model in the Model workarea. Right-click on the model icon and select 'Properties' from the resulting pop-up menu, or double-click on the icon for your data model to get the 'Properties' dialog box. This brings up the 'Open' dialog box where you will select the desired SAS data library and SAS data set. If the SAS data library you need is not already allocated, use the 'Create library' icon. Select the desired SAS data library and SAS data set by clicking on them. Then, press 'Open'. This will launch the data model properties dialog box. 2

From this dialog box you can review the properties of your model. An important feature you will find here is the ability to subset the data in your model. Use the Subset Data' tab to define a SAS WHERE expression. Press the button to the right of the 'Where Expression' box. You will now see your WHERE expression displayed in the Properties dialog box. There are other important attributes you can assign to your data model. For example, you can give it a name different from the default two level SAS data file name. You can use the Column Roles tab to set attributes for the columns you will use in your graphs. When you are finished reviewing the properties, press the 'OK' button to return to the Primary Graph-N-Go Window. You are now ready to create graphs or create more data models. CREATING GRAPHS Creating great looking graphs is as easy as pressing a button. Start by pressing one of the graph type icons for bar, pie, plot, or overlay. SAS will float a dotted box over the Viewer workarea. Place the box where you want and click your mouse once. Once you click, the box will become solid. This brings up the 'Where Expression' dialog box. Follow the prompts to create the desired WHERE expression. Notice how the WHERE expression is shown in the lower box as you develop it. When you have finished defining your WHERE expression, press the OK button. Double-click inside the box to bring up the 'Chart' properties window. This returns you to the Properties dialog box. 3

Customizing your graph is easy. You can right-click your mouse on the graph to get a pop-up menu of shortcuts used to change some of the properties. This is a great way to quickly change some of the properties, such as the category and response variables, and see the impact on your graph. Because you can create more than one model in your Model workarea, you need to specify which model you want to use for each chart. You must do this even of you only created one data model. Use the arrow button to see a list of the available models. Drop the cursor on the model you want. Next, you will notice Graph- N-Go has provided a screen full of options for you to tinker with. You will now be ready to make the necessary selections to customize your graph or chart. Press the Data tab. Some properties you can only change from the Properties dialog box. Use the right-click shortcut to the 'Properties' dialog box or double-click your mouse on your graph to open the Properties dialog box. The Appearance tab allows you to set many appearance features. You can change the color, order, orientation, and style of the graph. You can also place reference lines on the graph. The preview window in this dialog box is a very handy way to quickly see how each of the options will affect your graph. You can now select the character column for the 'Category', a numeric column for the 'Response', and character columns for the 'Group' and 'Subgroup', if desired. Select the desired 'Statistic' for the graph values. And check Show Bar Values' if you want the statistics values to appear on the graph. At this point, you can press 'OK' to return to the Primary Graph-N-Go Window to see how your graph looks so far. Using the 'Title/Footnotes' tab you can add titles and footnotes to your graph. Use the button to the right of the title and footnote to open the dialog box to change the title and footnote color, font, and alignment. After making all the changes you want to the properties, press the 'OK' button to return to the Primary Graph-N-Go Window. 4

If you find your graph is too small, after right-clicking your mouse on your graph, choose 'Grow/Shrink'. You can easily resize your graph by dragging the corner of the graph's boundary box to the desired size. Alternatively, when in Growing Mode, you can click on one of the boundary lines of your graph. This will highlight the boundaries and allow you to drag the boundaries to resize the graph. Your finished project might look like the graph pictured below. This will bring up a typical MS-Windows dialog box to specify a folder and filename for the external file as well as specify the graphics file type. After reviewing your graph, you can make changes simply by right-clicking your mouse on your graph again and modifying the properties. EXPORTING YOUR GRAPHS Once you have the graph you like, what then? You can print your graph or save it. Graph-N-Go in SAS version 8 has some new, wonderful exporting capabilities. You can export your graph to a graphics file format, an HTML format, a SAS image entry, and you can also save the SAS source code that created your graph. Graph-N-Go will let you choose from the most popular graphics file types. To save your graph to an external graphics file, right-click on the graph and select "Export." Then select External file. After selected the folder, filename, and file type, press the Save button. This will return you to the External File Preview window. This will open the 'External File Preview' window. Press the button to the right of the 'External File' box. 5

This might seem a little tricky - but having pressed the Save button did not save your graph to an external graphics file. You must now press the Write button to actually export the file. This will launch the Export to window. Use the pull-down button to select the type of HTML output you desire. If you want to save your graph to an HTML file, follow the same steps as shown above for exporting to external graphics files, selecting the HTML File option instead. You will also select the type of graphics entry. You can choose from Static Image, JAVA, or ActiveX. The Static Image' option will actually save your graph as a GIF' file and link it to the HTML document it also creates. This is covered in more detail later, in the section titled Web Enabling Your Graphs. If you want to save your session to a SAS image entry, follow the same steps as shown above for exporting to external graphics files, selecting the IMAGE Entry option instead. SAVING YOUR CODE Graph-N-Go in SAS version 8 has an excited new feature: you can save the SAS code behind your Graph-N-Go creation. Simply follow the same steps as shown above for exporting to external graphics files, selecting the Source file option instead. You can then run the saved code from the SAS Program Editor or add the code to your existing code applications. Cool. What s more, with version 8.1 the saved code contains ODS statements. Modifying the ODS statements in your saved code is simple and provides you with plenty of power to tweak your web enabled graphs to your liking. SAVING YOUR WORK If you want to save your Graph-N-Go session for later use, simply use the pull-down menu choice "File"Save As. If you do not want to create a JAVA or ActiveX enabled document, use the Static Image option. Next, press the button to the right of the HTML File box to launch the file selection dialog window. Follow the prompts to save your work to an existing SAS data library and existing catalog. Your session will be saved as a catalog entry. When you want, you can return to Graph-N-Go and open your catalog entry to recall your Graph-N-Go work. Cool. Simply select the desired drive and folder, and input a file name. Then, press the Save button. Upon returning to the Export to window press the Write button. You now have an HTML file and an associated GIF file ready to upload to your web site. SAS will create the associated GIF file in the same folder as the HTML file and use the same filename, with a gif extension. WEB ENABLING YOUR GRAPHS Web enabling your graphs is simple, if you are running SAS version 8. All you have to do is to export the graphs to an HTML format. You can chose from a static image, an interactive JAVA applet format, or an interactive ActiveX control format. The static image format will create an HTML document and an associated GIF file. After completing your graph, simple right-click on the graph or use the File"Export menu option. Want something even better? Sure you do. Instead of selecting a static image, use the Interactive JAVA Applet option. From the Export to window, use the pull-down button to select the Interactive JAVA Applet option. From the resulting menu, select the option HTML file. 6

Then, simply enter the desired drive, folder, and filename in the resulting file selection dialog window. Then, as always, once back in the Export to window, press the Write button. For example, you can change the shape of the bars and change their orientation. Look at the result below. Important Note! The JAVA and ActiveX documents require applets loaded on the PC to display the graphs. These applets are installed with SAS. However, when distributing the graphs to users who do not have SAS installed on their PC, the applets will need to be installed. The applets are contained on a separate CD with the SAS version 8 software and can be downloaded from the SAS So, now you have a JAVA enabled HTML document. So, what? Well, there are many really cool features available to you and your users. Load the HTML file with your browser (remember, with the JAVA and ActiveX documents, there will only be an HTML document). This is just an example of what you and your user can do with your SAS graphs when you use Graph-N-Go to save them as HTML files with the interactive JAVA applet option enabled. Not enough to impress you? How about saving your graph with the interactive ActiveX control option enabled? From the Export to window, use the pull-down button to select the Interactive ActiveX Control option. Follow the same procedure as outlined above for selecting the destination for your HTML document. You re not going to believe how cool your HTML document is going to turn out. Look what happens when you place your cursor over the bars of the graph. Information about the bar is displayed. SAS is not running here. This is just your browser! Is there more? You bet. Right-click with your mouse over the graph. Look at the menu choices given to you. There are many options you can set and changed to alter the way the graph looks. Load the HTML document you created with your browser. [This also works if you use the default SAS ODS output viewer.] Like with the JAVA version, moving your mouse over the graph causes information about the bars to be displayed. But more impressive, right-clicking your mouse brings up some really cool options. [Bet you can t wait to turn the page and see what you can do with your ActiveX graph.] 7

CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Curtis A. Smith Defense Contract Audit Agency P.O. Box 20044 Fountain Valley, CA 92728-0044 Work Phone: 714-896-4277 Fax: 714-896-6915 Email: casmith@mindspring.com You can change the bar options, the graph color, and the chart type. That s nice. But look what you can do under the Data menu choice. You can change the statistics associated with the numeric variables. Do I know what I'm saying? (Or more accurately, do I know what I'm writing?) Yep, you can change the statistics of numeric variables. Suppose you create a graph with a numeric variable and use the sum statistic. One of your uses on the other side of the world might want to view that graph on your web site but see the numeric variable as a cumulative frequency. No problem. How about taking things a bit further. You can even change the way the variables that are displayed. When you created the graph, you selected a category variable, a response variable, and maybe a group variable and a subgroup variable. From the Data"Variable menu choice, you can change the variables you selected for the category, response, group, and subgroup variables. The only caveat is that you can only select from variables used in the graph that you created from Graph-N-Go. Any variables in your data model that you did not use in the graph you saved will not be available. CONCLUSION Producing great looking graphs that are a wonderful means of visualizing your data and presenting your information has never been easier now that the SAS System includes Graph-N-Go. No programming code required here. You and those you support can make your own graphs with point-and-click, drag-and-drop ease. And this great interface is part of the SAS/Graph system! What s more, Graph-N-Go allows you to easily save your graphs as web enabled HTML documents with JAVA or ActiveX controls. REFERENCE SAS version 6.12, SAS version 7, and SAS version 8, Help, Graph-N-Go object help ACKNOWLEDGMENTS SAS and SAS/Graph are registered trademark or trademark of SAS Institute Inc. in the USA and other countries. indicates USA registration. IBM and MVS are registered trademarks or trademarks of International Business Machines Corporation. Other brand and product names are registered trademarks or trademarks of their respective companies. 8