%let name=africa; filename odsout '.'; /* SAS Imitation of... http://www.workinfo.com/free/downloads/313.ht3.jpg Be sure to run it at v9.1.3, rather than v9.2, because of defect S0354409 */ data africa; set maps.africa; country=id; run; data mydata; input hiv_rate country countryname $ 16-36; if hiv_rate le 2.9 then hiv_range=1; else if hiv_rate le 5.9 then hiv_range=2; else if hiv_rate le 10.9 then hiv_range=3; else if hiv_rate le 20.9 then hiv_range=4; else if hiv_rate le 29.9 then hiv_range=5; else if hiv_rate gt 29.9 then hiv_range=6; if hiv_rate eq . then hiv_range=7; datalines; 0.1 125 Algeria 3.9 141 Angola . 187 Bassas Da India 37.3 210 Botswana 6.0 252 Burundi 6.9 257 Cameroon . 264 Cape Verde 13.5 269 Central African Rep. 4.8 273 Chad . 286 Comoros 4.9 290 Congo 4.2 291 Zaire 1.9 311 Benin 2.9 317 Djibouti 2.7 327 Eritrea . 332 Equatorial Guinea . 334 Europa Island 4.4 335 Ethiopia 8.1 388 Gabon 1.2 389 Gambia 3.1 396 Ghana 3.2 417 Guinea 7.0 485 Ivory Coast . 497 Juan De Nova Island 6.7 505 Kenya 28.9 543 Lesotho 5.9 545 Liberia 0.3 550 Libya 1.7 575 Madagascar 12.2 577 Malawi 1.9 585 Mali 0.6 592 Mauritania . 593 Mauritius . 594 Mayotte 0.1 610 Morocco 12.2 615 Mozambique 1.2 667 Niger 5.4 670 Nigeria . 737 Guinea-Bissau . 750 Reunion 5.1 758 Rwanda . 783 Sao Tome/Principe 0.8 787 Senegal . 788 Seychelles . 790 Sierra Leone . 800 Somalia 21.5 801 South Africa 24.6 818 Zimbabwe 21.3 821 Namibia . 831 Western Sahara 2.3 835 Sudan 38.8 847 Swaziland 8.8 865 Tanzania 4.1 883 Togo . 889 Tromelin Island 0.1 890 Tunisia 4.1 910 Uganda 0.1 922 Egypt 4.2 927 Burkina Faso 16.5 990 Zambia ; run; data mydata; set mydata; length myhtmlvar $400; myhtmlvar= 'title='||quote( trim(left(countryname))||': '||trim(left(put(hiv_rate/100,percent7.1))) ) ||' '|| 'href="http://www.google.com/search?q=hiv+rate+'||trim(left(lowcase(countryname)))||'"'; run; options nocenter; proc print data=mydata noobs; var country countryname; run; GOPTIONS DEVICE=png; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Adult HIV rates in Africa, 2003 - A SAS/Graph Map") style=minimal; goptions border; goptions cback=white ctext=gray55; goptions xpixels=800 ypixels=700; pattern1 color=cxdfe8df; pattern2 color=cx8ccb9d; pattern3 color=cx499965; pattern4 color=cx357446; pattern5 color=cx10472e; pattern6 color=black; pattern7 color=graycc; goptions htitle=6.0pct ftitle="arial/bold" htext=2.25pct ftext="arial"; title link="http://www.workinfo.com/free/downloads/313.ht3.jpg" "Adult HIV rates in Africa, 2003"; footnote1 j=l "Source: UN Africa Renewal from UNAIDS data." j=r "Mouse over countries to see names & values"; legend1 label=(position=top f="arial/bold" h=3pct 'Adult HIV in Africa' j=c f="arial" h=2.25pct '(% population, ages 15-49)') order=(6 5 4 3 2 1 7) value=(justify=left '30% and higher' '21-29.9%' '11-20.9%' '6-10.9%' '3-5.9%' '0-2.9%' 'not available') position=(bottom left) across=1 mode=share shape=bar(.15in,.15in); proc gmap data=mydata map=africa; id country; choro hiv_range / discrete coutline=grayaa missing legend=legend1 html=myhtmlvar des="" name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;