sas coding did you know group... · 2016. 3. 11. · title: sas coding did you know author: david...

19
Copyright © 2012, SAS Institute Inc. All rights reserved. SAS CODING “DID YOU KNOW” BUILDING WORD CLOUDS USING SAS TARA HOLLAND, MAY 2013

Upload: others

Post on 05-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

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

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

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

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 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

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 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

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

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

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

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

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

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 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

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

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

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

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

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

Copyr i g ht © 2012, SAS Ins t i tu t e Inc . A l l r ights reser ve d .