BookmarkSubscribeRSS Feed

[지도] 서울 지역구명 지도 표시(SAS 9.4)

Started ‎06-12-2020 by
Modified ‎06-12-2020 by
Views 112

* 출처 : http://support.sas.com/kb/56/546.html

 

/* Subset the map to a smaller area */

data maparea;

   set mapsgfk.south_korea;

   where id1='KR-11';

run;

 

/* Make the annotate macros available */

%annomac;

 

/* Determine the center of the map areas */

%centroid(maparea,centers,id);

 

/* Define an annotate data set to label the map areas */

/* with the national and English characters */

data names; 

   merge centers(in=a) mapsgfk.south_korea_attr;

   by id;

   if a;

   retain xsys '2' ysys '2' when 'a' function 'label';

   length text $20 color $8;

   text=input(IdnameU, $uesc50.);

   position='5'; color='black'; size=2;

   output;

   text=trim(idname);

   position='8'; color='gray11'; size=1.5;

   output;

run;

 

/* Use a UTF8 SAS session to display the map with labels */

title 'Label map areas with national characters';

proc gmap data=maparea map=maparea;

   id id1 id  ; 

   choro id / anno=names coutline=graybb statistic=first nolegend;

run; 

quit;

Version history
Last update:
‎06-12-2020 05:38 AM
Updated by:
Contributors

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

Article Labels
Article Tags