word-cloud

Importing wordcloud using Jupyter Notebook (Python)

最后都变了- 提交于 2019-12-24 01:45:31
问题 I am using jupyter Notebook(conda root). The python version I am running is 2.7 I am having a hard time getting wordcloud installed into my environment. Here's the code from wordcloud import WordCloud But I got this error: ImportErrorTraceback (most recent call last) <ipython-input-21-8038e19af624> in <module>() ----> 1 from wordcloud import WordCloud C:\Users\aneeq\Anaconda2\lib\site-packages\wordcloud\__init__.py in <module>() ----> 1 from .wordcloud import (WordCloud, STOPWORDS, random

Make all words uppercase in Wordcloud in R

老子叫甜甜 提交于 2019-12-23 21:22:11
问题 When creating Wordclouds it is most common to make all the words lowercase. However, I want the wordclouds to display the words uppercase. After forcing the words to be uppercase the wordcloud still display lowercase words. Any ideas why? Reproducable code: library(tm) library(wordcloud) data <- data.frame(text = c("Creativity is the art of being ‘productive’ by using the available resources in a skillful manner. Scientifically speaking, creativity is part of our consciousness and we can be

Word cloud in R with two separate values

六月ゝ 毕业季﹏ 提交于 2019-12-23 16:26:20
问题 As someone new to R, I am working at producing a word cloud that shows two variables: frequency and rating . Using a generic table, I am looking to display the hypothetical number of colleges (font = big to small in number) by state and the hypothetical average college rating 1 = green (good), 3 = yellow (average), 5 = red (bad) I am able to to create this cloud that depicts fonts = number of colleges, but cannot tie in the rating to the third column. Here is my generic table: State Colleges

How to create circular word cloud using Json Daives' D3 word cloud

。_饼干妹妹 提交于 2019-12-23 09:27:33
问题 I'm using Json Daives' D3 word cloud in R. I have generated the word cloud but the problem I face is that the shape of the word cloud is not circular. I was going through d3.layout.cloud.js file to try and modify the code to achieve this but in vain. The file has a function called " place " which defines the shape of the cloud. But I could not figure out how to modify this function so as to achieve the circular shape. Has anyone else tried to achieve this circular representation? I am pasting

word cloud -Error in strwidth(words[i], cex = size[i], …) : invalid 'cex' value

孤者浪人 提交于 2019-12-23 05:30:33
问题 I am replicating this word cloud tutorial, but I get: Error in strwidth(words[i], cex = size[i], ...) : invalid 'cex' value In addition: Warning messages: 1: In max(freq) : no non-missing arguments to max; returning -Inf 2: In max(freq) : no non-missing arguments to max; returning -Inf I do not really understand what is going on on each step of the code, but I think the problem might be related to the matrix produced having different rows or columns. This is the code I am using: install

Wordcloud showing colour based on continous metadata in R

折月煮酒 提交于 2019-12-22 21:56:59
问题 I'm creating a wordcloud in which the size of the words is based on frequency, but i want the colour of the words to be mapped to a third variable (stress, which is the amount of stress associated with each word, a numerical or continuous variable). I tried the following, which gave me only two different colours (yellow and purple) while i want something more smooth. I would like some color range like a palette that goes from green to red for example. df = data.frame(word = c("calling",

Wordcloud showing colour based on continous metadata in R

牧云@^-^@ 提交于 2019-12-22 21:56:39
问题 I'm creating a wordcloud in which the size of the words is based on frequency, but i want the colour of the words to be mapped to a third variable (stress, which is the amount of stress associated with each word, a numerical or continuous variable). I tried the following, which gave me only two different colours (yellow and purple) while i want something more smooth. I would like some color range like a palette that goes from green to red for example. df = data.frame(word = c("calling",

Wordcloud showing colour based on continous metadata in R

心已入冬 提交于 2019-12-22 21:56:01
问题 I'm creating a wordcloud in which the size of the words is based on frequency, but i want the colour of the words to be mapped to a third variable (stress, which is the amount of stress associated with each word, a numerical or continuous variable). I tried the following, which gave me only two different colours (yellow and purple) while i want something more smooth. I would like some color range like a palette that goes from green to red for example. df = data.frame(word = c("calling",

IOError: cannot open resource

冷暖自知 提交于 2019-12-22 12:15:31
问题 I have a code on ipython notebook where I am attempting to make a wordcloud, but I get an error. From what I could see, the error is related to something else and not my code (something with fonts?) --------------------------------------------------------------------------- IOError Traceback (most recent call last) <ipython-input-71-795b92e06f22> in <module>() 4 # print x[0], x[1] 5 ----> 6 genWordCloud(list_of_tuples) <ipython-input-70-55c34fb2c915> in genWordCloud(filename) 15 count =

Creating a subset of words from a corpus in R

偶尔善良 提交于 2019-12-22 08:44:07
问题 I have a 1,500-row vector created from a Twitter search using the XML package. I have then converted it to a Corpus to be used with the tm package. I want to ultimately create a wordcloud with some (the most frequent) of those words, so I converted it to a TermDocumentMatrix to be able to find terms with a minimum frequency. I create the object "a", which is a list of those terms. a <- findFreqTerms(mydata.dtm, 10) The wordcloud package does not work on document matrices. So now, I want to