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=

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 749 views
  • 0 likes
  • 2 in conversation