New U.S. sample data available in SAS 9.4

In previous versions of SAS, if you wanted to experiment with creating U.S. maps in Proc GMAP, there wasn't any good sample data available.  Unless you had your own data available, you probably ended up using the x/y points as your DATA= ... which is sort of a nonsense thing to plot on a map.

Now, in SAS 9.4 we ship a rich data set containing over 80 variables about the U.S. population! 

This makes it very easy & convenient to experiment with plotting different variables on a map.  The following example shows how to plot the population density for year 2010:

legend1 across=3 label=(position=top) shape=bar(.1in,.1in);
proc gmap data=sashelp.us_data;
id state;
choro density_2010 / levels=3 coutline=gray33 legend=legend1;

The new data (sashelp.us_data) contains values for the following, for each decade 1910-2010 ...

  • Population change expressed as %
  • People per Square Mile
  • People per Representative
  • Population
  • Density Rank: Most Dense(1) to Least Dense(52)
  • Number of Representatives
  • Seat Change

It also contains variables for the following values:

  • Name of State or Region
  • Two-letter Abbrev. for State Name
  • State Fips Code
  • US Regions
  • US Divisions

And, of course, you aren't limited to using this data just in Gmap -- you can use it in the other SAS/GRAPH procs, analytic procs, etc.

 Give it a try, and post a comment if you find anything "interesting" in the data!

tags: maps, New in SAS 9.4, sas/graph, tips and tricks


  1. Bruce Johnson
    Posted July 25, 2013 at 1:50 pm | Permalink

    Will this data be available to all 9.X releases?

  2. Robert Allison Robert Allison
    Posted July 26, 2013 at 9:13 am | Permalink

    The sashelp.us_data only *ships* with 9.4 (not previous versions), but Tech Support can probably package it up into a transport data file and let you download it.

    The person who maintains this data is out today, but I'll check with them when they return and see about getting it added to our "Maps Online" download page, so users with any version of SAS can easily download it if they want:

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>