/* You must specify paths for these variables */ %let path=path-to-your-web-server; %let mappath=path-to-your-sasgraph-map-data; goptions reset=all dev=java; libname maps "&mappath"; ods html file='annotate.html' path="&path"; data city; set maps.uscity; if (featype eq 'city'); if ((city eq 'Raleigh') or (city eq 'New York') or (city eq 'Orlando') or (city eq 'Chicago') or (city eq 'San Francisco') or (city eq 'Los Angeles')); rename city=text; keep x y city; run; data anno_city; set city; length color $8 style $15; xsys='2'; ysys='2'; when='a'; length function $ 8 color $ 8; hsys='5'; size=4; style="'Helvetica'"; function='label'; x=-0.32135; y=-0.01648; position='3'; text='Los Angeles 12%'; output; function='label'; x=0.10520; y=0.08526; position='1'; text='Chicago: 20%'; output; function='label'; x=0.28540; y=0.09317; position='2'; text='New York 68%'; output; function='label'; x=0.22139; y=-0.13523; position='e'; text='Orlando'; output; /* Pie */ px=20; py=65; rt=.12 * 360; xsys='3'; ysys='3'; function='pie'; angle=0; x=px; y=py; rotate=rt; size=15; style='psolid';color='yellow'; line=1;output; angle=rt; rt=0.2 * 360; rotate=rt; color='red'; output; angle=rt + angle; rt=0.68 * 360; rotate=rt; color='blue'; output; px=20; py=65; rt=.12 * 360; xsys='3'; ysys='3'; color='black'; size=3; rotate=0; angle=0; function='label'; x=px + 12; y=py+7; text='12%'; style="'Helvetica'"; position='2';output; function='label'; x=px; y=py+20; text='20%'; style="'Helvetica'"; position='e';output; function='label'; x=px-5; y=py-15; text='68%'; style="'Helvetica'"; output; /* New York */ xsys='2'; ysys='2'; function='move'; x=0.28540; y=0.09317; output; function='draw'; x=0.22139; y=-0.13523; size=8;color='blue'; output; /* Chicago */ function='move'; x=0.10520; y=0.08526; output; function='draw'; x=0.22139; y=-0.13523; size=4; color='red';output; /* Los Angeles */ function='move'; x=-0.32135; y=-0.01648; output; function='draw'; x=0.22139; y=-0.13523; size=2; color='yellow';output; run; title font='Helvetica' h=14pt bold 'Flight Frequency to Orlando'; pattern v=s c=ltgray r=10; proc gmap data=maps.us(where=(state not in (2 15))) map=maps.us anno=anno_city; id state; choro state / nolegend coutline=ltgray name='flights'; run; quit; goptions dev=activex; proc gmap data=maps.us(where=(state not in (2 15))) map=maps.us anno=anno_city; id state; choro state / nolegend coutline=ltgray name='flights'; run; quit; ods html close;