How to do a Word Cloud

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

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.

1 Like

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 :slight_smile:
If you've a Pipfile or requirements.txt for your Python project, please post it directly, might make it even easier.

1 Like

Or just do it in JS...

Example...
image

Code on flows library...
https://flows.nodered.org/flow/e191b8d72ce167a51b18b8d2dbef271d

2 Likes

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 ?

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

nodered can do 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!

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

image

... JS does do database :+1:

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

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

Certainly agreeing there, best of both worlds...

Maybe this node can help you:

1 Like

Awesome !

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