Skip to content

Commit

Permalink
ucgg wordcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
darwinanddavis committed May 1, 2024
1 parent dcae23c commit 1cb2d54
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
17 changes: 17 additions & 0 deletions UsefulCode_ggplot.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1297,4 +1297,21 @@ girafe(ggobj = wrap_plots(gg, gg_bar, widths = c(8, 8), heights = c(6, 2),
```


Word clouds
```{r, eval = F}
devtools::install_github("lchiffon/wordcloud2") # need to use dev ver
figpath <- here::here("face.png") # needs to be black and white
wcld <- data.frame("keyword" = LETTERS[1:20],
"freq" = sample(100,20))
# run twice if first time doesn't run
wordcloud2(wcld, figPath = figpath,
color = c("skyblue","red"),
backgroundColor = "pink")
# other options
# https://spencerschien.info/post/data_viz_how_to/dense_word_clouds/
# https://lepennec.github.io/ggwordcloud/
# https://stackoverflow.com/questions/42028462/wordcloud-with-a-specific-shape
```

29 changes: 20 additions & 9 deletions UsefulCode_ggplot.html

Large diffs are not rendered by default.

0 comments on commit 1cb2d54

Please sign in to comment.