1
$\begingroup$

I have a table like this:

FirstName    SecondName     Amount
Lorenzo      Perone         100
Mario        Rossi          25
...          ...            ...

I'd like to create a "word cloud" using "Amount" as weight, is it possible using the "word cloud" tool? Thanks.

$\endgroup$
2
  • 1
    $\begingroup$ Word clouds are past their prime, but this should do if you insist: wordclouds.com $\endgroup$ – Emre Apr 20 '17 at 8:05
  • $\begingroup$ There are many Word Cloud Generator available online and finding the best one is difficult but we have done this for you. We have found the top 8 Free Word Cloud Generator of 2018 You can check them now and select the best which suits you. $\endgroup$ – Johnceni Aug 24 '18 at 8:01
2
$\begingroup$

I will give you a simple solution using R which requires the wordcloud package. Of course there are many other solutions which do not require any programming skills.

The solution is a slight varient of this R-Bloggers tutorial. Feel free to have a look there for further formatting.

library(wordcloud)

words = c('Paolo Gentiloni', 'Matteo Renzi', 
          'Enrico Letta', 'Mario Monti', 
          'Silvio Berlusconi', 'Romano Prodi')
freq = c(100, 25, 50, 70, 95, 20)

wordcloud(words = words, freq = freq, min.freq = 1,
          max.words=200, random.order=FALSE, rot.per=0.35, 
          colors=brewer.pal(8, "Dark2"))

It produces the following output: Wordcloud of Italien prime ministers and random numbers

Btw. @Lorenzo Perone: Where the ones listed Italien names? I was not sure about that.

$\endgroup$
3
  • $\begingroup$ I've names and weights in a csv, could you explain me how to load a csv in R? $\endgroup$ – Lorenzo Perone Apr 20 '17 at 12:38
  • $\begingroup$ Within this it is explained. $\endgroup$ – So S Apr 20 '17 at 12:43
  • $\begingroup$ I've loaded a csv correctly but when I run the script > wordcloud(mydata['Nome'], mydata['Contributo'], max.words = 300) I read Error in [.data.frame(words, ord <= max.words) : undefined columns selected $\endgroup$ – Lorenzo Perone Apr 21 '17 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.