%let name=simple; filename odsout '.'; /* This map is an imitation (with slight variations and enhancements) of some maps I saw in books by Mark Monmonier, such as "How to Lie with Maps" and "Mapping it Out". Mark Monmonier's map is also referenced from the following page as a "US Visibility Map": http://www.math.yorku.ca/SCS/Gallery/bright-ideas.html I created these maps totally independently of MonMonier's "map data". I drew the maps on gridded graph paper, and then estimated the x/y coordinates that you see below. This map is very "efficient", as it only uses 349 x/y coordinates. By comparison, v9 maps.us has 1525 x/y coordinates. */ goptions reset=global; data LowUS; input state segment x y; cards; 53 1 16 160 53 1 32 160 53 1 32 141 53 1 27 141 53 1 16 139 53 1 15 141 53 1 10 141 53 1 7 156 53 1 16 158 41 1 10 139 41 1 14 139 41 1 15 137 41 1 27 139 41 1 32 139 41 1 32 116 41 1 8 116 41 1 8 126 6 1 8 114 6 1 25 114 6 1 25 99 6 1 41 81 6 1 41 64 6 1 35 64 6 1 35 67 6 1 24 73 6 1 7 106 16 1 34 160 16 1 38 160 16 1 38 154 16 1 49 131 16 1 55 131 16 1 55 116 16 1 34 116 32 1 27 114 32 1 44 114 32 1 44 83 32 1 42 83 32 1 27 100 4 1 46 88 4 1 62 88 4 1 62 58 4 1 52 58 4 1 43 64 4 1 43 81 4 1 46 81 49 1 46 114 49 1 55 114 49 1 55 110 49 1 62 110 49 1 62 90 49 1 46 90 30 1 40 160 30 1 75 160 30 1 75 139 30 1 55 139 30 1 55 133 30 1 50 133 30 1 40 155 56 1 57 137 56 1 75 137 56 1 75 112 56 1 57 112 8 1 64 110 8 1 84 110 8 1 84 90 8 1 64 90 35 1 64 88 35 1 81 88 35 1 81 61 35 1 69 61 35 1 69 58 35 1 64 58 48 1 83 82 48 1 88 82 48 1 88 73 48 1 111 66 48 1 111 44 48 1 105 36 48 1 105 26 48 1 97 30 48 1 90 45 48 1 84 45 48 1 71 56 48 1 71 59 48 1 83 59 40 1 83 88 40 1 107 88 40 1 107 70 40 1 90 75 40 1 90 84 40 1 83 84 20 1 86 105 20 1 106 105 20 1 107 102 20 1 107 90 20 1 86 90 31 1 77 122 31 1 96 122 31 1 101 120 31 1 105 108 31 1 86 108 31 1 86 112 31 1 77 112 46 1 77 141 46 1 101 141 46 1 101 123 46 1 96 125 46 1 77 125 38 1 77 160 38 1 98 160 38 1 101 144 38 1 77 144 27 1 101 160 27 1 126 160 27 1 115 150 27 1 114 137 27 1 118 130 27 1 104 130 27 1 104 144 19 1 104 128 19 1 118 128 19 1 122 119 19 1 119 111 19 1 107 111 19 1 104 121 29 1 108 109 29 1 119 109 29 1 119 105 29 1 130 88 29 1 129 83 29 1 125 83 29 1 125 85 29 1 110 85 29 1 110 102 5 1 110 83 5 1 123 83 5 1 123 80 5 1 128 80 5 1 124 66 5 1 114 66 5 1 114 68 5 1 110 70 22 1 114 63 22 1 123 63 22 1 121 55 22 1 129 55 22 1 131 40 22 1 114 45 28 1 129 74 28 1 135 74 28 1 135 49 28 1 132 49 28 1 131 57 28 1 124 57 1 1 137 74 1 1 148 74 1 1 151 53 1 1 141 53 1 1 141 47 1 1 137 49 13 1 150 74 13 1 155 74 13 1 168 56 13 1 165 52 13 1 154 52 45 1 158 74 45 1 169 74 45 1 178 65 45 1 169 59 12 1 143 50 12 1 151 50 12 1 153 49 12 1 165 49 12 1 173 31 12 1 168 24 12 1 159 30 12 1 157 42 12 1 153 46 12 1 143 46 47 1 132 84 47 1 161 84 47 1 153 76 47 1 130 76 21 1 147 98 21 1 155 95 21 1 158 95 21 1 160 91 21 1 156 86 21 1 132 86 21 1 133 89 51 1 180 98 51 1 192 89 51 1 191 86 51 1 160 86 51 1 163 90 51 1 172 90 37 1 164 84 37 1 195 84 37 1 192 77 37 1 180 67 37 1 171 76 37 1 156 76 2 1 24 54 2 1 40 47 2 1 40 23 2 1 32 28 2 1 6 11 2 1 17 23 2 1 13 29 2 1 19 34 2 1 12 34 2 1 11 40 2 1 17 39 2 1 15 45 15 1 83 34 15 1 87 30 15 1 86 22 15 1 78 19 15 1 74 26 15 2 67 32 15 2 70 30 15 2 67 29 15 3 56 32 15 3 60 32 15 3 61 28 15 3 57 30 23 1 225 170 23 1 232 164 23 1 233 147 23 1 223 138 23 1 218 159 33 1 216 155 33 1 220 137 33 1 213 137 50 1 208 155 50 1 213 155 50 1 210 137 50 1 208 137 36 1 206 155 36 1 206 120 36 1 198 128 36 1 173 128 36 1 173 131 36 1 176 133 36 1 176 138 36 1 187 138 36 1 190 143 36 1 190 150 36 1 198 155 42 1 171 129 42 1 171 126 42 1 196 126 42 1 199 123 42 1 195 120 42 1 197 113 42 1 191 107 42 1 169 107 42 1 169 127 39 1 166 125 39 1 166 110 39 1 158 97 39 1 156 97 39 1 148 100 39 1 148 118 39 1 159 118 18 1 136 118 18 1 145 118 18 1 145 100 18 1 136 94 17 1 124 122 17 1 131 122 17 1 131 118 17 1 134 118 17 1 134 93 17 1 131 91 17 1 122 105 17 1 122 109 17 1 125 118 55 1 118 149 55 1 125 149 55 1 136 142 55 1 131 137 55 1 131 125 55 1 123 125 55 1 117 138 26 1 146 150 26 1 152 141 26 1 150 136 26 1 152 134 26 1 156 140 26 1 156 130 26 1 150 120 26 1 141 120 26 1 141 142 26 2 131 158 26 2 144 156 26 2 150 150 26 2 140 150 26 2 136 145 26 2 125 152 54 1 166 106 54 1 166 104 54 1 171 104 54 1 171 98 54 1 175 98 54 1 170 93 54 1 162 93 54 1 160 96 24 1 174 105 24 1 191 105 24 1 191 95 24 1 201 95 24 1 194 90 24 1 180 100 24 1 174 100 10 1 193 105 10 1 196 108 10 1 202 99 10 1 202 97 10 1 193 97 34 1 201 120 34 1 208 113 34 1 210 105 34 1 205 101 34 1 198 111 34 1 201 113 34 1 199 119 9 1 209 125 9 1 217 125 9 1 217 119 9 1 211 116 9 1 209 118 44 1 219 125 44 1 224 125 44 1 224 120 44 1 219 119 25 1 208 135 25 1 222 135 25 1 224 131 25 1 228 131 25 1 230 127 25 1 236 127 25 1 236 131 25 1 233 135 25 1 239 135 25 1 239 124 25 1 226 121 25 1 226 127 25 1 208 127 ; run; proc sql; create table my_data as select unique state, fipstate(state) as st, fipnamel(state) as name from LowUS order by state; quit; run; /* From http://support.sas.com/faq/ts_qa/0210_maptips.html */ data my_data; set my_data; length htmlvar $200.; /*Create the drilldown information */ drillvar='HREF="http://www.state.'|| trim(left(lowcase(fipstate(state))))||'.us"'; /*Create tooltips that display when you hover over a state. */ /*These tooltips will only appear when the output is viewed in */ /*Internet Explorer, not Netscape. This is expected behavior. */ /*The 'OD'x hex value creates a line break in the text string */ altvar = 'title="State FIPs code: ' || trim(left(state)) || '0D'x || 'Abbreviation: '||trim(left(fipstate(state)))||'0D'x|| 'State name: ' || trim(left(fipnamel(state))) || '"'; /*Combine the tooltip and drill down into one variable */ htmlvar = drillvar || ' ' || altvar; run; GOPTIONS DEVICE=gif; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Simplified US Map") style=d3d gtitle gfootnote ; goptions border; goptions ftitle="arial" ftext="arial" htitle=.6in htext=.25in; goptions cback=gray; title c=cx00ff00 "Simplified US Map"; pattern v=s c=blue r=50; proc gmap data=my_data map=LowUS; id state; choro state / coutline=cx00ff00 nolegend html=htmlvar des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;