A tag cloud is a visual representation for text data, typically used to depict keyword metadata (tags) on websites.
Questions tagged [word-cloud]
742 questions
54
votes
6 answers
Increase resolution with word-cloud and remove empty border
I am using word cloud with some txt files. How do I change this example if I wanted to 1) increase resolution and 2) remove empty border.
#!/usr/bin/env python2
"""
Minimal Example
===============
Generating a square wordcloud from the US…

Bobo
- 941
- 2
- 11
- 19
48
votes
5 answers
How to create a word cloud from a corpus in Python?
From Creating a subset of words from a corpus in R, the answerer can easily convert a term-document matrix into a word cloud easily.
Is there a similar function from python libraries that takes either a raw word textfile or NLTK corpus or Gensim…

alvas
- 115,346
- 109
- 446
- 738
23
votes
2 answers
Python: wordcloud, repetitive words
In the word cloud I have repetitive words and I do not understand why they are not counted together and are shown then as one word.
from wordcloud import WordCloud
word_string = 'oh oh oh oh oh oh verse wrote book stand title book would life…

Alina
- 2,191
- 3
- 33
- 68
21
votes
6 answers
Generate word cloud from single-column Pandas dataframe
I have a Pandas dataframe with one column: Crime type. The column contains 16 different "categories" of crime, which I would like to visualise as a word cloud, with words sized based on their frequency within the dataframe.
I have attempted to do…

the_bonze
- 325
- 1
- 4
- 11
19
votes
3 answers
Failed building wheel for pillow
Trying to build a wordcloud in python.
# Start with loading all necessary libraries
import pandas as pd
import matplotlib.pyplot as plt
from wordcloud import WordCloud
pandas imported just fine, although took a bit longer then expected.
now i…

sky_walker
- 209
- 1
- 2
- 4
18
votes
1 answer
change specific word color in wordcloud
I would like to build a word cloud with R (I have done so with the package wordcloud) and then color specific words a certain color. Currently the behavior of the function is to color words according to frequency (which can be useful) but word size…

Tyler Rinker
- 108,132
- 65
- 322
- 519
18
votes
2 answers
geom_wordcloud : is this a pipe dream
I deal a bit with textual data across various grouping variables. I'm thinking of creating a method to make faceted wordcloud plots using Ian Fellows' wordcloud package. I like the way ggplot2 facets social variables. I'm deciding how to approach…

Tyler Rinker
- 108,132
- 65
- 322
- 519
17
votes
2 answers
generating word cloud for items in a list in python
my_list=["one", "one two", "three"]
and I am generating a word cloud for this list by using
wordcloud = WordCloud(width = 1000, height = 500).generate(" ".join(my_list))
As I am converting all the items into string it is generating word cloud…

Pyd
- 6,017
- 18
- 52
- 109
17
votes
1 answer
D3: Using force layout for word clouds
I'm working on a tag visualization where tags transition between different force-directed layouts.
I had few issues figuring out how to transition from a bubble chart to a node chart, but I'm a bit stuck as to how to get the charts to transition…

Jess
- 225
- 3
- 12
16
votes
2 answers
how can one increase size of plotted area wordclouds in R
trying to replicate the example here;
http://onertipaday.blogspot.com/2011/07/word-cloud-in-r.html
Need help figuring out how to increase the plotted area of the word cloud. Changing the height and width parmeters in png("wordcloud_packages.png",…

sgt pepper
- 267
- 2
- 4
- 9
16
votes
2 answers
R: add title to wordcloud graphics / png
I have some working R code that generates a tag cloud from a term-document matrix.
Now I want to create a whole bunch of tag clouds from many documents, and to inspect them visually at a later time.
To know which document(s)/corpus the tag-cloud…

knb
- 9,138
- 4
- 58
- 85
14
votes
3 answers
Create wordcloud from dictionary values
I just wrote a script that extracts all the spoken text in the Dutch Parlement of a few thousand XML files. For every speaker it count the amount of times a speaker said some words.
After doing this I calculated the TF * IDF value of every word for…

Niels Gorsel
- 377
- 2
- 3
- 9
14
votes
3 answers
text wordcloud plotting error
I have the following code for plotting a word cloud, and am getting the subsequent error.
wordcloud(dm$word, dm$freq, scale=c(8,.2),min.freq=2,
+ max.words=Inf, random.order=FALSE, rot.per=.15, colors=rainbow
>Warning message:
In…

Sridevi Vadapalli
- 161
- 1
- 2
- 5
13
votes
2 answers
Wordcloud is cropping text
I am using twitter API to generate sentiments. I am trying to generate a word-cloud based on tweets.
Here is my code to generate a wordcloud
wordcloud(clean.tweets, random.order=F,max.words=80, col=rainbow(50), scale=c(3.5,1))
Result for this:
I…

Harsh Shah
- 2,162
- 2
- 19
- 39
13
votes
2 answers
WordCloud from data frame with frequency python
i have a dataframe as bellow
Int64Index: 14830 entries, 25791 to 10668
Data columns (total 2 columns):
word 14830 non-null object
coef 14830 non-null float64
dtypes: float64(1), object(1)
i try to make word cloud with coef as a frequency…

Edward
- 4,443
- 16
- 46
- 81