%let name=crabtree_build; /* sas crabtree_build.sas sas crabtree_categories.sas sas crabtree_ods.sas sas crabtree_stores.sas */ /* Viewed the following pdf at 60% size: http://www.crabtree-valley-mall.com/images/map/crabtree-map.pdf Screen-captured, and used MS Paint to move lower-level to the left. Then used MS Office Picture Manager to Picture->Crop. Looked at this jpg in IE, and right-clicked Properties -> dimensions are 875 x 752 pixels. */ /* Size (proportions) of your map jpg file */ %let xsize=875; %let ysize=752; /* This is the paper size - bigger than image, to accommodate titles, etc */ goptions xpixels=900 ypixels=850; /* Size of invisible annotated pie/dot's on the grid */ %let piesize=.5; libname here '.'; data here.crabtree_map; idnum=1; x=0; y=0; output; x=symget('xsize'); y=0; output; x=symget('xsize'); y=symget('ysize'); output; x=0; y=symget('ysize'); output; run; /* Use category abbreviations - this will save typing later, and also make it easier to pass these in the sas/intrnet url's and the macro variables (otherwise, there could be problems with special characters such as ', &, *, etc). Now, when passing parameters to sas/intrnet, I can use the 'cat' and/or the 'spacenum', which are both simple/short text. */ data cats; input cat $ 1-8 category $ 10-80; datalines; book Books, Cards, Stationery appc Children's Apparel dept Department Stores foodspec Food & Drink Specialties health Health & Beauty furnish Home Furnishings jewelry Jewelry & Accessories apparel Men's & Women's Apparel apparelm Men's Apparel elect Music, Electronics & Photography optical Optical restaur Restaurants service Services shoes Shoes special Specialty sports Sports Specialties court The Pavilion Food Court toys Toys & Games apparelw Women's Apparel ; run; /* I get the x/y locations by mousing-over locations in "Paint". The Paint coordinate system starts at the top/left, whereas SAS/Graph starts at the bottom/left, therefore I have to reverse my y-coordinate (y=&ysize-y). */ data crabtree_stores; input x y spacenum $ 11-18 cat $ 20-28 store $ 29-80; y=&ysize-y; spacenum=lowcase(spacenum); datalines; 813 503 26 dept Hudson Belk 493 309 27 dept Hudson Belk Men's Store 77 531 28 dept Macys 249 426 250 dept Sears 806 150 26 dept Hudson Belk 77 163 28 dept Macys 270 64 250 dept Sears 501 261 15 books Franklin Covey 440 206 16 books Hallmark, Daphne's 308 588 18 books Tinderbox 620 165 19 appc Baby Gap 242 607 249 appc Crew Cuts (Inside J. Crew) 633 204 21 appc Gap Kids 688 164 22 appc Gymboree 394 165 23 appc Janie and Jack 742 571 24 appc Justice 508 106 47 foodspec Auntie Anne's Pretzels 661 550 48 foodspec Dippin' Dots 297 647 49 foodspec Dunkin' Donuts 517 644 287 foodspec Gloria Jean's Coffee 316 202 50 foodspec Godiva Chocolatier 550 570 51 foodspec Gypsy's Candyland 328 571 52 foodspec Lindt Chocolate 242 246 53 foodspec Popalop's Candy Shop 330 252 41 foodspec The Pretzel Maker 508 90 55 foodspec Starbucks 573 530 56 foodspec Teavana 149 163 75 health A Natural Nail 433 532 76 health Aveda 447 164 251 health Bare Escentuals 708 572 77 health Bath & Body Works (lower level) 213 166 78 health Bath & Body Works (upper level) 558 588 79 health Bobbi Brown 321 550 81 health Clinique 515 618 82 health Crabtree & Evelyn 179 261 83 health Diva Nails & Spa 204 247 84 health Eyebrowz 786 519 86 health Famous Hair 650 530 85 health GNC Live Well 480 549 88 health Hair Sensations 409 550 89 health Hair to Go 179 271 87 health Hair, Inc. 572 571 90 health Lush Fresh Handmade Cosmetics 571 205 91 health MAC Cosmetics 761 222 92 health Merle Norman 445 550 252 health Mineral Makeup 547 478 93 health Mitchell's Hair Styling 391 549 94 health Proactiv 652 166 95 health Sephora 550 153 80 health The Body Shop 264 662 96 health Trade Secret 706 531 271 furnish Celik Fine Art 209 571 97 furnish Crate & Barrel 370 571 99 furnish Pottery Barn 328 531 100 furnish Restoration Hardware 699 204 101 furnish Select Comfort 267 700 102 furnish Smith & Hawken 295 630 103 furnish Village Gallery 554 222 104 furnish Williams-Sonoma 528 203 105 jewelry Carlyle & Company 140 204 106 jewelry Claire's Boutique 498 549 107 jewelry Color Stone 683 550 108 jewelry Dakota Watch 548 517 111 jewelry Helzberg Diamonds 333 204 112 jewelry Impressa Classic Jewelry 598 550 289 jewelry Leyah Silver & Gifts 374 550 222 jewelry Piercing Pagoda 346 211 229 jewelry Reeds Jewelers 604 165 113 jewelry Ross-Simons 180 250 114 jewelry Treasure Isle 410 550 223 jewelry Treasure Trove 260 132 116 jewelry Zales Jewelers 725 531 124 apparel Abercrombie & Fitch 371 532 126 apparel Aeropostale 473 531 125 apparel American Eagle Outfitters 467 165 127 apparel Banana Republic 396 205 128 apparel Brooks Brothers 666 571 129 apparel Buckle 349 532 130 apparel Eddie Bauer 636 166 131 apparel Gap 412 164 132 apparel Guess 744 531 134 apparel Hollister 241 570 135 apparel J. Crew 484 204 136 apparel LACOSTE 342 165 138 apparel Martin + Osa 123 204 140 apparel Pacific Sunwear 180 204 119 apparel Privilege by Casanova 419 205 137 apparel The Levi Store 715 206 117 apparelm Express Men 493 309 27 apparelm Hudson Belk Men's Store 260 94 118 apparelm Men's Wearhouse & Tux 720 164 253 apparelm Ticknors 501 168 121 apparelm Ties Express 670 166 122 apparelm Varsity Men's Wear 267 680 123 apparelm VIP Formalwear 359 166 143 elect Apple 587 205 144 elect Best Buy 321 235 146 elect Game Stop 305 101 147 elect Glamour Shots 296 682 148 elect Radio Shack 274 391 149 elect Sears Portrait 344 570 150 elect Wolf Camera 508 123 151 optical 20/20 Eyeworks 357 550 256 optical Celik Sunglasses 260 109 153 optical Fox Eye Care Group 260 120 154 optical Lenscrafters 519 587 241 optical Oakley 245 69 155 optical Sears Optical 507 204 156 optical Sole Mio Sunglasses 650 206 157 optical Solstice Sunglass Boutique 756 588 158 optical Sunglass Hut Lower level 284 214 224 optical Sunglass Hut Upper level 576 457 161 restaur Kanki Japanese House of Steak & Sushi 647 85 163 restaur P.F. Chang's China Bistro 297 697 164 restaur Panera Bread Company 771 520 165 restaur Pharaoh's American Grill 550 92 166 restaur Ruby Tuesday 724 91 160 restaur The Cheesecake Factory 555 550 266 service ABC Phones, Alltel 703 550 178 service AT&T Prime Mobile 586 205 145 service Best Buy Mobile 282 582 267 service Bleach Bright 392 549 181 service Clearwire 289 64 168 service DentalWorks Raleigh Dentist 551 533 169 service Guest Services Center 295 664 171 service Hakky Shoe Repair 745 549 221 service Howard, Perry, & Walston Realtors 550 203 274 service Integrity Wireless 502 168 254 service iPod Accessories 553 169 290 service John Robert Powers 515 457 172 service Lee's Tailor 480 550 296 service Magic Stitch 256 422 173 service Miracle Ear Inside Sears 553 169 175 service News & Observer 305 191 286 service Time Warner Cable 271 562 226 service Verizon Wireless 480 550 255 service Wireless Accessories 611 531 57 shoes Aldo 667 204 58 shoes Bakers 418 571 59 shoes Champs Sports 505 587 60 shoes Clarks England 453 531 62 shoes Foot Locker 171 570 61 shoes Footaction USA Superstore 586 164 63 shoes Johnston & Murphy 374 205 64 shoes Journeys 242 216 65 shoes Journeys Kidz 170 164 66 shoes Lady Foot Locker 608 570 67 shoes Nine West 127 164 68 shoes Payless Shoe Source 262 468 69 shoes Rack Room Shoes 667 531 70 shoes Shí by Journeys 568 166 71 shoes Soho Shoes 618 204 72 shoes Stride Rite 502 169 73 shoes Summer Breeze 590 570 74 shoes Track'N Trail 546 709 195 shoes Try Sports 240 164 265 special As Seen on TV & More 323 164 180 special Brookstone 338 550 183 special CK Specials 630 531 182 special Coach 724 549 246 special Just Dogs Gourmet 498 550 248 special Rosetta Stone 137 530 186 special Sharon Luggage & Gifts 602 205 189 special Swarovski Crystal 261 202 188 special The Sign Shop 550 203 228 special Things Remembered 308 519 190 special Yankee Candle 437 571 257 sports Alumni Hall 418 571 59 sports Champs Sports 182 283 193 sports Lids 319 243 194 sports NC Sports & Gifts 192 317 29 court Big Easy Cajun 302 317 30 court Chick-Fil-A 328 317 31 court Crisp Salads 360 317 33 court Hector's Grill & Subs 212 317 34 court Kabobi 313 317 36 court Main Street Market 268 317 37 court McDonald's 344 317 38 court Moe's Southwest Grill 340 261 39 court Mrs. Field's Cookies 372 317 40 court Oriental Express 298 225 247 court Robeks Fruit Smoothies 170 317 42 court Sarku Japan 375 271 43 court Sbarro, The Italian Eatery 248 317 44 court Steak Escape 284 224 45 court Street Corner 229 317 46 court Subway 330 251 41 court The Pretzel Maker 467 571 196 toys Build-A-Bear Workshop 489 571 282 toys The Disney Store 518 519 295 toys LEGO 577 549 293 toys Pillow Pets 243 230 198 toys Sanrio Surprises 206 216 200 apparelw 5-7-9 687 531 216 apparelw A Pea in the Pod 688 571 199 apparelw aerie by American Eagle 494 531 201 apparelw Ann Taylor 772 588 202 apparelw Ann Taylor Loft 429 165 203 apparelw Bebe 592 531 204 apparelw Caché 395 571 206 apparelw Charlotte Russe 463 205 207 apparelw Chico's 135 572 208 apparelw Deb Shop 376 165 209 apparelw Delia's 730 205 210 apparelw Express 247 532 211 apparelw Forever XXI 546 588 288 apparelw Formals By Diamond 413 532 259 apparelw Francesca's Collections 650 571 212 apparelw J. Jill 242 203 214 apparelw Motherhood Maternity 192 165 215 apparelw New York & Co. 704 164 277 apparelw PoPPyPia 683 205 217 apparelw Swim'n Sport 725 571 213 apparelw The Limited 746 222 218 apparelw Victoria's Secret 631 572 219 apparelw Wet Seal 390 531 220 apparelw White House / Black Market ; run; /* Now, merge in the category names, based on the 'cat' category abbreviation */ proc sql; create table crabtree_stores as select * from crabtree_stores left join cats on crabtree_stores.cat = cats.cat; quit; run; /* During this last step, save it to permanent library (here.) */ data here.crabtree_stores; set crabtree_stores; length mydrill $ 500; length function $ 8 style color $ 12 html $ 1000 text $ 80; when='a'; xsys='2'; ysys='2'; hsys='3'; position='5'; /* a star character from the sas/graph 'marker' software font */ color='red'; function='label'; html=''; style='marker'; text='V'; size=3; output; /* Instead, I decided to make the drilldown do a google search on the storename */ /* */ html= 'title='||quote( trim(left(store)))|| ' '|| 'href='||quote( 'http://www.google.com/search?hl=en&q=crabtree+'||trim(left(store))||' '); /* html= 'title='||quote( trim(left(store))||' ('||compress(spacenum)||') : '||compress(x)||','||compress(y))|| ' '|| 'href='||quote( 'http://www.google.com/search?hl=en&q=crabtree+'||trim(left(store))||' '); */ style='markere'; color='black'; output; run; /* This is the annotated image of the mall picture */ data here.crabtree_pic; length function $ 8 style color $ 12 html $ 1000; xsys='2'; ysys='2'; hsys='3'; when='a'; function='move'; x=0; y=0; output; function='image'; x=&xsize; y=&ysize; imgpath='crabtree_map.jpg'; style='fit'; output; run; filename odsout '.'; goptions device=png; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="SAS Prototype - Virtual Crabtree Valley Mall Map") style=minimal nogtitle nogfootnote; goptions ftitle="albany amt" ftext="albany amt" htitle=6pct htext=3pct; goptions cback=white; title link="http://www.crabtree-valley-mall.com" f="albany amt/bold" h=18pt "Crabtree Valley Mall"; proc sql; create table interest as select * from here.crabtree_stores; quit; run; pattern1 v=s c=white; proc gmap data=here.crabtree_map map=here.crabtree_map anno=here.crabtree_pic; id idnum; choro idnum / nolegend anno=interest coutline=white des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;