Power BI is a Cloud based Service which provides data visualization options based on the source data. Using Power BI, we can create dashboards, which are based on the data. While using Power BI, make sure that you have a Power BI account. If you don’t have an account, you can sign up for it here .You can either work with Power BI online or download Power BI desktop version here.
Power BI has the flexibility to consume numerous data sources and generate business intelligence reports from the source data. In this article, we will see how to consume JSON data from a Wikipedia page within Power BI and create the reports using Wiki Table data. We will be connecting to the "Highest Mountain on Earth" Wiki page and we will create bar chart reports based on the height of the mountains.
Connect to Wikipedia
Before getting started with report generation, we have to connect to the Wikipedia data source. In order to do that, spin up Power BI Desktop and select ‘Get data’ option.
Select Web option and click on Connect.
This will open up a pop up where we can specify the Wikipedia page URL. Click on OK.
Specify the connection type as Anonymous and select the Page URL from the drop down. Finally, click on Connect to get connected with Wikipedia page.
It will list the type of data that is available from the page URL that we had specified. Select the checkbox against ‘List’ so as to connect to the table within the Wikipedia page.
Upon selecting the checkbox, the table in the page has been populated adjacent to it.
Click on "Load" to populate a copy of the table within PowerBI.
Create BI Reports
Go to the table page as shown below. We can see the loaded data within PowerBI.
Go back to the visualization page so as to create reports based on the loaded data.
From the visualization section, we will select bar chart as the choice of report generation option for the time being. To the right of the page, we can see the entire table columns that we can use for creating bar charts.
We will use only the required columns. As we are plotting Mountain versus Mountain height, let's drag Moutain Cloum to the X Axis and the Height Column to the Y axis (Values) section.
This will generate the bar chart report. Since we have not restricted the data, the entire mountain range within the table will be plotted in the bar chart making it congested.
To get meaningful data, we can apply filter so that only the required data will be plotted in the bar chart. Now, we have applied the filter such that only mountain with a height above 8400 metres are taken up for plotting in the bar chart.
We can customize the already created bar chart by adding colors, changing the font size, and so on from the customization section as shown below.
Publish to Power BI Online
Finally, we can publish the report to Power BI online.
Specify the credentials and click on Sign in.
Select "My workspac"e as the destination to publish the report.
Clicking on select will start the publishing of the report to Power BI online.
Finally, we have received the success message as shown below.
Heading over to Power BI Online, we can view the recently created report.
We can also change the filters directly from the online report.
Summary
Thus, we saw how we can make use of Wikipedia data and generate business intelligence reports using Power BI.