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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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