BI Tools

Tips and tricks for building information maps, OLAP cubes, reports, and dashboards

BI Admin

Learn your way around a SAS BI installation.

Visual Analytics

Learn your way around the SAS Visual Analytics tool

Coding & Data

Extract, transform, and load your data into the SAS BI toolset

Stored Processes

Create and design stored processes like a rock star

Home » Data Visualization, Visual Analytics

SAS Visual Analytics: Maps and Data! Come on Down!

Submitted by on 2013-07-01 – 6:40 AM 6 Comments

When I was younger I would watch the Price is Right with my grandma – we loved to hear the announcer say, “Come on DOWN!”  There was so much excitement and enthusiasm as the selected contestant ran screaming down the aisle!  It’s exactly how I felt when I saw how awesome the maps were in the SAS Visual Analytics (VA) tool.  [Check this post for a basic VA tool overview and where to find more examples.]

In one of the And Data lab systems I have been busy preparing some customer demos. It’s always fun to show data on a map to help the customers understand the system capabilities. Usually it means using a stored process with PROC GMAP [see this paper or this video for a details] to display the data in SAS BI Dashboard or SAS Web Report Studio. It always piques interest.

Let’s Do Some Visual Analytics People!

When preparing the demos or papers, the first thing you need is a data source. For this blog, I use Clicky.Com to collect the statistics about the visitors, which I can download through their API and load into a SAS dataset. Clicky provides the country_code along with the latitude and longitude for each site visitor.  From listing the data I know that visitors from the countries most represented are US, India, UK, Canada, and Australia, but I don’t know much over that.  I’m hoping the Visual Analytics can bring some insight about the particulars.   

top 5 countries

For the demos, I am running SAS VA 6.1 on a single server, which is considered a non-distributed deployment.  Basically this means I am missing the fancy relational database hookup or co-located data provider.  For the small amount of data I have – this works okay.  However since the data loads into memory, I am limited by the lab system and thus I’m missing some of the super fast VA data processing bravado.  <heavy sigh>

Working with the Data

At first, I was a little surprised that SAS Management Console was an integral part of VA. You create libraries and register data just as you would for SAS BI. SAS VA is intended to work with databases but you can use CSV imports,  spreadsheets, and even  SAS datasets, which is what I have done.  

After you have a dataset registered in the SAS Management Console, you can view and manipulated it in the Visual Data Builder, which creates a metadata object that is essentially a view, but is called a query  This application is the most like SAS Information Map Studio.  It allows you to join data tables and create new data items.  When creating new data items, you can use SAS functions, such as YEAR or simply select how the variable is aggregated (ie, SUM, AVG, etc).  It also writes SQL code, which you can edit.

After I drag the dataset to the main work area I can make changes and then save the query as WebsiteVisits. Here’s a preview of the data with the columns I want to use.  Next I’ll save this query to the SAS Visual Analytics LASR library and load it into the SAS LASR server. 

SAS Data Explorer

Loading the Data

To load the data into the in-memory area, I switch to the SAS Visual Analytics Administrator application.  This application allows me to manage the environment, such as start/stop servers and load/unload tables. This part is different from the SAS BI tool.  I am loading the data into in-memory area and deciding what data is allowed there.

The green dot indicates the LASR Analytic Server and dataset is active.  When I saved the query earlier to the VA LASR libary, it was saved here and ready to load.

0613_va_maps_04

Visualize the Data

Once the query is saved and loaded into the SAS LASR server, I can use the SAS Visual Explorer to play with the data.  First I want to see if the data by country is interesting enough to show others. By clicking a variable to plot, such as country_code or geo_location, I can associate the latitude and longitude with the variable as shown below.  And I thought the GMAP Procedure was super easy.

sas va mapping

Come On Down!

When I drag the country_code variable into the work area, SAS VA displays a map – automatically!  All of the visits are represented by a bubble and the larger the bubble the more users in that area. To complete the visualization, I created some filters so I could the users interested in SAS Enterprise Guide. It starts at the worldview level but I am zooming in to the US level – where most of the blog readers live.  Let’s see where the most overly interested ones live – there are some large bubbles along the east coast. 

