%let name=most_scenic_drive; /* Set your current-working-directory (to read/write files), if you need to ... %let rc=%sysfunc(dlgcdir('c:\someplace\public_html')); */ filename odsout '.'; /* Map version of: https://www.thrillist.com/travel/nation/the-most-scenic-drive-in-all-50-states-america-s-best-roads-pacific-coast-highway-pikes-peak-route-66 */ proc import out=my_data datafile="most_scenic_drive.xls" dbms=xls replace; getnames=no; run; data my_data; set my_data (rename=(B=description)); length state_name highway_name $100; state_name=trim(left(scan(a,1,':'))); highway_name=trim(left(scan(translate(a,' ','a0'x),2,':'))); description=translate(description,"'",'19'x); length my_html $1000; my_html= 'title='||quote(trim(left(highway_name))||', '||trim(left(state_name))||'0d'x|| '-------------------------------------------'||'0d'x|| trim(left(description)))|| ' href='||quote('http://images.google.com/images?q='|| trim(left(highway_name))||', '||trim(left(state_name))); run; data my_map; set mapsgfk.us; length state_name $100; state_name=fipnamel(state); run; data anno_scene; xsys='3'; ysys='3'; hsys='3'; when='b'; x=78; y=84; function='label'; position='5'; color='gray44'; size=16; style='webdings'; text='50'x; run; goptions device=png; goptions xpixels=800 ypixels=600; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="Most Scenic Drives in the US") style=htmlblue; goptions gunit=pct htitle=5 htext=3.0 ftitle="albany amt/bold" ftext="albany amt"; goptions ctext=gray33; pattern1 v=s c=dodgerblue repeat=100; title1 ls=1.5 height=20pt "Most Scenic Drives in the US!"; title2 ls=0.8 "(click each state to launch Google search)"; proc gmap data=my_data map=my_map all anno=anno_scene; id state_name; choro highway_name / nolegend html=my_html des='' name="&name"; run; data my_data; set my_data; length link $300 href $300; href='href='||quote('http://images.google.com/images?q='|| trim(left(highway_name))||', '||trim(left(state_name))); link = '' || htmlencode(trim(highway_name)) || ''; run; title2; proc print data=my_data label noobs style(data)={font_size=11pt} style(header)={font_size=11pt}; label state_name='State'; label link='Scenic Drive'; label description='Description'; var state_name link description; /* format description $HEX18.; */ run; quit; ODS HTML CLOSE; ODS LISTING;