Hi,
I'm trying to represent a subset of counties but need to have both couny labels & outlines as well as a state outline. I haven't been able to come up with the state-level boundary annotate file that would work.
What I have so far is:
data ohiomap; set mapsgfk.us_counties(where=(statecode='OH')); run;
%annomac;
%centroid(ohiomap,centroids,state county);
proc sql; create table anno_centroids as select a.*, trim(left(b.idname)) as text, '2' as xsys, '2' as ysys, '3' as hsys, 'a' as when, 'label' as function, '5' as position, 2 as size, 'black' as color from centroids a left join mapsgfk.us_counties_attr b on a.state = b.state and a.county = b.county;
create table ohiodata as select distinct county, 39 as state from anno_centroids where text like 'A%'; run; quit;
pattern1 v=s c=white;
proc gmap data=ohiodata map=ohiomap;* anno=anno_state; id state county; choro state / levels=1 nolegend anno=anno_centroids(where=(text=:'A')); run; quit;
This gives me counties that start with 'A' but I also need the state outline. If I use the 'all' keyword on the gmap statement, that works but includes all county boundaries, which I don't need. I've tried several approaches to generating the anno_state file but haven't gotten it right yet.
Thanks!
--Ben
... View more