Word cloud - anyone create such a component?

Got a request from a potential client to display some text data as a word cloud. I was hoping there was some copy-paste code / libraries I could use, before I do some hacky collection list stuff. I tried looking at some NPM libraries but didn’t make any headway there using that plug in… wordcloud - npm as an example.

Don’t need anything complicated with any bells or whistles, just thought a existing library might offer some out of the box styling that accelerates this project.

Will separately start working on some sort of collection list view that just presents a list of words where the weight of the word is based on the frequency of the word appearing in the list

I made a quickie word cloud using NPM in weweb. Here’s my video on the subject:

1 Like

This is so helpful! Thanks!

This is going to open up a least a bit of the npm libraries world for me (for better or worse …)

one question because I’m not super familiar with how these libraries work (non-engineer) - but the actual code from the library is being run on locally / at the client? I’m not actually sending any data to a server/backend/etc from the wordcloud npm library. I’m basically importing the function?

AFAICT that is correct. You can look at the network tab in dev tools to see if anything is being sent upstream. I didn’t observe anything.

If you have security concerns, there’s no substitute for an audit to make sure. This would apply to any package you bring to bear. Such an examination wouldn’t be that hard- the wordcloud package is zero-dependency and maybe a couple hundred lines of code. Not that much to read. You could even dump it into chatgpt to see if it sees any security challenges.

1 Like

So, today, I learned that we can drag and drop the variable into the code editor to reference the variable ID.

Cool tutorial btw

1 Like