%let name=mc1f; filename odsout '.'; %let mc1path=\\l72586.na.sas.com\public\VAST_2011\MC_1_Materials_3-30-2011\; libname mydata "&mc1path"; /* Find microblog postings with certain keywords */ data matches; set mydata.microblogs; if index(text,' flu ')^=0 then do; output; end; else if index(text,' fever')^=0 then do; output; end; else if index(text,' chill')^=0 then do; output; end; else if index(text,' sweat')^=0 then do; output; end; else if index(text,' ache')^=0 then do; output; end; else if index(text,' pain')^=0 then do; output; end; else if index(text,' fatigue')^=0 then do; output; end; else if index(text,' cough')^=0 then do; output; end; else if index(text,' breathing')^=0 then do; output; end; else if index(text,' nausea')^=0 then do; output; end; else if index(text,' vomit')^=0 then do; output; end; else if index(text,' diarrhea')^=0 then do; output; end; run; data matches; set matches; time=timepart(timestamp); run; data alldata; set mydata.microblogs; time=timepart(timestamp); run; goptions device=png; ODS LISTING CLOSE; ODS HTML path=odsout body="&name..htm" (title='IEEE VAST Challenge 2011 - mini-challenge 1') style=sasweb; goptions noborder; goptions cback=white; goptions gunit=pct htitle=16pt htext=11pt ftitle="arial/bold" ftext="arial"; goptions xpixels=800 ypixels=600; pattern1 v=s c=cx60AFFE; title1 ls=1.5 "Time-of-day distribution of all microblogs"; footnote1; axis1 label=none; axis2 minor=none offset=(0,0); proc gchart data=alldata; format time timeampm8.; hbar time / midpoints = '00:30:00't to '23:30:00't by hour type=freq maxis=axis1 raxis=axis2 range autoref cref=graydd clipref coutline=gray des='' name="&name"; run; title1 ls=1.5 "Time-of-day distribution of microblogs containing epidemic keywords..."; title2 "(flu, fever, chill, sweat, ache, pain, fatigue, cough, breathing, nausea, vomit, diarrhea)"; footnote1; axis1 label=none; axis2 minor=none offset=(0,0); proc gchart data=matches; format time timeampm8.; hbar time / midpoints = '00:30:00't to '23:30:00't by hour type=freq maxis=axis1 raxis=axis2 range autoref cref=graydd clipref coutline=gray des='' name="&name"; run; quit; ODS HTML CLOSE; ODS LISTING;