In this tutorial, you will learn how to import a table of data from a Web page and create a report to visualize this data. As part of this process, you navigate across tables available on a web page, and apply data transformation steps to bring the table into a new shape.

In this article - Task 1: Connect to a web data source - Task 2: Shape data in the Query view - Step 1: Remove Other Columns to only display columns of interest - Step 2: Replace Values to clean up values in a selected column - Step 3: Filter values in a column - Step 4: Rename a column - Step 5: Filter null values in a column - Step 6: Rename a query - Query Steps created - Task 3: Create visualizations using the Report view - Step 1: Load the query to your report - Step 2: Create a Map visualization

Task 1: Connect to a web data source

In task 1, you import a Tournament Summary table from the UEFA European Football Championship Wikipedia page at http://en.wikipedia.org/wiki/UEFA_European_Football_Championship

Add a Wikipedia page data source

  1. In the Getting Started dialog or in the Home ribbon tab, click Get Data.

  2. This brings up the Get Data dialog, where you can pick from a wide range of data sources to import data into Power BI Desktop. We will select Web which is available under the All or Other group.

  3. In the Web Content dialog box, in the URL text box, paste the Wikipedia URL (http://en.wikipedia.org/wiki/UEFA_European_Football_Championship).

  4. Click OK.

After establishing a connection to the web page, you see a list of tables available on this Wikipedia page in the Navigator dialog. You can single-click on each of these tables to preview the data.

In the Navigator left-pane, select the Results[edit] table for the Tournament Summary results, or select the Results[edit] table and select Edit. This will allow us to reshape this table before loading it to the Report, since the data is not in the shape that we need for our analysis.

This will land a preview of the table in the Query view, where we can apply a set of transformation steps to clean up the data.

Task 2: Shape data in the subject table

Now that you have the subject table selected for your data query, you learn how to perform various data shaping and cleansing steps.

Step 1: Remove Other Columns to only display columns of interest

In this step, you remove all columns except Year and Final Winners.

  1. In the Query Preview grid, select the Year and Final Winners columns (use CTRL + Click).

  2. Right-click a column header in the Query Preview grid, and click Remove Other Columns to remove the unselected columns. Note that this operation is also available in the Home ribbon tab, in the Manage Columns group.

Step 2: Replace Values to clean up values in a selected column

In this step, you replace the Details suffix in the Year column. Note that this suffix is on a new line so it is not visible in the table preview. However, if you click in one of the cells with a numeric value in the Year column, you will see the full value in the detailed view.

  1. Select the Year column.

  2. In the Query view ribbon, click Replace Values under the Home tab or right-click the Year column, and click Replace Values to replace Details with empty text.

  3. In the Replace Values dialog box, type Details in the Value to Find text box and leave the Replace With text box empty.

  4. Click OK.

Step 3: Filter values in a column

In this step, you filter the Year column to display rows that do not contain “Year”.

  1. Click the filter drop down arrow on the Year column.

  2. In the Filter drop-down, clear the Year option.

  3. Click OK.

Step 4: Rename a column

Now that we have cleaned up the data in the Year column, we are going to work on the Final Winner column.

Since we are only looking at the list of winners, we can rename this column to Country.

  1. Select the Final Winner column in the Query preview.

  2. In the Query view ribbon, under the Transform tab and Any Column group, you will find Rename.

  3. This will make the column name editable. We will rename this column to Country.

Step 5: Filter out null values in a column

We also need to filter out null values in the Country column. In order to do this, we could use the filter menu as we saw in Step 3, or alternatively we can:

  1. Right-click on one of the cells in the Country column that contain a null value.

  2. Select Text Filters -> Does not Equal in the context menu.

  3. This creates a new filter step to remove rows with null values in the Country column.

Step 6: Name a query

In this step, you name your final query Euro Cup Winners.

  1. In the Query Settings pane, in the Name text box, enter Euro Cup Winners.

Task 3: Create visualizations using the Report view

Now that we have converted the data into the shape that we need for our analysis, we can load the resulting table into our Report and create a few visualizations.

Step 1: Load the query to your report

In order to load the query results to Power BI Desktop and create a report, we select Close & Load from the Home ribbon.

This will trigger evaluation of the query and load of the table output to the Report. In Power BI Desktop, select the Report icon to see Power BI Desktop in Report view.

You can see the resulting table fields in the Fields pane at the right of the Report view.

Step 2: Create a Map visualization

In order to create a visualization, we can drag fields from the Field list and drop them in the Report canvas.

  1. Drag the Country field and drop it in the Report canvas. This will create a new visualization in the Report canvas. In this case, since we have a list of countries, it will create a Map visualization.

  2. We can easily change the type of visualization by clicking on a different icon in the Visualization pane.

3.  We are going to stay with the Map visualization type to Map, We can also resize the visualization by dragging from one of the corners of the visualization up to the desired size.

4. Note that currently all the points in the map have the same size. We want to change this so that countries with more Euro Cup tournaments won are represented with a larger point in the map. In order to do thiso, we can drag the Year field in the Fields list to the Values box in the lower half of the Fields pane.

As you can see, it is very easy to customize visualizations in your report, in order to present the data in the way that you want. Power BI Desktop provides a seamless end-to-end experience from getting data from a wide range of data sources and shaping it to meet your analysis needs to visualizing this data in rich and interactive ways. Once your report is ready, you can upload it to Power BI and create dashboards based on it, which you can share with other Power BI users.

This concludes the Importing Data from the Web tutorial. You can download the completed Power BI Desktop file here.

Tutorial: Importing and analyzing data from a Web Page using Power BI Desktop的更多相关文章

  1. Tutorial: Facebook analytics using Power BI Desktop

    In this tutorial you learn how to import and visualize data from Facebook. During the tutorial you'l ...

  2. [Project] Simulate HTTP Post Request to obtain data from Web Page by using Python Scrapy Framework

    1. Background Though it's always difficult to give child a perfect name, parent never give up trying ...

  3. DEDECMS系统安全篇之移data目录到Web根目录以外听语音

    http://jingyan.baidu.com/article/ad310e80aeb0971849f49e8e.html 主要三个步骤: 1./include/common.inc.php 2.还 ...

  4. mysql --secure-file-priv is set to NULL.Operations related to importing and exporting data are disabled

    --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabledmy ...

  5. 《Using Python to Access Web Data》 Week5 Web Services and XML 课堂笔记

    Coursera课程<Using Python to Access Web Data> 密歇根大学 Week5 Web Services and XML 13.1 Data on the ...

  6. How To Crawl A Web Page with Scrapy and Python 3

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...

  7. Home | eMine: Web Page Transcoding Based on Eye Tracking Project Page

    Home | eMine: Web Page Transcoding Based on Eye Tracking Project Page The World Wide Web (web) has m ...

  8. save a web page as a single file (mht format) using Delphi code

    Here's how to save a web page as a single file (mht format) using Delphi code: uses CDO_TLB, ADODB_T ...

  9. How a web page loads

    The major web browsers load web pages in basically the same way. This process is known as parsing an ...

随机推荐

  1. Alfresco安装与配置图解

    Alfresco安装与配置图解 Alfresco是一款开源的企业内容管理系统(ECM),为企业提供了日常的文档管理.工作流(可以和企业目前的OA协同接合使用).工作记录管理.知识管理.网络内容管理.图 ...

  2. [前端 3]纯Js制作俄罗斯方块游戏

    导读:在别人文章里看到了,然后写了一遍.结果出错了,然后调出来了,然后理解了一下,加了点注释,有一些想法.忘了在 哪一篇上面看的了,就贴不出来链接地址.原谅.呃,真没自己的东西,权当练打字了吧.其实, ...

  3. MFC六大核心机制之二:运行时类型识别(RTTI)

    上一节讲的是MFC六大核心机制之一:MFC程序的初始化,本节继续讲解MFC六大核心机制之二:运行时类型识别(RTTI). typeid运算子 运行时类型识别(RTTI)即是程序执行过程中知道某个对象属 ...

  4. css透明属性

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. EasyUI datagrid 复杂表头处理

    1:表头固定(前台写) 参照官方:http://www.jeasyui.net/demo/334.html 效果图: 源代码如下: <!DOCTYPE html> <html> ...

  6. 设备版本,设备号,APP版本,APP名称获取

    //获取设备id号 UIDevice *device = [UIDevice currentDevice];//创建设备对象 NSString *deviceUID = [[NSString allo ...

  7. 结合Git实现Mysql差异备份,可用于生产环境

    埋头苦干多年一直没写过文章,今天突发狂想,为LNMP阵营贡献一些力量.就从平时工作过程中的心得和一些技巧分享出来.今天就猿们最熟悉的Mysql开始宅鸟的开篇博客文章.欢迎猿们拍砖.转载. 注意:宅鸟的 ...

  8. 第一章 Collections 类、泛型类和Timing类概述

    摘抄<数据结构与算法(C#语言描述)> 删除很多废话 1.1群集(collection)的定义 群集是一种结构化的数据类型.存储数据,并且提供数据的添.删.改操作,以及对群集不同属性值的设 ...

  9. Android系统四层架构分享

    Android系统四层架构 个人网站:http://www.51pansou.com Android视频下载:Android视频 Android源码下载:Android源码 如果把Android系统看 ...

  10. Resources are low on NN. Please add or free up more resources then turn off safe mode manually.

    提交spark应用到yarn集群上的时候在跑一段时间就会出现这个报错: 根据上面的报错原因分析是因为集群资源不够,集群的自我保护机制使hdfs处于安全模式,然后我用"hdfs dfsadmi ...