You might have seen a SAS Global Forum infographic floating around the web. And maybe you wondered how you might create something similar using SAS software? If so, then this blog's for you - I have created my own version of the infographic using SAS/Graph, and I'll show you how I did it!
How about a little SAS history trivia first? ... Before it was called SAS Global Forum (SGF), SAS' annual international conference was called SAS Users' Group International (SUGI). My buddy Rick Langston is a fixture at these events, having attended 36 of the 42 SUGI/SGFs (1976-2017). And Rick came up with a cool vintage photo for me to share - this is a young-looking Paul Kent demoing SAS Version 6 on MS-DOS for users in Reno, using an IBM PC-AT. This was SUGI in March 1985, when SAS was first introducing the PC version of its software.
And now, back to the infographic - here's the original 2017 SAS Global Forum infographic. I didn't create this version, but it caught my eye. It's a sharp looking infographic, and one of my friends asked if I thought I could create something similar (and maybe even make a few improvements along the way). Challenge accepted!
As with many of my infographics and dashboards, I started by creating a custom Proc Greplay template, which allows me to place multiple graphs on the same page. Basically I used two graphs - a Proc GMap for the world map, and a Proc GSlide for everything else. Here's what the blank template looks like, with one large overall space, and then a smaller inset for the map:
Next, I worked on the GSlide, which contains everything except the world map. This involved a lot of data-driven annotation. I used the annotate label function for the text, the bar function for the bars in the top/right, the pie function for the three pie charts, the move & draw functions for the dotted lines, and the label function again for the pictures in the bottom/left (specifying hex code characters from the Wingdings font). I could have hypothetically used Proc GChart for the bar charts and pie charts, but using the annotate version allowed me a little more flexibility for their custom layout. Here's the Gslide portion of my infographic:
Everything Except Map
I then used Proc GMap to draw the world map, and annotated the numbers and labels at the desired latitude/longitude locations. I prepared the map by using Proc GProject and the gall projection to get the map in a visually pleasing layout (and cheated a little by using GMap's stretch option to have the map fill in the entire area). I used GProject's recently-added parmout option to save the map's projection parameters, so I could apply them separately to the annotated text (rather than having to combine the map and text, and project them together). If you're interested in the nitty-gritty details, here's a link to the complete SAS code.
And here is my final infographic! (you can click here to see the full size interactive version, with HTML mouse-over text)
Did you notice the improvements between my version and the original? See if you can spot them all first, before reading the list below!
- I used a more complete / descriptive title.
- I programmatically calculated the lengths of the bars, so they are proportional to the data values.
- I used a single color for the bars, since the multiple colors didn't really have any significance.
- I used just the number, rather than a bar, for the 'Other' category, to de-emphasize it.
- And I kept the long Sample Job Titles on a single line, rather than splitting them into 2 lines.
Are you thinking "Wow - I didn't know SAS could do that!"? - Well now you know! :-)