An off-topic spot to chat about your musings of the day

Create and Post your bad data visualizations!

Reply
Regular Contributor
Posts: 232

Create and Post your bad data visualizations!

[ Edited ]

Hi all!

 

Happy Monday!  I always find it funny how things happen in clusters - I've had 3 separate conversations this weekend where the theme was bad data visualisation.  I also read a number of student papers this weekend and some were absolutely stellar, and others...weren't.  I know we all "know" the rules of data viz, but I thought it would be an interesting excercise to see what bad data graphics people could come up with in SAS (whether it's EG, EM, etc. - the more variety the better!), using SAS Datasets.  My plan is to use these examples as part of future talks I give to students; sort of a "What do you see wrong with this?" excercise.  Thanks in advance and I look forward to seeing what you come up with!

 

I present to you my submission:

proc template;
define statgraph sgdesign;
dynamic _WEIGHT _HORSEPOWER _MPG_HIGHWAY;
begingraph / designwidth=715 designheight=546;
   layout lattice / rowdatarange=data columndatarange=data rowgutter=10 columngutter=10;
      layout overlay;
         scatterplot x=_HORSEPOWER y=_WEIGHT / group=_MPG_HIGHWAY name='scatter';
         discretelegend 'scatter' / opaque=false border=true halign=right 
valign=bottom displayclipped=true across=1 order=rowmajor location=inside; endlayout; endlayout; endgraph; end; run; proc sgrender data=SASHELP.CARS template=sgdesign; dynamic _WEIGHT="WEIGHT" _HORSEPOWER="HORSEPOWER" _MPG_HIGHWAY="'MPG_HIGHWAY'n"; run;

Capture.PNG

Has my article or post helped? Please mark as Solution or Like the article!
SAS Super FREQ
Posts: 3,547

Re: Create and Post your bad data visualizations!

[ Edited ]

Bad visualizations are one thing, but could you submit reasonable SAS code that generates the graph? Or is poorly written SAS code part of the challenge?

 

In this case, there is no need to use data-specific names for the dynamic variables in the template. Use

dynamic _X _Y _GROUP;

and set the values appropriately in PROC SGRENDER.  

Regular Contributor
Posts: 232

Re: Create and Post your bad data visualizations!

Hey @Rick_SAS - good point; I must admit I used ODS Graphics Designer to generate the graph, and then took the (unmodified) code from it to use in my post.  I should have mentioned that and thanks for the reply.  

 

Chat soon
Chris

Has my article or post helped? Please mark as Solution or Like the article!
Community Manager
Posts: 2,842

Re: Create and Post your bad data visualizations!

If you're going to create horrible graphs, might as well be efficient about it!

Regular Contributor
Posts: 232

Re: Create and Post your bad data visualizations!

LOL "I'm not lazy, I maximize my downtime" is one of my favourite sayings Smiley Very Happy
Has my article or post helped? Please mark as Solution or Like the article!
Ask a Question
Discussion stats
  • 4 replies
  • 308 views
  • 4 likes
  • 3 in conversation