%let name=crosswinds_b_dock; filename odsout '.'; /* The "B" dock, at Crosswinds Boating Center, Jordan Lake */ /* This is the floorplan image you're going to overlay the data on. Note that once you pick a coordinate system for your image, and estimate x/y positions of the things on that floorplan, then if you ever need to usdate the image, the new image *must* have the same proportions, and cover the exact same total area, or your estimated x/y coordinates are going to be off/mis-aligned. */ %let background_image=crosswinds_b_dock_image.png; /* Make the x/y size match the proportions of your background image. In this particular example, the original image 579x908 pixels. [Once you pick this xsize & ysize, you'll need to stick with it, because that is the coordinate system you'll be using to position the tables by X/Y positions.] */ %let xsize=321; %let ysize=776; /* The paper size needs to be a little bigger, to make room for the titles */ %let xpaper=500; %let ypaper=1000; goptions xpixels=&xpaper ypixels=&ypaper; /* This is the blank rectangular outline of the casino floorplan map (make sure it's the same proportions as the original map). You will later 'annotate' the floorplan image into this area. */ data floorplan_blank; idnum=1; x=0; y=0; output; x=&xsize; y=0; output; x=&xsize; y=&ysize; output; x=0; y=&ysize; output; run; /* This is the hard part!!! Estimating the x/y coordinates of each boat slip. Determine the x/y location of each boat slip by mousing over the location in an image editor, and recording the pixel-based x/y location. */ data slip_locations; input slip_num x y; /* flip the y-value, since SAS/GRAPH's coordinate system starts at bottom/left */ y=&ysize-y; datalines; 99 147 32 81 124 58 79 124 73 77 123 92 75 123 111 73 125 127 71 128 143 69 129 163 67 129 181 65 129 195 63 129 214 61 129 230 59 129 245 57 129 262 55 129 280 53 129 296 51 129 311 49 129 327 47 131 342 45 133 356 43 134 369 41 136 382 39 136 400 37 137 413 35 138 429 33 138 444 31 138 457 29 138 475 27 138 488 25 138 503 23 138 518 21 138 532 19 138 546 17 138 562 15 138 575 13 138 591 11 138 603 9 138 618 7 138 632 5 138 649 3 138 662 1 138 678 82 171 55 80 171 73 78 171 91 76 171 107 74 171 126 72 171 142 70 171 162 68 171 180 66 171 195 64 172 212 62 173 229 60 174 245 58 174 263 56 174 279 54 174 294 52 173 311 50 172 328 48 171 341 46 171 356 44 171 369 42 171 383 40 171 398 38 171 412 36 173 429 34 173 446 32 173 458 30 173 475 28 173 488 26 173 504 24 173 517 22 174 533 20 174 548 18 174 562 16 174 574 14 174 590 12 174 603 10 175 619 8 175 633 6 175 648 4 175 662 2 175 678 ; run; /* Info about who's in each slip */ data details; input slip_num details $ 4-80; datalines; 99 Greg (big-*ss houseboat) 81 Dan (orange VA-tech-colored v-hull) 79 Steven Doak, v-hull Larson (with power 3) 77 Robert (30' Suntracker pontoon) 75 Joe Troutman, 32' Suntracker pontoon/houseboat (with power 3) 73 DJ George Salami, v-hull Chaparral (with power 4) 71 Fourwinns 69 Chaz Henry, Pontoon w/ slide 67 Pontoon 65 Wet Medic, Jeff Gower (with power 4) 63 Chaparral (with power) 61 Crownline A2 59 Nice covered boat w/ speaker bar 57 Steve Gray (with power 2) 55 Maxum (with power 1 & 2) 53 Craig Strickland (with power 1) 51 Black Sea Ray 49 47 Stingray 45 43 41 Tidewater walk-around 39 Andiamo walk-around 37 square-bow boat 35 old sailboat 33 Hurricane 31 old wooden lift (turtle hang-oud) 29 Bentley pontoon 27 25 Nautic star 23 21 Suntracker pontoon 19 17 Regal v-nose 15 13 11 9 7 Sylvan pontoon 5 Yamaha v-hull 3 1 Sweetwater pontoon 82 Hurricane 80 78 76 Crownline 74 Ron Page (Suntracker Party Hut 30 pontoon) 72 Eric Karo, Garnett & Eddie, Be-Yach-ch (with power 4) 70 Party Hut (Bob Anderson) 68 Slow Hand, Jack/Speedo (with power 4) 66 Jimmy Brougham (with power) 64 Four Winns (with power 4) 62 John Campbell (with power 3) 60 A1 58 Yamaha (with ripped seats) 56 54 Maxum (with power 1) 52 225 50 Sailboat 48 Stingray 46 Tan cover 44 42 Blue cover 40 Yellow Star deck boat 38 Sailboat 36 Stingray 34 Chaparral 32 Nice sailboat 30 Hurricane 28 Mystique 26 Savannah pontoon 24 22 Sailboat 20 Sailboat 18 Pontoon 16 14 Sailboat 12 Flat pontoon 10 Sailboat 8 6 Sailboat 4 2 Xcursion pontoon ; run; proc sql; create table anno_dots as select slip_locations.*, details.details from slip_locations left join details on slip_locations.slip_num = details.slip_num; quit; run; /* Create an annotated dot for each table, with html mouse-over text */ data anno_dots; set anno_dots (where=(x^=. and y^=.)); length function $8 color $20; length html $100; html='title='||quote('Slip '||trim(left(slip_num))||': '||trim(left(details))); xsys='2'; ysys='2'; hsys='3'; when='a'; function='pie'; rotate=360; size=0.8; /* size=1.5; */ /* solid colored fill */ if trim(left(details))^='' then do; if index(details,'power')^=0 then color='yellow'; else color='Affffffaa'; /* alpha-transparent white */ style='psolid'; output; end; /* ring around outside of pie */ if trim(left(details))^='' then color='red'; else color='gray55'; style='pempty'; output; size=size*1.1; output; /* make the circle a little thicker with 2nd ring */ run; /* This is the floorplan image you'll annotate onto the blank rectangular gmap. */ data anno_floorplan; length function $8; xsys='2'; ysys='2'; hsys='3'; when='b'; function='move'; x=0; y=0; output; function='image'; x=&xsize; y=&ysize; style='fit'; imgpath="&background_image"; output; run; goptions device=png; goptions border; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" style=htmlblue; goptions gunit=pct ftitle="albany amt/bold" ftext="albany amt" htitle=2.9 htext=1.5; pattern1 v=empty; title1 ls=1.5 "Crosswinds Marina 'B' Dock"; footnote ls=1.0 c=gray "Spring 2013 snapshot"; proc gmap data=floorplan_blank map=floorplan_blank anno=anno_floorplan; id idnum; choro idnum / nolegend coutline=gray88 anno=anno_dots des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;