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!


About Author

Robert Allison

The Graph Guy!

Robert has worked at SAS for over a quarter century, and his specialty is customizing graphs and maps - adding those little extra touches that help them answer your questions at a glance. His educational background is in Computer Science, and he holds a BS, MS, and PhD from NC State University.


  1. Robert Allison
    Robert Allison on

    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:

Leave A Reply

Back to Top