Posts

Showing posts with the label WordCram

Word Clouds with Processing and R

Image
I've previously relied on  wordle.net to produce 'word clouds'. These clouds give greater prominence to words that appear more frequently in a source text. However, it is also possible to produce similar, highly customisable word clouds in Processing and R . Processing relies on the excellent  WordCram library. This is straightforward to install and can take any text file or website and produce a word cloud. The source code below demonstrates the variety of presentation options that are available. While the WordCram extension allows for some nice visual tricks, the text file has to be free of any undesirable additional variables or words that may need be excluded before creating a word cloud. In other words, Processing doesn't allow for any advanced text mining techniques e.g. you might want to remove all numbers or specific words form a file before producing a word cloud. R becomes more useful in this instance. Combining the tm  (text mining) and wordcloud p...