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.
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;
Thanks, Haris! Is there any way to break up the clusters and only show a single style at a time?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.