Uses R 4.4.1 (wordcloud2 does not work well in R 4.4.0)

Websites for Wordclouds

Packages

0.1 Wordclouds

0.1.1 Load Data

Before importing, you should save your file as UNICODE UTF-8 or else you need to replace fancy punctuation yourself (using select, search, replace with simple, or space). This is perhaps easiest to do in a generic text editor like Notepad. For example: * fancy quote marks (fancy “ ” or ’ ’) * fancy en and em dashes (fancy – or —) * fancy ellipsis (fancy …) * fancy list characters (bullet lists) * and anything else fancy Also, it is easiest to remove URL (web links) yourself. Also, file must end with a blank line.

0.1.2 Clean the text data

This file was imported after saving in Word as UNICODE UTF-8

0.1.3 Create Corpus

0.1.4 Create TDM (term-document-matrix)

TDM is a Table of counts

Some words end up being too long (too many letters). You can remove such words with smaller maxLength

You can change minimum number of times for a word to be included with minFreq

You can change the total number of words in the cloud with maxTerms

0.1.5 Optional: Stemming

0.2 Stats (Bar Chart, Other)

You can increase number of bars with maxBars (but 20 is a good max for bar chart)

 ##  [1] "mother"     "children"   "can"        "like"       "roles"     
##  [6] "time"       "even"       "academic"   "away"       "emotional" 
## [11] "feel"       "balance"    "role"       "constantly" "student"   
## [16] "woman"      "future"     "help"       "phd"        "physically" 
 ##     mother   children        can       like      roles       time       even 
##         16         15          9          8          8          8          7 
##   academic       away  emotional       feel    balance       role constantly 
##          6          6          6          6          5          5          5 
##    student      woman     future       help        phd physically    present 
##          5          5          4          4          4          4          4 
##   pursuing        try        don       kids 
##          4          4          4          4 

 ##   mother children      can 
##       16       15        9 
 ##  [1] "academic"   "away"       "balance"    "children"   "emotional" 
##  [6] "future"     "help"       "like"       "mother"     "phd"       
## [11] "physically" "present"    "pursuing"   "role"       "roles"     
## [16] "try"        "can"        "constantly" "don"        "even"      
## [21] "feel"       "kids"       "student"    "time"       "woman" 
 ## $mother
##        phd   pursuing   academic  emotional challenges     parent       past 
##       0.91       0.91       0.89       0.86       0.77       0.77       0.77 
##    virtual       year     family       like       role 
##       0.77       0.77       0.77       0.76       0.71 
## 
## $children
##   academic  emotional     future        phd physically    present   pursuing 
##       0.91       0.79       0.77       0.77       0.77       0.77       0.77 
##    heavily        one       seen   strength       toll challenges      faith 
##       0.75       0.74       0.74       0.74       0.74       0.73       0.73 
##      guilt incredibly     parent       past       role    virtual       year 
##       0.73       0.73       0.73       0.73       0.73       0.73       0.73 
##       like 
##       0.72 
## 
## $can
##        woman         feel         like         even      balance          don 
##         0.93         0.91         0.88         0.87         0.80         0.79 
##         hard       manage         work      creates        going        makes 
##         0.79         0.79         0.79         0.77         0.77         0.77 
##    pressures  sacrificing     academic       create       higher expectations 
##         0.77         0.77         0.73         0.70         0.70         0.70 
##         find      perfect 
##         0.70         0.70 

0.3 Generate Basic Word Cloud

Wordcloud shows up in PLOTS output tab

Change myScale to make it fit better in the window

 ## png 
##   2 

0.4 Advanced Word Clouds

BEWARE sometimes words do NOT fit and they are excluded… PAY ATTENTION

These show up in VIEWER output tab

  • size = Font size, default is 1. The larger size means the bigger word.
  • shape = Available presents are ‘circle’ (default), ‘cardioid’ (apple or heart shape curve, the most known polar equation), ‘diamond’ (alias of square), ‘triangle-forward’, ‘triangle’, ‘pentagon’, and ‘star’.
  • ellipticity = degree of “flatness” of the shape wordcloud2.js should draw.

0.4.0.1 Default

 ##              word freq
## mother     mother   16
## children children   15
## can           can    9
## like         like    8
## roles       roles    8
## time         time    8 

0.4.0.2 Stemmed

 ##              word freq
## mother     mother   17
## children children   15
## role         role   13
## time         time   10
## feel         feel    9
## can           can    9 

