/PowerBI-visuals-WordCloud

Repo for Power BI Word Cloud custom visual

Primary LanguageTypeScriptOtherNOASSERTION

PowerBI-visuals-WordCloud

Word Cloud is a visual representation of word frequency and value. Use it to get instant insight into the most important terms in a set.

Screenshot of sentiment colored word cloud

Overview

Word Cloud is a visual representation of word frequency and value. Use it to get instant insight into the most important terms in your data.

With the interactive experience of Word Cloud in Power BI, you no longer have to tediously dig through large volumes of text to find out which terms are prominent or prevalent. You can simply visualize them as Word Cloud and get the big picture instantly and user Power BI’s interactivity to slice and dice further to uncover the themes behind the text content.

This visual also puts you in control on the appearance of the work cloud, be it the size or usage of space and how to treat the data. You can choose to break the words in the text to look for the frequency word or keep word break off to project a measure as a value of the text. You can also enable stop words to remove the common terms from the word cloud to avoid the clutter. By enabling rotation and playing with the angles allowed, you can become very creative with this visual.

Optionally you can also use a measure to provide weightage to the text. If none provided, it will simply use the frequency. Check out the formatting pane for more options.

See also Word Cloud at Microsoft Office store

Custom word coloring by sentiment

This fork of the repo adds color functions.

To use in a Power BI dashboard:

Download the PBIVIZ file from this repo.

Click on the "..." under Visualizations and Import the PBIVIZ file you just downloaded.

Screenshot of "import visualization file" menu

You may have to accept some warnings since it is an unpublished extension.

The WordCloud icon should now show up and, unlike the original Microsoft version, have a red "W":

Screenshot of red wordcloud icon

Once you have added words into the WordCloud, go the the Format Visual tab > Data Colors and click the "fx" button for one of the words. (Doesn't matter which word.)

Screenshot of the color function button

Then, set an appropriate colorizing function, for example:

Screenshot of the color function window with red, grey and blue color gradient

Development

The visual is written in TypeScript and requires a recent version of node to be installed. (node v16 LTS was used in development)

  1. Clone this repo and navigate to the directory
  2. npm install
  3. npm install -g powerbi-visuals-tools
  4. pbiviz start
  5. Go to https://localhost:8080/webpack-dev-server/ and allow the connection.
  6. In app.powerbi.com, enable developer visuals and add the developer visual. It will connect to your localhost to process the visual.
  7. Make changes to the code and the visual will be automatically recompiled. (But you'll need to refresh PowerBI website)
  8. To package the new version, run pbiviz package.

See this article and Microsoft documentation for more details.