%let name=mc1b; filename odsout '.'; %let mc1path=\\l72586.na.sas.com\public\VAST_2011\MC_1_Materials_3-30-2011\; libname mydata "&mc1path"; data matches; set mydata.microblogs; flag=1; run; /* Map for Mini-Challenge 1 http://hcil.cs.umd.edu/localphp/hcil/vast11/index.php/taskdesc/index */ %let my_map=&mc1path.Vastopolis_Map.png; %let my_map_bw=&mc1path.Vastopolis_Map.gif; /* Coordinates from the map in the MC1_Dataset_README.docx file */ /* bottom/left corner */ %let bottom_long=-93.5673; %let bottom_lat=42.1609; /* top/right corner */ %let top_long=-93.1923; %let top_lat=42.3017; data anno_image; length function $8 style $20 imgpath $100; xsys='2'; ysys='2'; hsys='3'; when='b'; flag=2; function='move'; x=&bottom_long; y=&bottom_lat; output; function='image'; x=&top_long; y=&top_lat; imgpath="&my_map"; style='fit'; output; run; /* a fake map area, to guarantee the extents of the map are covered */ /* (only needed when image area is bigger than map area) */ data my_map; map_id=0; x=&bottom_long; y=&bottom_lat; output; x=&top_long; y=&bottom_lat; output; x=&top_long; y=&top_lat; output; x=&bottom_long; y=&top_lat; output; run; data combined; set my_map anno_image matches; run; proc gproject data=combined out=combined dupok eastlong degrees; id map_id; run; data my_map anno_image matches; set combined; if flag=1 then output matches; else if flag=2 then output anno_image; else output my_map; run; /* turn matches into an annotate dataset of markers on the map */ data matches; set matches; xsys='2'; ysys='2'; when='a'; /* function='label'; style='albany amt/unicode'; text='25cb'x; */ function='point'; color='red'; /* color='Aff000055'; */ /* v9.3 transparent red */ run; goptions device=png; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title='IEEE VAST Challenge 2011 - mini-challenge 1') style=sasweb; goptions noborder; goptions cback=white; goptions gunit=pct htitle=16pt htext=11pt ftitle="arial/bold" ftext="arial"; legend1 across=1 label=none position=(right middle) order=descending shape=bar(.15in,.15in); pattern v=e color=gray99; goptions xpixels=1200 ypixels=700; title1 "Vastopolis city map"; proc gmap map=my_map data=my_map; id map_id; choro map_id / levels=1 nolegend coutline=graydd anno=anno_image des='' name="&name"; run; data anno_image_bw; set anno_image; imgpath="&my_map_bw"; run; title1 ls=1.5 "Geographical Distribution of all microblogs..."; proc gmap map=my_map data=my_map anno=matches /* (where=(date>='30apr2011'd and date<='17may2011'd)) */; id map_id; choro map_id / levels=1 nolegend coutline=graydd anno=anno_image_bw des='' name="&name"; run; /* proc gplot data= mydata.microblogs; plot y*x / name="&name"; run; */ /* proc print data=matches (obs=100); run; */ quit; ODS HTML CLOSE; ODS LISTING;