%let name=sgf_2019_visualization; /* Set your current-working-directory (to read/write files), if you need to ... %let rc=%sysfunc(dlgcdir('c:\someplace\public_html')); */ filename odsout '.'; /* You must run this SAS job using a utf8 sas encoding, in order for the NLS characters to read in correctly, such as the 'Rupee' character that is in one of the session titles. I have created a sgf_2019_visualization.bat script to run the sas job using utf8 encoding. */ /* Using data from Excel spreadsheet downloaded here: http://sasgfsessioncatalog.com/#/search/ */ proc import file="SASCatalog_050419112242.xlsx" out=my_data dbms=xlsx replace; getnames=yes; run; data my_data; set my_data; length target $10; target='no'; /* keywords to include */ if index(upcase(topic),'VISUALIZATION')^=0 then target='yes'; else if index(upcase(description),'VISUALIZATION')^=0 then target='yes'; else if index(upcase(session_title),'GRAPHICS')^=0 then target='yes'; else if index(upcase(session_title),'VISUALIZING')^=0 then target='yes'; else if index(upcase(primary_product),'SAS/GRAPH')^=0 then target='yes'; else if index(upcase(description),'SAS/GRAPH')^=0 then target='yes'; else if index(upcase(description),'ODS GRAPHICS')^=0 then target='yes'; else if index(upcase(description),'SGPLOT')^=0 then target='yes'; else if index(upcase(description),'GPLOT')^=0 then target='yes'; else if index(upcase(description),'GRAPH TEMPLATE LANGUAGE')^=0 then target='yes'; else if index(upcase(description),'GMAP')^=0 then target='yes'; else if index(upcase(description),'GEOCODE')^=0 then target='yes'; else if index(upcase(description),'DASHBOARD')^=0 then target='yes'; /* specific sessions to include */ if session_id in ('3561' '3555' '3564' '3275' '3576' '3325' '3782' '3944' '3803' '4031') then target='yes'; /* specific sessions to exclude (they had keywords, but weren't what I was looking for) */ if session_id in ('3176' '3952' '3899' '3071' '3811' '4013' '3872' '4017' '3140' '3927' '3880' '3236' '3364' '3618' '3848' '3862' '3194' '3529' '2992' '3079' '3520' '3260' '3617' '3100' 'SD4504' 'SD801' 'SD802' 'SD4506' 'SD1103' 'SD404' 'SD805' 'SD906' 'SD806' 'SD907' 'SD1108' 'SD909' 'SD809' 'SD810' 'SD911' 'SD811' 'SD912' 'SD913' 'SD813' 'SD804' '3462' '3345' '3879' '4041' '2986' '3160' '3473' '3078' '3398' '3628' '4600' '3485' '3503' '3526' '4609' '3156' '4610' '3951' '4046' '3346' '3375' ) then target='no'; run; data plot_data; set my_data (where=(target='yes')); format start_datetime end_datetime dateampm22.0; start_datetime=input(trim(left(day))||':'||trim(left(start_time)),anydtdtm20.); end_datetime=input(trim(left(day))||':'||trim(left(end_time)),anydtdtm20.); length Time $20; Time=trim(left(put(input(start_time,anydtdtm20.),timeampm8.)))|| ' - '||trim(left(put(input(end_time,anydtdtm20.),timeampm8.))); format Date weekdate.; Date=datepart(start_datetime); if primary_speaker_first_name='' then primary_speaker_first_name=Co_Speaker_First_Name; if primary_speaker_last_name='' then primary_speaker_last_name=Co_Speaker_Last_Name; label presenter_name_first_last='Presenter'; length presenter_name_first_last presenter_name_last_first $100; presenter_name_first_last=trim(left(primary_speaker_first_name))||' '||trim(left(primary_speaker_last_name)); presenter_name_last_first=trim(left(primary_speaker_last_name))||' '||trim(left(primary_speaker_first_name)); run; proc sort data=plot_data out=plot_data; by start_datetime session_type; run; data plot_data; set plot_data; y=_n_; length author_drill $300; length paper_drill $300; paper_drill='#'||trim(left(session_id)); /* Before the papers were published, just search on the author name ... */ author_drill='http://www.sasgfsessioncatalog.com/#/speaker/name@'|| tranwrd(trim(left(presenter_name_last_first)),' ','%20')||'>0'; /* hmm ... this doesn't seem to work for some presenters */ /* http://www.sasgfsessioncatalog.com/#/speaker/name@Aanderud%20Tricia%3E0@4189 paper_drill='http://www.sasgfsessioncatalog.com/#/speaker/name@'|| tranwrd(trim(left(presenter_name_last_first)),' ','%20')||'%3E0@'||trim(left(session_id)); */ /* After the papers are published online, link to the paper */ /* paper_drill='https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/' ||trim(left(session_id))||'-2019.pdf'; */ run; data anno_days; do datetime='28apr2019:12:00:00'dt to '01may2019:12:00:00'dt by 86400; output; end; run; data anno_days; set anno_days; length label $100 anchor x1space y1space $50; layer="front"; function="text"; textcolor="gray77"; textsize=10; textweight='normal'; width=100; widthunit='percent'; anchor='bottom'; x1space='datavalue'; x1=datetime; label=trim(left(put(datepart(datetime),downame.))); y1space='wallpercent'; anchor='bottom'; y1=100; output; y1space='wallpercent'; anchor='top'; y1=0; output; run; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title="SGF 2019 Presentations about Data Visualization") style=htmlblue; ods graphics / imagemap tipmax=25000 drilltarget="_self" imagefmt=png imagename="&name" width=900px height=800px noborder; data myattrmap; length id markercolor markersymbol $20; input ID $ value $ 7-24 markercolor $ markersymbol $; datalines; myid Tutorial red starfilled myid Breakout cxBDFCC9 circlefilled myid E-Poster yellow squarefilled myid Student Symposium white squarefilled myid Quick Tip magenta asterisk myid Hands-On Workshop red trianglefilled myid Partner Super Demo cx6bb7fd circlefilled myid SAS Super Demo dodgerblue circlefilled ; run; title1 c=gray33 h=16pt "SAS Global Forum 2019 - Presentations about Data Visualization"; title2 h=15pt ' '; proc sgplot data=plot_data dattrmap=myattrmap sganno=anno_days; format start_datetime datetime7.; /* draw this first, so the data tips are behind the scatter markers */ refline '28apr2019:12:00:00'dt to '01may2019:12:00:00'dt by 86400 / axis=x lineattrs=(pattern=thindot color=gray77) /*tip=none*/; scatter x=start_datetime y=y / group=session_type attrid=myid markerattrs=(size=6pt) tip=(Session_Title session_type presenter_name_first_last date time room) dataskin=pressed url=paper_drill name='mylegend'; keylegend 'mylegend' / position=right location=inside border opaque across=1 valueattrs=(size=9pt); yaxis display=(nolabel) valueattrs=(color=gray77 size=10pt); xaxis display=(nolabel) offsetmin=0 offsetmax=0 values=('28apr2019:00:00:00'dt to '02may2019:00:00:00'dt by 86400) valueattrs=(color=white size=10pt) grid gridattrs=(color=cx989ea1); run; /* set up the html for the drilldown links in the table */ data plot_data; set plot_data; length href link $300 title_with_anchor $300; href='href='||quote(''||trim(left(author_drill))); link=''||htmlencode(trim(presenter_name_first_last))||''; title_with_anchor=""||trim(left(session_title))||""; run; title2 "(use browser's Ctrl+f to find text keywords that interest you)"; proc print data=plot_data label noobs /* you must specify a font that includes the new Rupee symbol (symbola, courier std, etc) */ style(data)={font_size=12pt font_family=symbola} style(header)={font_size=12pt}; /* label presenter_name_first_last='Presenter'; label Session_Title='Title'; */ label link='Presenter'; label title_with_anchor='Title'; var date time /*presenter_name_first_last*/ link /*Primary_Speaker_Company session_id topic*/ session_type title_with_anchor description; run; quit; ODS HTML CLOSE; ODS LISTING; /* Put some extra space below the table, so that when you click the last markers in the plot, and jump to the end of the table, it will position the desired table row at the top of the web browser. */ filename mytable "./&name..htm" mod; data _null_; file mytable; do i = 1 to 100; put "
"; end; run;