sas visual analytics us map

I have zoomed in on Washington DC area so you can see the detail available. Looks like a lot of hits outside of the city, which I suspect is Reston.  Uh-oh … could be the NSA.  They probably need some tips on aggregating data – I’m just saying.

0613_va_maps_06

How about a close-up …. of San Francisco and notice the slider – I’m not even zoomed in all the way.  Almost seems like I could go visit the person to see if the post has the answer.  I probably better take them a free copy of one of my books while I’m there. 

0613_va_maps_07

SAS is using the open data source called Open Street Map. Darrell Massengill, SAS Institute, presented a paper at SGF13 about having maps available in the SAS products: Google-Like Maps in SAS.  Looks like SAS 9.4 may be a little sexier as well due to these maps as well.  You can view his presentation here but it’s mainly focused on coding and not as much about Visual Analytics.

Well – what do you think?  

Learn SAS Visual Analytics

When it comes to business intelligence and analytical capabilities, SAS® Visual Analytics is the premier solution for data discovery, visualization, and reporting. Click here to learn more about the book.
The following two tabs change content below.

Tricia Aanderud

Director of Data Visualization at Zencos Consulting
Tricia Aanderud is a SAS Business Intelligence and Visual Analytics consultant based in Raleigh, NC who works for Zencos Consulting. She has written several books about SAS, presented papers at many SAS conferences, and has been using SAS since 2001. Contact her for assistance with your next project.

Tags: ,

6 Comments »

  • I hear your frustration and I think you make some valid points.

  • Nick Rose says:

    I guess the point I was trying to make is that WRS has dynamic mapping capabilities using OLAP cubes and no PROC GMAP needed, but it does need ArcGIS server. VA is likely to see the same dependency to ESRI in future if it is to see the same flexibility. However nothing has gone into improving the WRS mapping to keep it up to date with latest technology. It’s nice to have fancy looking maps in VA to entice new customers but it is disappointing that WRS has no enhancements to look forward to.

    Sorry to be cynical, but SAS see VA as a big ticket item to bring in new cashed up customers, whilst forgetting where the money for all this R&D is coming from. I am not critical of development, but of abandoning existing solutions with the expectation that we can just upgrade to a new platform. My organisation for one cannot afford to change infrastructure to leverage faster analytics it doesn’t need. We do however need a more modern mapping solution which we now, will never see in WRS.

  • Great point – I loved your article on the Look Before You Leap – you do an excellent job showing how easy it is to explore the data.

  • Good point Nick. I really like the Google-like details available on the map and I was happy to see SAS is bringing that capability to their other products as well.

    I’ll be curious to see how SAS handles the transition and how much it will cost current users. I respect the work that goes into creating the WRS reports and BI Dashboards, so I doubt if anyone will be satisfied with a solution that says those products are dead – use this now.

  • I think SAS Visual Analytics is awesome! As you point out producing maps is much easier than writing PROC GMAP code. 🙂

    Not only does the in-memory processing analyze data super fast, it’s data visualization whether it’s maps and data, charts, plots, tables or forecasts etc, allow users to make decisions quicker on large volumes of data.

    http://blogs.sas.com/content/anz/2013/03/06/look-before-you-leap-with-data-visualisation/

  • Nick Rose says:

    Thanks,

    It is great to see that VA is making maps easier, but as an advocate of WRS, let me point out a few things.
    Whilst bubble maps are easy to produce, they are not as informative as choropleth maps in which you can map any geographical boundary you want. In VA 6.2, they are adding this capability at the country level, but if you have custom boundaries then you are out of luck. To overcome this, SAS are looking into integration with ESRI as this would be the only way to accomplish more control out of map production.
    Users may not be aware that this capability and control is already available in WRS. The problem is that no development has occurred in the last 3 years meaning the technology has not been updated to be compatible with the latest ESRI technology which is quite impressive. Guess where this development is going instead -VA.

    Another reason why I feel us EBI users are being short changed and will be forced, sooner or later, to go down a costly upgrade path to VA.