Introduction

There are many Word Cloud Generators online and some are free. R also has the wordcloud package and you can use this with Shiny to build your own Word Cloud Generator. This post shows such a simple Shiny application with some generated word-cloud samples.

Shiny API



Input Data

tidyverse_packages.csv
======================
word, count
ggplot2, 95  
dplyr, 92               
tidyverse, 90
...


Shiny Codes

library(wordcloud)
library(shiny)
library(ggplot2)
library(RColorBrewer)

ui <- fluidPage(
  etc..
)
  
server <- function(input, output) {
  plotInput <- function(){
    
  etc..
    # this is the key function.
    p <- wordcloud(words = df[,1], freq = df[,2], min.freq = 1,  max.words=Inf, random.order=TRUE, rot.per=0.3, 
                  colors = brewer.pal(10, "Set3")
    )
    p
    
  }
  
  output$plot <- renderPlot({
    plotInput()
  })

  etc..
  
}

shinyApp(ui, server)


Samples

Example 1


Example 2


Example 3


Contact

Email: