Data visualization with SAS programming

Working Through Paper 214-2013 "Creating ZIP Code-Level Maps with SAS"; Running Into Dead End.

Reply
Contributor
Posts: 46

Working Through Paper 214-2013 "Creating ZIP Code-Level Maps with SAS"; Running Into Dead End.

Paper I'm referencing is here http://support.sas.com/resources/papers/proceedings13/214-2013.pdf

 

The relevant detail is that up to this point, among other things, we've downloaded a file called gaz_zcta_national.txt, and we're now, I assume, going to use this file to continue with out work.

 

A sample of the text file is here

 

GEOID POP10 HU10 ALAND AWATER ALAND_SQMI AWATER_SQMI INTPTLAT INTPTLONG
00601 18570 7744 166659789 799296 64.348 0.309 18.180555 -66.749961
00602 41520 18073 79288158 4446273 30.613 1.717 18.362268 -67.176130
00603 54689 25653 81880442 183425 31.614 0.071 18.455183 -67.119887
00606 6615 2877 109580061 12487 42.309 0.005 18.158345 -66.932911

 

Can anyone confirm that the portion of code listed below (found midway through page 4 in the document) doesn't make sense in consideration of the sample text file, and the work Ms. Okerson has walked us through to this point? Specifically, since she hasn't had us create gazetteer2 yet and since the text file doesn't contain a field for state, this portion of the code is both premature and won't work without doing some other coding?

 

/*Import gaz_zcta_national.txt as gazetteer*/

data gazetteer; length ZCTA5CE10 $5.;

        set gazetteer2;

        ZCTA5CE10=left(geoid);

        if state='VA';

run; 

 

Thanks in advance.

SAS Super FREQ
Posts: 8,820

Re: Working Through Paper 214-2013 "Creating ZIP Code-Level Maps with SAS"; Running Into D

Hi: Is her email address at the end of the paper? Or any instructions. Perhaps there is something in the paper about how to contact her to get all the files she used.

cynthia
Super User
Posts: 19,157

Re: Working Through Paper 214-2013 "Creating ZIP Code-Level Maps with SAS"; Running Into D

Can't the state be derived from the GEOID so a filter could be applied once you determined the correct code for Virginia? I'm not sure if there are other changes but that should be enough to move to the next stage. 

 

Another place to find fully worked examples would be robslink.com 

Super User
Posts: 11,134

Re: Working Through Paper 214-2013 "Creating ZIP Code-Level Maps with SAS"; Running Into D

 

BTW, the zip code tabulation files can create very crazy looking maps in the western states in areas of low population density. In fact there will "holes" with no ZCTA area. I had done basically what this paper guides you through for Idaho and the result was very ugly. So looking into the definition of ZCTA you find out that they do NOT work well when you have areas that do not get postal mail delivered and hence are not assigned Zip codes (national wilderness areas and Air Force bombing ranges for example).

Ask a Question
Discussion stats
  • 3 replies
  • 163 views
  • 0 likes
  • 4 in conversation