# How to do a Word Cloud

**URL:** <https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213>\
**Category:** Dashboard\
**Created:** [12 June 2020 08:38 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213 "2020-06-12T08:38:58Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anir](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Anir](https://discourse.nodered.org/u/Anir)\
**Post date:** [12 June 2020 08:38 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/1 "2020-06-12T08:38:58Z")

</div>

Good day, My first post here so please excuse any errors. I have a python word cloud that I developed using Jupyter notebook. It works perfect there. I then want to show this in my node-red dashboard. Whats the best way to do this ? Thank you

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 June 2020 08:56 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/2 "2020-06-12T08:56:08Z")

</div>

Can you export it as an image? Maybe as an SVG image?

If you can, then you could export it to the folder you set as your static folder in Node-RED's settings.js and then link to it from the dashboard.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [12 June 2020 09:22 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/3 "2020-06-12T09:22:41Z")

</div>

Hi Anir, which python library did you use to create the word cloud, and how are you displaying it in the Notebook? Can you add the name of the Python libraries you're using. I've experience developing widgets for Jupyter. It might be a pretty quick solution to do the same in Node-RED, or it might be more extensive depending on that answer 🙂  
If you've a `Pipfile` or `requirements.txt` for your Python project, please post it directly, might make it even easier.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 June 2020 13:21 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/4 "2020-06-12T13:21:45Z")

</div>

Or just do it in JS...

Example...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/07c3b135a1c7fd42066800634d3014a00855fbea.png)

 ![wordcloud](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3c2e6fd6224badb7418d6b6792973632148dfeff.gif)

Code on flows library...  
[https://flows.nodered.org/flow/e191b8d72ce167a51b18b8d2dbef271d](https://flows.nodered.org/flow/e191b8d72ce167a51b18b8d2dbef271d)

---

<div class="post-metadata">

**Author:** ![Anir](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Anir](https://discourse.nodered.org/u/Anir)\
**Post date:** [12 June 2020 15:00 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/5 "2020-06-12T15:00:40Z")

</div>

Thanks for the one in JS , but from what I read Javascript cannot access my MYSQL database directly to pull all the data in and then create the word cloud . What do you recommend ?

---

<div class="post-metadata">

**Author:** ![Anir](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Anir](https://discourse.nodered.org/u/Anir)\
**Post date:** [12 June 2020 15:01 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/6 "2020-06-12T15:01:13Z")

</div>

Yes this is a plan. Will try it out . Thank you

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 June 2020 15:01 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/7 "2020-06-12T15:01:45Z")

</div>

> [@Anir](#):
>
> but from what I read Javascript cannot access my MYSQL database directly

nodered can do [MYSQL](https://flows.nodered.org/search?term=mysql) (and SQL Server and MariaDB and Postgres and many others)

EDIT...

What you are not getting here is - node-red runs server side so if you want any data from a database, get it, process it in node red, send it to dashboard.

the fact my demo uses hard coded text is because it means you can actually see it working before trying to automate it with data from a a database.

Example...

dashboard button \> MYSQL (get word cloud) \> send to dashboard

Done!

Interactive, dynamic, no python, no screen shots, no SVG dumps, no files - all in memory (no SD wear, faster etc)

I dont see the issue!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 June 2020 15:13 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/8 "2020-06-12T15:13:49Z")

</div>

Look maa - no python, no files, fully dynamic ...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/a/fa318bbff5973266bcfcc60547c0c9dfd5829a52.png)

... JS does do database 👍

---

<div class="post-metadata">

**Author:** ![Anir](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Anir](https://discourse.nodered.org/u/Anir)\
**Post date:** [12 June 2020 15:29 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/9 "2020-06-12T15:29:17Z")

</div>

Thank you, I am definitely going to try this out !

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 June 2020 17:11 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/10 "2020-06-12T17:11:36Z")

</div>

> [@afelix](#):
>
> I've experience developing widgets for Jupyter

Not wishing to sidetrack this thread ... but ... something that integrated Jupyter with Node-RED might well be interesting 😉

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [12 June 2020 17:26 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/11 "2020-06-12T17:26:53Z")

</div>

Certainly agreeing there, best of both worlds...

---

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [12 June 2020 17:55 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/12 "2020-06-12T17:55:38Z")

</div>

Maybe this node can help you:

> **[node-red-node-ui-vega](https://flows.nodered.org/node/node-red-node-ui-vega/in/590bc13ff3a5f005c7d2189bbb563976)**
>
> Node-RED UI widget node for Vega visualization grammar

---

<div class="post-metadata">

**Author:** ![Anir](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@Anir](https://discourse.nodered.org/u/Anir)\
**Post date:** [12 June 2020 19:35 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/13 "2020-06-12T19:35:43Z")

</div>

Awesome !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 July 2020 19:35 UTC](https://discourse.nodered.org/t/how-to-do-a-word-cloud/28213/14 "2020-07-12T19:35:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
