%let name=alumni; filename odsout 'C:\output_location'; proc sql; create table world as select -1*long as x, lat as y, segment, cont, id as country from maps.world where (density<=1) and (segment<=3) and (country ^= 143) and (country ^=405); /* This removes Greenland and Antarctica*/ quit; run; proc sql; create table alumni as select unique cont, id as country from maps.world; quit; run; *This specifies the map output style*; proc gproject data=world out=world dupok eastlong project=Winkel2; id cont country; run; options fmtsearch=(sashelp.mapfmts); data alumni; set alumni; length countryname $20; countryname=put(country,glcnsm.); alum=.; run; options nocenter ps=500; /*This datalines statement is incredibly long, but needed to show all the countries*/ data alumni_data; input alum cont country countryname $ 28-50; if alum le 25 then alum_range=2; else if alum le 100 then alum_range=3; else if alum le 500 then alum_range=4; else if alum le 1000 then alum_range=5; else if alum le 100000 then alum_range=6; if alum eq . then alum_range=1; datalines; . 91 61 Navassa Island . 91 72 Puerto Rico . 91 78 Virgin Islands U S . 91 100 Aruba 10 91 180 Bahamas 5 91 195 Bermuda . 91 227 Belize 1 91 231 British Virgin Islan 429 91 260 Canada 1 91 268 Cayman Islands 13 91 295 Costa Rica . 91 300 Cuba 2 91 320 Dominican Republic 3 91 330 El Salvador 3 91 415 Guatemala . 91 420 Haiti 3 91 430 Honduras 5 91 487 Jamaica 175 91 595 Mexico . 91 609 Montserrat 3 91 665 Nicaragua 4 91 710 Panama . 91 763 Saint Kitts/Nevis . 91 765 St.Helena . 91 773 St.Pierre Miquelon . 91 906 Turks/Caicos Islands 10000 91 926 United States 3 92 142 Anguilla . 92 149 Antigua/Barbuda 48 92 150 Argentina 3 92 184 Barbados 4 92 205 Bolivia 64 92 220 Brazil 32 92 275 Chile 45 92 285 Colombia . 92 318 Dominica 11 92 325 Ecuador . 92 337 Falkland Islands . 92 355 French Guiana . 92 406 Grenada . 92 407 Guadeloupe 1 92 418 Guyana . 92 591 Martinique . 92 640 Netherlands Antilles 3 92 715 Paraguay 23 92 720 Peru . 92 770 St.Lucia . 92 775 Saint Vincent/Grenad . 92 840 Suriname 4 92 887 Trinidad And Tobago 4 92 930 Uruguay 29 92 940 Venezuela 1 93 115 Azerbaijan 1 93 120 Albania 1 93 135 Armenia . 93 140 Andorra 13 93 165 Austria . 93 185 Bosnia/Herzegovina 44 93 190 Belgium 1 93 211 Belarus 9 93 245 Bulgaria 8 93 310 Czech Republic 17 93 315 Denmark 3 93 331 Estonia . 93 336 Faroe Islands 6 93 340 Finland 102 93 350 France 3 93 390 Georgia 95 93 394 Germany 124 93 400 Greece . 93 405 Greenland . 93 416 Guernsey . 93 440 Croatia 8 93 445 Hungary 5 93 450 Iceland 18 93 470 Ireland 60 93 480 Italy . 93 488 Jan Mayen Islands . 93 495 Jersey . 93 541 Latvia . 93 542 Lithuania . 93 548 Slovakia . 93 553 Liechtenstein 3 93 570 Luxembourg . 93 574 Macedonia . 93 576 Moldova . 93 588 Man 1 93 590 Malta 2 93 607 Monaco 62 93 630 Netherlands 17 93 685 Norway 2 93 688 Serbia 8 93 730 Poland 95 93 735 Portugal 19 93 755 Romania . 93 782 San Marino 4 93 789 Slovenia 70 93 830 Spain . 93 845 Svalbard 19 93 850 Sweden 110 93 855 Switzerland 275 93 925 United Kingdom 6 93 928 Ukraine 1 93 970 Yugoslavia 5 94 125 Algeria . 94 141 Angola . 94 187 Bassas Da India 9 94 210 Botswana 1 94 252 Burundi . 94 257 Cameroon . 94 264 Cape Verde . 94 269 Central African Rep. . 94 273 Chad 1 94 286 Comoros . 94 290 Congo . 94 291 Zaire . 94 311 Benin . 94 317 Djibouti . 94 327 Eritrea . 94 332 Equatorial Guinea . 94 334 Europa Island 4 94 335 Ethiopia 1 94 388 Gabon . 94 389 Gambia 8 94 396 Ghana 4 94 417 Guinea 1 94 485 Ivory Coast . 94 497 Juan De Nova Island 8 94 505 Kenya 1 94 543 Lesotho . 94 545 Liberia 2 94 550 Libya . 94 575 Madagascar . 94 577 Malawi 1 94 585 Mali . 94 592 Mauritania 2 94 593 Mauritius . 94 594 Mayotte 11 94 610 Morocco . 94 615 Mozambique . 94 667 Niger 13 94 670 Nigeria . 94 737 Guinea-Bissau . 94 750 Reunion 5 94 758 Rwanda . 94 783 Sao Tome/Principe . 94 787 Senegal . 94 788 Seychelles 2 94 790 Sierra Leone . 94 800 Somalia 38 94 801 South Africa 7 94 818 Zimbabwe . 94 821 Namibia . 94 831 Western Sahara . 94 835 Sudan 3 94 847 Swaziland 4 94 865 Tanzania . 94 883 Togo . 94 889 Tromelin Island 1 94 890 Tunisia 2 94 910 Uganda 7 94 922 Egypt . 94 927 Burkina Faso 1 94 990 Zambia . 95 110 Afghanistan 2 95 181 Bahrain 11 95 182 Bangladesh 1 95 200 Bhutan . 95 228 British Indian Ocean 4 95 250 Myanmar 7 95 255 Cambodia 16 95 272 Sri Lanka 642 95 280 China 602 95 281 Taiwan 14 95 305 Cyprus . 95 393 Gaza Strip . 95 399 Glorioso Islands 315 95 435 Hong Kong 1365 95 455 India 12 95 460 Iran . 95 465 Iraq 78 95 475 Israel 544 95 490 Japan 8 95 500 Jordan . 95 510 Kyrgyzstan . 95 514 Korea,North 918 95 515 Korea,South 15 95 520 Kuwait 11 95 525 Kazakhstan . 95 530 Laos 14 95 540 Lebanon 2 95 573 Macau 108 95 580 Malaysia 1 95 583 Maldives 1 95 608 Mongolia 13 95 616 Oman 3 95 625 Nepal 79 95 700 Pakistan . 95 714 Paracel Islands 125 95 747 Qatar . 95 784 Tajikistan 41 95 785 Saudi Arabia 335 95 795 Singapore 15 95 825 Russia . 95 833 Spratly Islands 2 95 858 Syria 270 95 875 Thailand 44 95 888 United Arab Emirates 224 95 905 Turkey . 95 909 Turkmenistan 1 95 931 Uzbekistan 12 95 945 Vietnam . 95 955 West Bank . 95 965 Yemen . 96 60 American Samoa . 96 62 Jarvis Island . 96 63 Micronesia . 96 64 Baker Island . 96 65 Howland Island 1 96 66 Guam . 96 67 Johnston Atoll . 96 68 Kingman Reef 1 96 69 Northern Mariana Isl . 96 70 Palmyra Atoll . 96 71 Midway Island . 96 73 Marshall Islands . 96 75 Palau . 96 80 Wake Island . 96 155 Ashmore/Cartier 139 96 160 Australia . 96 229 Solomon Islands 1 96 232 Brunei . 96 282 Clipperton Island . 96 284 Cocos Islands . 96 293 Cook Islands . 96 294 Coral Sea Islands . 96 338 Fiji 1 96 367 French Polynesia . 96 369 French Southern Terr . 96 398 Kiribati . 96 424 Heard/Mcdonald 167 95 458 Indonesia . 96 516 Christmas Island . 96 621 Nauru 1 96 645 New Caledonia . 96 651 Vanuatu 22 96 660 New Zealand . 96 672 Niue . 96 683 Norfolk Island 1 96 712 Papua New Guinea 64 95 725 Philippines . 96 727 Pitcairn Islands . 96 884 Tokelau . 96 886 Tonga . 96 908 Tuvalu . 96 950 Wallis/Futuna Island . 96 963 Samoa . 97 212 Bouvet Island . 397 397 Gibraltar ; run; /*This data statement allows you to see the country name and the number of alumni in that country when viewed in a webpage*/ data alumni_data; set alumni_data; length myhtmlvar $400; myhtmlvar='title='||quote( trim(left(countryname))||': '||trim(left(alum))||' Alumni'); run; GOPTIONS DEVICE=html; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Carnegie Mellon Alumni by Country") style=d3d; goptions border; goptions cback=CXFFFFFF ctext=black; goptions xpixels=900 ypixels=600; pattern1 value=solid color=WHITE; pattern2 value=solid color=CXEAF1DD; pattern3 value=solid color=CXD7E4BC; pattern4 value=solid color=CXC2D69A; pattern5 value=solid color=CX75923C; pattern6 value=solid color=CX4F6228; goptions gunit=pct htitle=6.25 ftitle="Calibri/bold" htext=2.7 ftext="Calibri"; title "Carnegie Mellon Alumni by Country"; footnote1 j=l "For specific numbers please visit www.cmu.edu/ira and click factbook"; legend1 label=(position=top f="Calibri" h=3 '' j=c f="Calibri" h=3 ) order=(1 2 3 4 5 6) shape=bar(.15in,.15in) value=(justify=left 'None' '1-25' '26-100' '101-500' '501-1000' '1000+') position=(bottom left) offset=(7,3) across=1 mode=share; proc gmap data=alumni_data map=world all; id cont country; choro alum_range / discrete coutline=CX5A5A5A legend=legend1 html=myhtmlvar des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;