Book Image

Extending Power BI with Python and R

By : Luca Zavarella
Book Image

Extending Power BI with Python and R

By: Luca Zavarella

Overview of this book

Python and R allow you to extend Power BI capabilities to simplify ingestion and transformation activities, enhance dashboards, and highlight insights. With this book, you'll be able to make your artifacts far more interesting and rich in insights using analytical languages. You'll start by learning how to configure your Power BI environment to use your Python and R scripts. The book then explores data ingestion and data transformation extensions, and advances to focus on data augmentation and data visualization. You'll understand how to import data from external sources and transform them using complex algorithms. The book helps you implement personal data de-identification methods such as pseudonymization, anonymization, and masking in Power BI. You'll be able to call external APIs to enrich your data much more quickly using Python programming and R programming. Later, you'll learn advanced Python and R techniques to perform in-depth analysis and extract valuable information using statistics and machine learning. You'll also understand the main statistical features of datasets by plotting multiple visual graphs in the process of creating a machine learning model. By the end of this book, you’ll be able to enrich your Power BI data models and visualizations using complex algorithms in Python and R.
Table of Contents (22 chapters)
1
Section 1: Best Practices for Using R and Python in Power BI
5
Section 2: Data Ingestion and Transformation with R and Python in Power BI
11
Section 3: Data Enrichment with R and Python in Power BI
17
Section 3: Data Visualization with R in Power BI

What this book covers

Chapter 1, Where and How to Use R and Python Scripts in Power BI, gives an introduction to Power BI and dives into the integration of Python and R with Power BI, and how we can interact with your data while using it. It also dives into the limitations faced by both Python and R.

Chapter 2, Configuring R with Power BI, looks at how to get the analytical language engines from the previous chapters up and running and gives you some general guidelines on how to pick the most appropriate one for your needs. After that, we'll look at how to make these engines interface with both Power BI Desktop and Power BI Service. Finally, we will give some important tips on how to overcome some stringent limitations of R Visuals on Power BI Service.

Chapter 3, Configuring Python with Power BI, shows how to install the Python engines on your machine. You'll also see how to configure some IDEs so that you can develop and test Python code comfortably before using it in Power BI.

Chapter 4, Importing Unhandled Data Objects, explores the use of R and Python to import complex serialized objects into Power BI, with the aim of using them to enrich your dashboards with new insights.

Chapter 5, Using Regular Expressions in Power BI, explores the use of regular expressions to validate low-quality data, to import semi-structured log files, and to extract structured information from free text.

Chapter 6, Anonymizing and Pseudonymizing Your Data in Power BI, introduces de-identification techniques using Python or R scripts that can help the Power BI developer prevent a person's identity from being linked to the information shown on the report.

Chapter 7, Logging Data from Power BI to External Sources, shows how to use Power Query to log data to various external files or systems.

Chapter 8, Loading Large Datasets beyond the Available RAM in Power BI, shows how you can take advantage of the flexibility provided by specific packages that implement distributed computing systems in both Python and R without having to resort to Apache Spark-based backends.

Chapter 9, Calling External APIs to Enrich Your Data, explores how you can use Python and R code to read data from external web services for your dashboards. It also shows you how to reduce waiting time when retrieving data using parallelization techniques.

Chapter 10, Calculating Columns Using Complex Algorithms, shows how to analyze data using various algorithms and math techniques in order to get hidden insights from your data.

Chapter 11, Adding Statistics Insights: Associations, explains the basic concepts of some statistical procedures that aim to extract relevant insights regarding the associations between variables from your data.

Chapter 12, Adding Statistics Insights: Outliers and Missing Values, explores some methodologies for detecting univariate and multivariate outliers in your dataset. In addition, advanced methodologies to impute possible missing values in datasets and time series will be exposed.

Chapter 13, Using Machine Learning without Premium or Embedded Capacity, shows how to use machine learning in Power BI even if you only have the Pro license, using AutoML solutions and Cognitive Services.

Chapter 14, Exploratory Data Analysis, focuses on implementing a report that will help analysts in understanding the shape of a dataset and the relationship between its variables thanks to custom data visualizations developed in R.

Chapter 15, Advanced Visualizations, explores how you can create a very advanced and attractive custom chart using R and Power BI.

Chapter 16, Interactive R Custom Visuals, teaches you how to introduce interactivity into custom graphics created using R and by using HTML widgets directly.