BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
nicktr18
Calcite | Level 5

I have web-scraped data for nine states for their top 100 rated beers, broken those top 100 beers from each state into eight style groups, and imported the data into SAS as a .csv file. I have inserted that table below.

 

My question is: what graph would best represent this data? I would like to show graphs for each style as well as a graph showing each state's best style.

Beer-results-1.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
Haris
Lapis Lazuli | Level 10

PROC SGPLOT VBAR is one graph you want to look into. First, you would need to transpose your data so that you have a State, Style, and BeerAmount columns.  Then you can plot anything you want.  For example:

 

PROC TRANSPOSE;
by Var1;
var Arkansas--Tennessee;
run;

 

PROC SGPLOT;
   VBAR State / response=BeerAmount group=Style groupdisplay=cluster;
run;
nicktr18
Calcite | Level 5

Thanks, Haris! Is there any way to break up the clusters and only show a single style at a time?

Haris
Lapis Lazuli | Level 10
Filter using WHERE STYLE=

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1075 views
  • 0 likes
  • 2 in conversation