SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David...
Transcript of SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David...
![Page 1: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/1.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING “DID YOU KNOW”
BUILDING WORD CLOUDS USING SAS
TARA HOLLAND, MAY 2013
![Page 2: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/2.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
“DID YOU KNOW” WHAT I LEARNED AND WILL SHARE TODAY
The value of SAS Global Forum papers as a resource
A refresher on a few coding tips & tricks
Power of SAS for unstructured data
![Page 3: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/3.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
LOOKING FOR
CREATIVE IDEAS
SAS GLOBAL FORUM
PAPERS
A wealth of
knowledge and
experience – free for
the taking
Past
Conference
Proceedings
![Page 4: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/4.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING STRUCTURE OF THE PROGRAM
Read in file Convert to a
word list
Determine
which words
appear most
Colour code
and display
![Page 5: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/5.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING THE RESULTS – WORD CLOUD
![Page 6: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/6.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING TIPS & TRICKS
Read in file Convert to a
word list
Determine
which words
appear most
Colour code
and display
![Page 7: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/7.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING FILENAME STATEMENT
/*-- read in a web site -----------------------------------*/
%let url = http://www.sas.com/;
filename page url "&url" encoding="utf-8";
Reading a variety of sources
including web pages
![Page 8: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/8.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING PROC FORMAT FOR MORE THAN JUST REPORTING
proc format;
invalue ignored /* ?? */
"THE", "AND", "TO", "A", "IN", "USING","FOR", "OF", "WITH", "YOUR", "AN", "ON","BY",
"YOU", "FROM", "IS", "AT", "OR", "DO", "GET","NOT", "MORE", "AS", "I", "BE", "US",
"VERY", "WE","YES", "YET", "YOU'RE", "THAT", "SO", "WHAT'S","WORKSHOP", "OUR",
"IT'S", ".", "ITS", "-","THAT'S", "THEIR", "SUCH", "CAN", "BETWEEN","WHICH", "IVE",
"ITSELF", "BUT" , "HE", "HIM", "HIS", "HER","WAS", "WHAT", "WHEN", "WHO", "WHERE" ,
"HREF", "CLASS", "HTTP", "HAD","COULD", "BEFORE", "ALL", "NOW“
"HAS" = 1
other = 0;
run;
![Page 9: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/9.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING PROC RANK
/* limit # of font sizes to 5 */
proc rank data = freqs
out = sizes1 groups = 4 ties=mean;
var count;
ranks rank_count;
run;
![Page 10: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/10.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
SAS CODING PROC RANK
PROC FREQ DATA=sashelp.cars;
TABLES Make /
OUT=WORK.FREQ
SCORES=TABLE;
RUN;
proc rank data = freq
out = sizes1
groups = 4 ties=mean;
var count;
ranks rank_count;
run;
![Page 11: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/11.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
LET’S TAKE A LOOK
![Page 12: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/12.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
TEXT ANALYTICS BEYOND THIS SIMPLE EXAMPLE
Natural Language Processing
Content Categorization
Text Mining Word Clouds are
the best starting
point to
understand and
see the information
value in
unstructured data
IDC Project Data Growth, 2012
![Page 13: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/13.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
CONTACT INFO
613-755-2304
![Page 14: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/14.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
BACKUP SCREENSHOTS
![Page 15: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/15.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
![Page 16: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/16.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
![Page 17: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/17.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
![Page 18: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/18.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .
![Page 19: SAS Coding Did you Know Group... · 2016. 3. 11. · Title: SAS Coding Did you Know Author: David Comeau Created Date: 5/19/2013 2:32:53 PM](https://reader034.fdocuments.net/reader034/viewer/2022052015/602d63b2bdd898522c0ae7f3/html5/thumbnails/19.jpg)
Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .