/*This file maps Kansas Congrssional District Three Outling the District and Counties and Cities within the District. */ /* If you have questions, please contact: Xanthippe Stevens Information Specialist The University of Kansas Policy Research Institute 1541 Lilac Lane, Suite 607 Lawrence, KS 66044 (785) 864-9111 xan@ku.edu */ libname tiger 'd:\data\tiger\'; /*Folder with Census TIGER data*/ filename dist3map 'd:\data\census\2000\dist3map.gif'; data dist3; /*set the chained TIGER data for counties and cities in Dist. 3*/ set tiger.county045 tiger.city045 tiger.county091 tiger.city091 tiger.county121 tiger.city121 tiger.county209 tiger.city209; run; data test; /*Add a point to draw distict outline within Douglas County as District boundaries are county boundaries except NW Douglas County*/ set dist3; where (line=120 or line=588) and geo=45; geo=999; line=_n_; output; type="county"; geo=999; line=1.5; tlid=99999999; x=-95.329915; y=38.869815; segment=1; output; run; data disttest; set dist3 test; run; /* Project data before annotating separately the county and city data sets*/ proc gproject data=disttest out=task4 degree asis eastlong; id line; run; data city; set work.task4; where type="place"; run; data county; set work.task4; where type="county"; run; data annocnty; /*annotate county data*/ length function color $8; set county (keep=x y line type tlid geo segment); by geo segment; if first.segment then do row=line; line=1; xsys = "2"; ysys = "2"; function="move"; when= 'A'; output; end; else do row=line; function = "draw"; when= 'A'; xsys = "2"; ysys = "2"; line = 1; color = "blue"; size=2; if (_n_>1 and _n_<119) or (_n_>390 and _n_<462) or (_n_>587 and _n_<652) or (_n_>762 and _n_<917) or (_n_>1081 and _n_<1285) or (_n_>1406 and _n_<1540) or (_n_>1870 and _n_<2030) or(_n_>2092 and _n_<2418) or (_n_>2753 and _n_<2904) then do; color="black"; /* Draw points not on District boundary in thin black lines.*/ size=1; end; output; end; run; proc sort data=work.city; by placer segment; run; data annoplace; /*annotate city data*/ length function color $8; set city (keep=x y line type tlid placer segment); by placer segment; if first.segment then do row=line; line=1; xsys = "2"; ysys = "2"; function="poly"; when= 'A'; color="cxFFFF99"; style="msolid"; output; end; else do row=line; function = "polycont"; when= 'A'; xsys = "2"; ysys = "2"; line = 1; style="msolid"; color="cxFF9999"; output; end; run; data anno; /*concatenate annotated county and city data*/ set annocnty annoplace; run; data anno2; set anno; /*Adjustment figure to create larger map.*/ x=(x*3000)+30; y=(y*4000)+40; output; run; goptions reset=all gunit=pct border device=gif gsfname=dist3map ftext=swissb htitle=6 htext=3; proc gslide annotate=anno2; run; quit;