BookmarkSubscribeRSS Feed
acemanhattan
Quartz | Level 8

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.

3 REPLIES 3
Cynthia_sas
SAS Super FREQ
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
Reeza
Super User

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 

ballardw
Super User

 

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).

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 842 views
  • 0 likes
  • 4 in conversation