Architecting, installing and maintaining your SAS environment

Understanding US County Maps, http://support.sas.com/kb/61/209.html

Reply
Valued Guide
Posts: 610

Understanding US County Maps, http://support.sas.com/kb/61/209.html

I’m trying to understand http://support.sas.com/kb/61/209.html.

 

I was able to work with the counties on the example interface.  Although the interface has an obvious bug of showing numbers next to the counties.  I’d like to display just the counties.  My data table includes student admission data with just the county name, no numbers.  Where as the sample data has county plus the odd number code.  So when I used my data with the tables from the documentation only Washington showed up.  I’m not sure why Washington showed up.  Oddly when I removed the (number) or the last eight characters of US_counties1, I don’t notice a difference.  Maybe I need to register the updated table in some way or I’m doing the steps in Option two wrong.  My data doesn’t include an ID column.  I’m not sure what that is for in the steps so I stopped at step 4.

 

  1. “Create a new report in the SAS Visual Analytics Designer or a new visualization in SAS Visual Analytics Explorer.
  2. If the data has not already been loaded, import the US_COUNTIES1_VALIDATE_STATE table into the SAS® LASR™ Analytic Server.
  3. Specify the US_COUNTIES1_VALIDATE_STATE table as the data source for the report or visualization.  
  4. Right-click the NAME column.  Select Geography  ► Subdivision (State, Province) Names.  In the Province Names pop-up window, select United States.
  5. Add a geo region map to the report canvas and assign NAME to the Geography role.
  6. Change the Color role to MEASURE1 or MEASURE2 in order to better view the different U.S. counties.
  7. Right-click the ID column.  Select Geography  ► Subdivision (State, Province) SAS Map ID Values.

Change the Geography role on the geo region map to ID. “

Super User
Posts: 13,358

Re: Understanding US County Maps, http://support.sas.com/kb/61/209.html

Posted in reply to DavidPhillips2

Can't help with VA part but that odd number code you mention in "Where as the sample data has county plus the odd number code." is a FIPS county identifier. The first two characters are the FIPS State code and the following 3 are the county identifier within the state.

These codes are not odd, they have been around for a very long time. Long enough that SAS has several functions that use or return them: STFIPS, FIPNAME, FIPNAMEL, FIPSTATE, STATENAME and STNAMEL. Notice that the ID column also uses the same 5 character code

 

Does your data have state and county variables? If it turns out that you need the 5 character FIPS you can use the SASHELP.ZIPCODE data set to get the county fip, numeric variable County in the data set along with the STFIPS function to create it.

Ask a Question
Discussion stats
  • 1 reply
  • 98 views
  • 0 likes
  • 2 in conversation