Date: Tue, 24 Jul 2007 13:50:12 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: how to annotate zipcode to a US map
Hi Art,
Looks like we have another yhuang :-) yhuang01@gmail.com is not me at
ya.huang@amylin.com. I wonder what is his/her real name.
Ya
On Tue, 24 Jul 2007 13:26:53 -0400, Arthur Tabachneck <art297@NETSCAPE.NET>
wrote:
>Ya,
>
>Have you downloaded the latest version?
>( http://support.sas.com/news/feature/2q2007/zipcode.html ; they also
>provide some example code ) and did you sort the file by zipcode?
>
>Art
>-------
>On Tue, 24 Jul 2007 14:15:34 -0000, yhuang01@GMAIL.COM wrote:
>
>>I have selected a few zip codes from sashelp.zipcode and try to clip
>>them to a US map. However, the zip codes didn't projected correctly
>>and the annotation ended up outside the map.
>>Some code from my program:
>>......
>> data uszip (keep=zip x y state); set sashelp.zipcode;
>> x=atan(1)/45 * x*-1;
>> y=atan(1)/45 * y;
>>proc sort; by zip;
>>run;
>>.....
>>data tuftszip;
>> merge i_zip(in=intufts) uszip; by zip;
>> if intufts;
>>run;
>>
>>proc gproject data=tuftszip
>> out=tempxy project=gnomon;
>> id state zip;
>>run;
>>....
>>data label_tufts;
>> length function $ 8 text $8 position $1;
>> retain xsys ysys '2' hsys '3' when 'a';
>> set tempxy;
>> function='label'; style='swissb'; text=put(zip, z5.);
>> cbox='white'; cborder='black'; color='black'; size=2;
>>position='B';
>>run;
>>
>> proc gmap map=maps.us data=tempxy annotate=label_tufts;
>> id state;
>> choro site /
>> discrete coutline=black
>> nolegend anno=label_tufts;
>>run;
>>quit;
>>
>>does anybody have a clue how I can fix this problem? Thanks.
|