%let name=us_and_europe; filename odsout '.'; /* Imitating map from: https://twitter.com/Bill_Gross/status/753985456338001920 */ data europe_map; set mapsgfk.world (where=(idname not in ('Iceland')) drop=resolution); run; /* use gproject to trim out a rectangular subset of europe */ proc gproject data=europe_map out=europe_map latlong degrees eastlong project=none longmin=-20 longmax=56 latmin=15 latmax=70 ; id id; run; data europe_map; set europe_map; x=long; y=lat; run; /* segment=1 is lower 48 US states, segment=2 is Alaska */ data us_map; set mapsgfk.world (where=(idname='United States' and segment=1) drop=resolution); /* 'move' the US into the same longitude range as Europe */ x=long+114; y=lat; run; data combined_map; set europe_map us_map; label x='x' y='y'; run; proc sql noprint; create table response_data as select unique id, idname from combined_map; quit; run; data response_data; set response_data; length colorvar $20; if idname='United States' then colorvar='US'; else colorvar='Europe'; length my_html $300; if idname^='United States' then my_html='title='||quote(trim(left(idname))); run; data anno_lat; length function $8; xsys='2'; ysys='2'; hsys='3'; when='a'; /* foofoo */ do y = 20 to 70 by 10; x=-20; function='move'; output; x=56; function='draw'; color='A00000033'; size=.3; output; x=-20; function='label'; size=.; color='gray99'; position='3'; text=trim(left(y))||'b0'x; output; end; run; goptions device=png; goptions xpixels=900 ypixels=700; goptions noborder; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="US and Europe maps, overlaid") style=htmlblue; goptions gunit=pct htitle=3.5 htext=2.6 ftitle="albany amt/bold" ftext="albany amt"; goptions ctext=gray33; pattern1 v=s c=grayf3; pattern2 v=s c=A0460f977; title1 ls=1.5 "United States map overlaid on Europe at correct latitude"; title2 ' '; proc gmap data=response_data map=combined_map anno=anno_lat; id id; choro colorvar / coutline=graydd nolegend html=my_html des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;