Hi, I have been trying to map customers into three different categories red, green and yellow, which, as we can see works as expected. When I try to map providers for some reason the co-ordinates did not allign...not sure where did I do wrong. I have included my code here. I would appreciate any suggestion. Thank you Code: Code:
data mymap;
set maps.USCOUNTY;
where fipstate(state) = 'TX';
run;
/* Remove all internal county boundaries, just keeping the state outline */
proc gremove data=mymap out=outline;
by STATE; id COUNTY;
run;
data PROVIDERS;
set PROVIDER_2 (WHERE = (FLAG =1)); by STATE notsorted;
length function color style $8;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; style='psolid'; rotate=360; size=1;
color='black';
run;
data outline;
set outline; by STATE SEGMENT notsorted;
length function color style $8;
color='black'; style='mempty'; when='a'; xsys='2'; ysys='2';
if first.SEGMENT then FUNCTION='Poly';
else function='Polycont';
run;
/*
proc gproject data=PROVIDERS out=providers
eastlong degrees latlong dupok;
id county;
run;*/
data outline1;
set providers;
length function color style $8;
xsys='2'; ysys='2'; hsys='3'; when='a';
function='pie'; style='psolid'; rotate=360; size=1;
color='red';
run;
data outline_all;
set outline outline1;
run;
proc gmap map=mymap data=MAPPING_DATA_SEG4_3 all;
id state county; format value ranges.;
choro value / discrete
midpoints=1 2 3 legend=legend1
cempty=gray99 coutline=gray99
anno=outline_all
des='' name="&name";
run;
... View more