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?
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?
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.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.