如何在Power BI Desktop中创建词云生成器

In this article, we’ll look at how to create a Word cloud generator in Power BI Desktop, including importing data, customization and more.

在本文中,我们将研究如何在Power BI Desktop中创建词云生成器,包括导入数据,自定义等等。

In my last article, Power BI Desktop Interactive chord diagrams, we learned about customized visualizations in Power BI Desktop. These visualizations are free to install and we can use them with our data set and customize charts as per our requirements.

在上一篇文章Power BI Desktop Interactive和弦图中 ,我们了解了Power BI Desktop中的自定义可视化。 这些可视化是免费安装的,我们可以将其与数据集结合使用,并根据需要自定义图表。

总览 (Overview)

A Word Cloud is a visualization that draws an image from frequently appearing words in the data set. These words are arranged in a cloud shape. The size of the words in the cloud image is proportional to its frequency.

词云是一种可视化效果,可以从数据集中经常出现的单词中绘制图像。 这些词以云的形式排列。 云图像中单词的大小与其频率成正比。

Below is an example of how Word cluster looks like (Image Courtesy – Wikipedia)

Word Cloud sample image

以下是Word群集外观的示例(图片由Wikipedia提供)

We can use word clusters to display keywords, tags, etc. We can quickly locate the items in the Word Cloud based on the size and color of the word.

我们可以使用词簇来显示关键字,标签等。我们可以根据词的大小和颜色在词云中快速找到项目。

For example, in the above example, we can see that the fewer words are appearing in the larger font size that shows the most used keyword as per the conditions defined.

例如,在上面的示例中,我们可以看到,按照定义的条件,以较大的字体显示的单词越少,显示出使用最多的关键字。

We can use Power BI Desktop to create an interactive visualization with control on the appearance of the word cluster on the text, size, color, number of words, background, rotation etc.

我们可以使用Power BI Desktop创建交互式可视化文件,并控制文本中字簇的外观,大小,颜色,字数,背景,旋转度等。

导入Word Cloud Generator的样本数据 (Importing Sample data for Word Cloud Generator)

To create a word cloud generator, we’ll first need data. In this example, we will use sample data books.csv from GitHub. This data shows the title, author, genre and publisher details.

要创建文字云生成器,我们首先需要数据。 在此示例中,我们将使用来自GitHub的示例数据book.csv 。 此数据显示标题,作者,类型和发行者详细信息。

Sample Data to create Word Cloud

Click on Raw, copy and save the data into.CSV file. We will import this.CSV file to create the Word cloud generator in Power BI Desktop.

单击Raw,将数据复制并保存到CSV文件中。 我们将导入this.CSV文件以在Power BI Desktop中创建词云生成器。

Now open Power BI Desktop and click on ‘Get Data’. Choose ‘Text\CSV’ source from the list.

现在打开Power BI Desktop,然后单击“获取数据”。 从列表中选择“文本\ CSV”源。

Import data from Data Source - Text\CSV

Provide the location of the source data (books.csv) and click Open.

提供源数据的位置(books.csv),然后点击打开

Import data from Data Source - Text\CSV

We can get a preview of the data here. If we do not want to make any changes in the data, then click on Load.

我们可以在这里预览数据。 如果我们不想对数据进行任何更改,请单击“ 加载”

In this example, some of the fields contain blank values as well. Therefore, we do not want those blank values data to create a Word Cloud generator. Click on Edit

在此示例中,某些字段也包含空白值。 因此,我们不希望这些空白值数据创建词云生成器。 点击编辑

In this example, some of the fields contain blank values as well. Therefore, we do not want those blank values data to create our Word cluster. Click on Edit

在此示例中,某些字段也包含空白值。 因此,我们不希望这些空白值数据创建Word群集。 点击编辑

Preview data that Imported data from Data Source - Text\CSV

In this example, some of the fields contain blank values as well. Therefore, we do not want those blank values data to create our Word cloud generator. Now click on Edit to make changes in the data.

在此示例中,某些字段也包含空白值。 因此,我们不希望这些空白值数据创建我们的词云生成器。 现在单击“ 编辑”以更改数据。

This opens Power Query Editor. Click on the columns and uncheck the blank value option from the publisher column.

这将打开Power Query Editor。 单击列,然后从发布者列中取消选中空白值选项。

Edit data to create the Word Cloud

Similarly, uncheck the blank value from the ‘Author’ column.

同样,取消选中“作者”列中的空白值。

Edit data to create the Word Cloud

Once we are done, click on ‘Close and Apply’

完成后,点击“关闭并应用”

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值