0.4.0.3 Resize

0.4.0.3.1 0.2
0.4.0.3.2 0.4
0.4.0.3.3 0.8

0.4.0.4 Emphasize Frequent words less

0.4.0.5 Reverse Frequency

Lower frequency words in the middle

0.4.0.6 Top N

0.4.0.6.1 ALL Terms Freq > 0
0.4.0.6.2 Top 100 Terms
0.4.0.6.3 Top 40 Terms
0.4.0.6.4 Top 20 Terms

0.4.0.7 Shapes

0.4.0.7.1 Pentagon ALL
0.4.0.7.2 Pentagon Reduced
0.4.0.7.3 Triangle
0.4.0.7.4 Triangle-forward
0.4.0.7.5 Cardioid

0.4.0.8 Background

0.4.0.9 Orientation

0.4.0.9.1 Perpendicular
0.4.0.9.2 Rotate Some
0.4.0.9.3 Rotate All
0.4.0.9.4 Lower Ellipticity
0.4.0.9.5 Higher Ellipticity

0.4.0.10 Complete Command for a Star

0.4.1 STEP 7: Save Webshot

 webshot::install_phantomjs()
#---
  htmlwidgets::saveWidget(starcloud, "starcloud.html", selfcontained = F)
#---
  webshot::webshot("starcloud.html", "starcloud.png", vwidth = 800, vheight = 800, delay = 5)
#---
  webshot::webshot("starcloud.html", "starcloud.pdf", vwidth = 800, vheight = 800, delay = 5) 

0.4.2 STEP 8: More Advanced

0.4.2.1 Letter-Shaped Cloud

Sometimes need to run this 3-4 times to get it to work… and sometimes never works…

 wordcloud2::letterCloud(df, word="MW", size=0.8) 

0.4.2.2 Shapes in Files

Sometimes need to run these 3-4 times to get them to work… and seomtimes never works…

 figFile <- "pumpkin.png"
  wordcloud2::wordcloud2(dfALL, figPath = figFile, size = 1, color = 'darkorange') 

0.5 Sentiment Analysis

0.6 BIGRAM NETWORK

These show up in PLOTS output tab

 ## # A tibble: 6 × 2
##     num text                                                                    
##   <int> <chr>                                                                   
## 1     1 "as a mother my experience as a virtual parent this past year has been …
## 2     2 ""                                                                      
## 3     3 "as a single mother being a virtual parent this past year has been noth…
## 4     4 ""                                                                      
## 5     5 "being a virtual parent for the past year has been an emotional rollerc…
## 6     6 "" 
 ## # A tibble: 945 × 2
##    bigram          n
##    <chr>       <int>
##  1 i m            18
##  2 my children    13
##  3 as a            9
##  4 being a         9
##  5 has been        8
##  6 i can           8
##  7 like i          8
##  8 that i          8
##  9 a mother        7
## 10 can t           7
## # ℹ 935 more rows 
 ## # A tibble: 6 × 2
##   bigram                    n
##   <chr>                 <int>
## 1 single mother             3
## 2 video calls               3
## 3 virtual parent            3
## 4 cultural expectations     2
## 5 emotional toll            2
## 6 mother makes              2 
 ## # A tibble: 6 × 3
##   word1     word2            n
##   <chr>     <chr>        <int>
## 1 single    mother           3
## 2 video     calls            3
## 3 virtual   parent           3
## 4 cultural  expectations     2
## 5 emotional toll             2
## 6 mother    makes            2 

 ## png 
##   2 

0.7 Compare Participants Files

0.7.0.1 Compare STEP 1: Open

Open files in a subfolder

0.7.0.2 Compare STEP 2: Clean

0.7.0.3 Compare STEP 3: Matrix

0.7.1 Compare STEP 4: Combine

0.7.2 Compare STEP 5: Compare

 ## png 
##   2 

0.7.3 Compare STEP 6: Commonality

0.8 Compare Questions Files

0.8.0.1 Compare STEP 1: Open

Open files in a subfolder

0.8.0.2 Compare STEP 2: Clean

0.8.0.3 Compare STEP 3: Matrix

0.8.1 Compare STEP 4: Combine

0.8.2 Compare STEP 5: Compare

 ## png 
##   2 

0.8.3 Compare STEP 6: Commonality

1 END

View Site in Mobile | Classic
Share by: