Post a Comment
You probably heard the recent announcement this past Friday that Walmart will be closing 269 stores. Are any closing near where you live? This blog shows some really cool SAS maps to let you drill-down into the data!
I've seen a few maps showing which Walmart stores are closing, but they just didn't present the data in a way I could get my brain around. Therefore I downloaded the list, imported it into SAS, and created my own maps.
First, I plotted the data on a US map (limiting it to just the 48 contiguous states), and highlighted the states with a closing by making it a brighter color. I then set up the colored states so you could click on them and see a map of just that state. Note that the maps in this blog are snapshot images - but you can click them to see the real/interactive maps.
For example, if you clicked Louisiana, you would see the map below. There's a summary count in the title showing that 8 stores are closing in Louisiana, and the map shows a marker at each closing location. You can click a marker to bring up a Google map zoomed-in on that Walmart location.
Along with each state map is a summary table, showing the type of store and the street address. You can click the links in the table to go to the Google map, just like the drill-downs for the markers on the map.
I invite you to click any of the images above, to try out my interactive maps, and let me know what you think in the comments section. Or perhaps you would like to download my code, and try creating your own map!
Post a Comment
A number of years ago I was driving home to Alabama for the holidays. Typical of the season the driving was not easy. It was getting dark early and the traffic was fairly heavy. I had the radio on to pass the time. A talk show was on and the topic was Southern storytelling. The host was interviewing local storytellers. As you would expect, it was entertaining, but about how to be a storyteller – not just stories.
The host asked one of the guests if they embellish stories. The answer was not unexpected, “Yes, of course.” I was chuckling to myself likely nodding my head with what I expected to hear and unprepared for the rest of the answer. “Of course I embellish, that is the only way to tell the truth.” Unfortunately, I did not catch the name of the talker to give proper attribution, because this sage advice needs attribution. Or perhaps this was a secret that all storytellers know, but few reveal.
As she continued with this strange response, I began to see the wisdom of the conflicting ideas. How can embellishing help you tell the truth? The storyteller explained that to properly tell a story, you have to set the mood, the feeling of the event and the emotions, the sights, the smells – everything. The listener cannot truly get those senses because they obviously were not there. Embellishment replaces the senses and gives the listener a more accurate description by increasing the experience. I experienced one of those moments of universal truth.
I have heard the advice that to explain analytics requires you to tell stories with numbers. Frankly, I have never felt comfortable with the advice. It seemed trite and incomplete. It is not unusual to hear advice like this, most of the advice you read on presenting analytics seems to be good, but flimsy without a core or foundation we normally have for other aspects of analytics. Similarly, this storytelling with numbers advice needed a core reasoning for me to embrace it. Read More
Post a Comment
What strategy do you use to pick your lottery numbers? Do you suspect that the future winning numbers might be somehow related to the past winning numbers? If so, this blog's for you!
The Powerball lottery jackpot is up to about $1.4 billion - the largest lottery jackpot there has ever been ... in the history of the world!
If you've never played the lottery before, here's what a lottery ticket looks like (thanks Paul!) Basically, you pay $2 and pick 5 numbers (two of which I've scribbled out in pink in Paul's ticket below, so you won't know his exact lucky number!) And if those 5 numbers are drawn, you win. If more than 1 person also picks the same winning numbers, then you have to split the prize with them.
So, how do you go about picking your 5 lucky numbers? What's the min & max number range? Currently, you can pick numbers 1-69. The number range has changed over the years - in 2014 it was 1-59, and in 2005 it was 1-55. Here's a graph that shows the changes since 1998:
But what numbers are 'lucky'? Well that's the million dollar question! ... or actually, the 1.4 billion dollar question! Some people use birthdays, addresses, gym locker combinations, age, or phone number digits. Some people believe it's pretty well random. Some people believe numbers that have been picked in the past are also more likely to be picked in the future (because of the weight of the paint on the balls, etc). Or some people believe that if a number hasn't been picked in the past, then it is 'due' to be picked soon. Read More
Post a Comment
Whether your New Year’s resolution is to get SAS certified or to become a more advanced SAS programmer, we’ve got you covered with these upcoming SAS Press books, many of which will be making their bookshelf debut at SAS® Global Forum 2016 in fabulous Las Vegas!
- The SAS® Programmer’s PROC REPORT Handbook: Basic to Advanced Reporting Techniques by Jane Eslinger includes everything you need to build perfect reports, every time. Ever wonder how to add a logo to your reports, or how to use PROC DOCUMENT in conjunction with PROC REPORT? Look no further! This handbook has it all! (1st Quarter 2016)
- Multiple Time Series Modeling Using the SAS® VARMAX Procedure by Anders Milhoj will teach you the time series analytical possibilities that SAS offers today. This book teachers beginning to advanced users how to use PROC VARMAX to analyze a time series and build advanced models! (1st Quarter 2016)
- Clinical Graphs Using SAS® by Sanjay Matange provides the knowledge, the code, and helpful examples to create common clinical graphs with SAS graphics tools such as the SG Procedures and the Graph Template Language. It teaches you how to create the complex health and life sciences graphs you need to analyze biostatistics data, clinical data, and submit drug approvals to the FDA. With the addition of new features in SAS 9.4 and helpful examples in this book, these graphs become positively easy to make! (1st Quarter 2016)
- The DS2 Procedure: SAS® Programming Methods at Work by Peter Eberhardt teaches you how to speed up your processing by using DS2 programming to perform work in threads and process observations in parallel. This book introduces you to Object Oriented Programming methods, DATA programs, user-defined methods, predefined packages, and threaded processing. DS2 is the next wave of programming languages in SAS that will have you simplifying your big data problems in a snap! (1st Quarter 2016)
- Exploratory Factor Analysis with SAS® by Erin S. Banjanovic and Jason W Osborne demystifies exploratory factor analysis in SAS with an applied and user-friendly approach, using real-world examples with real data. It provides guidance for implementing best practices for EFA in SAS and interpreting the results for end users. This book reviews each of the major steps in EFA: data cleaning, extraction, rotation, interpretation, and replication. Faculty teaching with this book will love this book for their classes, and individual readers can learn at their own pace, practicing and reinforcing the concepts as they go! (2nd Quarter 2016)
Post a Comment
I was reading through Deloitte University Press' 2015 Holiday Spending survey - the results were interesting, but their graph made you jump through mental hoops to understand the data. So of course I used SAS to create a simpler version of the graph, so you'll have more time for holiday shopping!
But before we get to the nitty-gritty graphics, I wanted to share a picture of my friend Joy's tree. Notice that she decorates it with a "mermaid motif" which I think is quite unique and beautiful. (And speaking of holiday shopping, aren't those some nicely wrapped presents under the tree!?!)
And now, back to the analytics...
Here's Deloitte's graph. Notice that the title and area labels are not easy to read, and the graph seems a bit cluttered (both with the text labels on every data point, and the intersecting graphs). Also, I always discourage showing multiple area-under-line charts together, because it's difficult for the user to quickly know whether the charts are overlaid, or stacked. Also, it's not evident which color is 'good' and which is 'bad'.
After a bit of studying, it appeared that the "spend more/same" and "spend less" should always add up to 100%, therefore a stacked 100% bar chart seemed to be a much more intuitive way to graph this data. I added a reference line to make it clear where 50% is, because that's an important number. Here's my SAS graph, which is much easier to understand quickly:
Post a Comment
The English language, a mishmash of words from many tongues and with rules that aren’t always consistent, sometimes causes people to stumble when writing quotes. There are numerous humorous websites with examples of incorrectly-used quotes on signs saying things like “Sandwiches Prepared ‘Fresh’,” or “Help ‘Wanted’ – Please ‘inquire’ within”.
In SAS, we sometimes use quotes incorrectly as well, and macro neophytes often ask how to know when quotes are needed around macro variables, and when they’re not. Should we quote all our macro variables (no), and if only some, which ones? To answer I say two things:
- with regard to quotes, your code should look the same whether there are macro variables inside them or not,
- if there are quoted strings inside which you insert macro variables, be sure the quotes are double.
Consider the following code, which contains a WHERE statement referencing both a character and a numeric value, and no macro triggers:
where sex='F' and height < 63;
proc print data=work.test;
title 'Girls Below 63 Inches';
Next, I add two %LET statements, and several macro variable references. Notice however that I neither add nor remove any quotes, instead the quotes stay in the same places – I simply change single quotes to double quotes:
Post a Comment
If you're just a casual Star Wars fan, you might be confused about the order of the movies. Here's a SAS graph that will help you make sense of it all, before Episode VII comes out this week!
If you'd like to see how I created this custom graph, here's a link to the SAS code. There are all kinds of neat tricks demonstrated in the code, such as: annotating bars and labels, html hover-text and drill downs, date axis by 5-year increments, and the roman numeral numeric format.
And in the "random pictures from my friends" department ... I asked a handful of my co-workers if they had any Star Wars toys in their office. Within about 1 minute, I got a reply from Gordon that he just so happened to have a Yoda golf driver head cover! (Yoda is kind of a 'thing' here in SAS R&D, if you hadn't heard!)
Post a Comment
With the huge success of SAS® University Edition, we were very excited at the opening market for SAS titles and opportunities for new books. This year, we published three titles to help get you up and running with programming in SAS University Edition, explore the power of running statistical analysis in SAS, and apply your new skills in business.
An Introduction to SAS University Edition, by bestselling author Ron Cody, provides a comprehensive guide to getting started with SAS University Edition. It leads you through how to use it to solve problems, introduces the point-and-click interface of SAS Studio, and teaches you how to write your own SAS programs.
The newly released Essential Statistics Using SAS University Edition, by Geoff Der and Brian Everitt, demonstrates how to use SAS University Edition to apply a variety of statistical methodologies, from the simple to the not-so-simple, to a range of data sets. The book covers techniques such as multiple linear regression, logistic regression, and Poisson regression.
Business Statistics Made Easy, by Gregory John Lee, Wits Business School, helps readers to learn or refresh core statistical methods for business with SAS and practically approach real business analytics issues and techniques. The book avoids complex mathematics in favor of easy-to-follow explanations. Read More
Post a Comment
Continuing your education can be daunting. Just thinking about all of that time that could be spent relaxing and you have to carve out two hours to study…really!
Trust me when I say, I feel your pain. BUT, you will reap the rewards ten-fold, I promise.
Check out these top 10 best-selling books from SAS Press that will help you with that studying: