BookmarkSubscribeRSS Feed
RandoDando
Pyrite | Level 9
I am working on an analysis by city, where I have percents/proportion of totals spent in 6 different categories at each city. I would like to present this in a way which makes these proportions stand out while also being able to compare all cities. I am picturing a stacked horizontal bar chart, with each city having a bar, but I'm afraid that would be too many bars for SAS graph. I haven't tried it yet, I'm afraid it may crash my session. So, before I do I want to know whether it's possible OR if there's another more efficient "visual" solution apart from just showing numbers.
4 REPLIES 4
PaigeMiller
Diamond | Level 26

I don't know if the software can handle this without crashing, but I am certain your audience will not be able to visually distinguish which bar represents which city.

 

Better, you should do some geographic plotting of your data like this PROC SGMAP example.

--
Paige Miller
RandoDando
Pyrite | Level 9
This was my other solution, maybe having separate maps for each category, then putting them together in a template. However, I was hoping there would at least be some visual feature in Proc Report that would do this.
ballardw
Super User

By SAS Graph do you mean the old device based procedures like Gchart? The newer SGPLOT/SGPANEL have more options.

 

The following apply to Sgplot (or Sgpanel):

You might consider using a VECTOR plot. That would require a bit more work on your part as you would need to calculate the start/end value for each segment but I think it is less likely to have issue with the number of plot items. The real question may be how indicate the city as text has to be readable.

 

Or maybe a Heatmap. On dimension as the city (I think you need to have the variable as numeric and use the Bin options to make each city one bin) then have the 6 categories as the other and use a calculated value (percent? rate?) as a response to show "low" to "high" values.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 512 views
  • 1 like
  • 4 in conversation