BookmarkSubscribeRSS Feed
Malleable
Calcite | Level 5

So I have to review about 1000 graphs.  These will be a combination of States and Industries over a 16 year period.

I need line graphs showing dollar amounts spent, across 16yrs, by state and industry.

 

In Excel I use a PivotChart, so a table of Year, State, Industry, Value represent the columns.  I have going through the PivotChart, but really spend about 1 second looking at the graph and 7 seconds bringing up the new one.  Besides a lot of wasted time, I'm getting carpal tunnel. 

 

Ideally if I could have each of these graphs as a slide in Powerpoint I could just run a slideshow and hit the space bar.  Really fast and easy.

 

While I have programmed for quite a while, I know nothing about SAS Graph, ODS Graph, or SAS Visual Analytics, SAS Stat Studio.

 

Can I get some recommendations on how best I can get to a one button solution for reviewing 1000 graphs?

 

Thanks,
Mal

 

6 REPLIES 6
PaigeMiller
Diamond | Level 26

ODS HTML ought to work (although it might take a while to load this large HTML file)

 

ODS HTML FILE='graphs.html' path="c:\mydata" gpath="c:\mydata";
proc gwhatever;
...
run;
quit;
ODS HTML CLOSE;
--
Paige Miller
Haikuo
Onyx | Level 15

As you mentioned that you prefer PPT, so if  you have SAS 9.4, ODS supports native PPT destination, which will give you one-button view.

Reeza
Super User
The key is making sure your data is in the correct format so that you can ideally specify a BY statement and then, assuming SAS 9.4, output to either PDF or PPT, which you can then just tab through easily.
PGStats
Opal | Level 21

You should also explore SGPANEL to show many graphs on the same page with common axes. It is much easier to compare graphs visually when they are side by side than having to flip pages.

PG
Malleable
Calcite | Level 5

Thanks guys.

 

I have no experience with ODS Graph, and am pretty horrible macroing.

 

Could someone recommend the best resource where I can learn how to code this, or some pretty close coding examples for creating and exporting all these graphs?  I'm guessing its got a macro loop in it?

 

Thanks again,

Mal

RW9
Diamond | Level 26 RW9
Diamond | Level 26

There are a few methods you can use, for example from a dataset which has the loop elements:

data _null_;

  set loop;

  call execute('proc sgplot data=have (where=(variable="'||strip(loop_item)||'")); vbox x=x y=y; run;');

run;

 

Or proc template:

proc template;
  define statgraph regress;
    dynamic TICKS ;
    begingraph;
      layout overlay /xaxisopts=(linearopts=(tickvaluelist=TICKS));
        scatterplot x=age y=weight;
      endlayout;
    endgraph;
  end;
run;

proc sgrender data=sashelp.class template=regress;
  dynamic TICKS="11 13 16" ;
run;

If you need some graph coding examples, check this blog: 

http://blogs.sas.com/content/graphicallyspeaking/

 

However, I would of thought that there are far better ways to check data than scrolling through a whole load of graphs manually.  I don't know what you have to check but there a numerous data cleaning techniques which can be applied, upper/lower bounds, windows aggregates (i.e. mean per group on one graph) etc.  

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1067 views
  • 0 likes
  • 6 in conversation