10-01-2015 03:34 PM
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?
10-01-2015 03:56 PM
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;
10-01-2015 04:16 PM
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.
10-01-2015 04:34 PM
10-01-2015 11:03 PM
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.
10-02-2015 07:30 AM
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?
10-02-2015 08:45 AM
There are a few methods you can use, for example from a dataset which has the loop elements:
call execute('proc sgplot data=have (where=(variable="'||strip(loop_item)||'")); vbox x=x y=y; 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:
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.