Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

ZIPCODE usage?

Regular Contributor
Posts: 240

ZIPCODE usage?

I just discovered the help.zipcode file in SAS. I wanted to include the X and Y to to my data set but it keeps stating not found . The examples I have seen are. How do I pull for other items?
ZIPCITY(‘02138’) returns ‘Cambridge, MA’
ZIPSTATE(‘02138’) returns ‘MA’
ZIPNAME(‘02138’) returns ‘MASSACHUSETTS’
ZIPNAMEL(‘02138’) returns ‘Massachusetts’
ZIPFIPS(‘02138’) returns 25 (FIPS state code for Massachusetts
SAS Employee
Posts: 224

Re: ZIPCODE usage?

I can't answer your question, but I can point you to the Resources in Maps Online. You will find Sample Programs, Tools and Sample Data in this area
SAS Employee
Posts: 170

ZIPCODE usage?

Proc Geocode (part of SAS/GRAPH) is probably what you are looking for.  It was added in SAS 9.2.  It does various forms of geocoding (address to location conversion) including ZIP Code and Street Address.

Given a data set that has a ZIP Code field/variable, it will add the Lat/Long values from sashelp.zipcode.

Note that ZIP Codes change frequently and updates to SASHELP.ZIPCODE are published Quarterly on the Maps Online site mentioned.

Other questions about ZIP Codes and Geocoding will get attention in the SAS/Graph community.

Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation