Data visualization is one of the important aspects of Data Science Projects. Before applying any machine learning model, it is always beneficial to perform Exploratory Data Analysis on the available dataset which can help dig deeper into the problem in consideration. There are various tools that are available to perform the analysis on the data like Tableau, Excel, etc.
Power BI is the analytics service provided by Microsoft which aims to help the users to provide interactive visualizations. The best part of Power-BI is its ease of use and the UI is simple enough that users can create their own dashboards or reports. It supports various features which include running python script or R script etc.
In this article, we will focus on embedding the report in the Jupyter notebook using powerbiclient provided by Microsoft.
Below is the sample Power BI report which is publicly accessible and is provided by Microsoft for demos. We will be using this report for trying out different scenarios in this article.
In this article, we will explore how we can integrate any Power BI report with Jupyter notebook using python. LET’s GO!
2. Embed the report in the notebook
2.A. Install PowerBI Client
Let’s first install the library which will be used to integrate the report into the notebook
pip install powerbiclient
PowerBI report embedding utility class The library exposes a class Report which will be used to integrate the report. Let’s talk about different parameters which are taken by this class :
– access_token: Token to authenticate to PowerBI service while embedding the report.
– embed_url: Embed URL of the Power BI report.
– token_type: It’s an Enum with values — AAD, EMBED, with default value as AAD.
– group_id: Id of Power BI Group or Workspace where the report resides.
– report_id: Id of Power BI report.
– auth: Authentication object. It will be used if ‘access_token’ is not provided.
2.B. Ways through which we can integrate a report:
1. Using Report URL
2. Using Report ID and Group ID
We use cookies on Analytics Vidhya websites to deliver our services, analyze web traffic, and improve your experience on the site. By using Analytics Vidhya, you agree to our Privacy Policy and Terms of Use.Accept
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.