Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
개발자를 위한
R로 wordcloud 30분만에 만들기
agun
word cloud ?
이런거.. 다들 아시죠?
ㅋㅋ
단어 빈도수에 따라서 표현되는
거...
어떻게 만들지?
프로그래밍 하
려면 복잡할거
같은데..
R 패키지에
서
있구나!!
R Studio 를 먼
저 설치 하자 !!
R Studio 설치
- 무료임 .. 돈 안드니 걱정 마삼
- https://www.rstudio.com 참고
- 설치는 google 에게 물어보면 별로 어렵지 않아요
- R Studio 설치 전에 r을 먼저 설치 해야...
데이터 준비
- word cloud 를 표현할 단어들이 필요
- mysql 에 데이터를 아래와 같은 스키마로 저장 (개발자이니 mysql 은 아시죠?)
CREATE TABLE termTest
(
id int(10) un...
단어 레코드 저장
- 아래와 같이 자신이 원하는 단어를 term 필드에 저장 하면 됨
- 1개의 레코드가 단어 빈도수를 뜻하며 word cloud 는 단어 빈도수에 따라 단어를 보여줌 (ex 아래에서는 아이유가 3, 초...
R Studio 에서 데이터 읽기
- 저장한 mysql 의 데이터를 바로 읽어 보자 !!
- r package 의 RMysql 을 사용 (http://blog.rstudio.org/2015/01/09/rmysql-0-1...
wordcloud 로 표현
- r package 에서 wordcloud 가 구현되어 있음(http://www.r-bloggers.com/word-cloud-in-r/)
- install.packages(“wordclou...
못다한 이야기는 아래로 ^^
http://blog.naver.com/pdc222
개발자를 위한 R로 wordcloud 10분만에 만들기
Upcoming SlideShare
Loading in …5
×

개발자를 위한 R로 wordcloud 10분만에 만들기

2,357 views

Published on

개발자를 대상으로 하여 R Studio 를 사용해서 word cloud 를 구현하는 방법을 설명한다.

Published in: Data & Analytics
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

개발자를 위한 R로 wordcloud 10분만에 만들기

  1. 1. 개발자를 위한 R로 wordcloud 30분만에 만들기 agun
  2. 2. word cloud ? 이런거.. 다들 아시죠? ㅋㅋ 단어 빈도수에 따라서 표현되는 거...
  3. 3. 어떻게 만들지? 프로그래밍 하 려면 복잡할거 같은데..
  4. 4. R 패키지에 서 있구나!!
  5. 5. R Studio 를 먼 저 설치 하자 !!
  6. 6. R Studio 설치 - 무료임 .. 돈 안드니 걱정 마삼 - https://www.rstudio.com 참고 - 설치는 google 에게 물어보면 별로 어렵지 않아요 - R Studio 설치 전에 r을 먼저 설치 해야 함 - R Studio 는 r 을 편하게 할수 있는 IDE 라고 생각 하면됨
  7. 7. 데이터 준비 - word cloud 를 표현할 단어들이 필요 - mysql 에 데이터를 아래와 같은 스키마로 저장 (개발자이니 mysql 은 아시죠?) CREATE TABLE termTest ( id int(10) unsigned not null auto_increment, term text, primary key(id) )
  8. 8. 단어 레코드 저장 - 아래와 같이 자신이 원하는 단어를 term 필드에 저장 하면 됨 - 1개의 레코드가 단어 빈도수를 뜻하며 word cloud 는 단어 빈도수에 따라 단어를 보여줌 (ex 아래에서는 아이유가 3, 초아 가 2 ) insert into termTest (term)values(‘아이유’) insert into termTest (term)values(‘아이유’) insert into termTest (term)values(‘초아’) insert into termTest (term)values(‘초아’) insert into termTest (term)values(‘아이유’) ...
  9. 9. R Studio 에서 데이터 읽기 - 저장한 mysql 의 데이터를 바로 읽어 보자 !! - r package 의 RMysql 을 사용 (http://blog.rstudio.org/2015/01/09/rmysql-0-1-0) - r studio console 에서 install.packages(“DBI”) 와 install.packages(“RMySQL”) 입력하여 설치 - 아래 처럼 r studio console 에 입력 및 실행 하여 termData 에 데이터를 읽어 온다 library(RMySQL) mydb = dbConnect(MySQL(), user=”db user”, dbname="db 명", host="db 호스트") termRs = dbSendQuery(mydb, "select * from termTest") termData = fetch(termRs, n = -1)
  10. 10. wordcloud 로 표현 - r package 에서 wordcloud 가 구현되어 있음(http://www.r-bloggers.com/word-cloud-in-r/) - install.packages(“wordcloud”) 를 r studio console 에서 입력 및 실행 하여 패키지 설치 - 아래처럼 입력 하면 wordcloud 표현됨 library(wordcloud) termFeq <- table(termData$term) wordcloud(names(termFeq), freq=termFeq, random.order = FALSE, rot.per = 0.25, min.freq = 1, colors = brewer.pal(8,"Dark2"), family ="AppleGothic" ) 해당 example 는 mac os 에서 실행 하였기 때문에 wordcloud 의 폰트 속성(family)이 AppleGothic 임
  11. 11. 못다한 이야기는 아래로 ^^ http://blog.naver.com/pdc222

×