Posts

Power BI with R: R Script Connector Unzips, Combines and Loads the Zipped csv/xlsx/xlsb/xls files

Image
  In this Video I shall share a method on using R in Power BI desktop to unzip the compressed excel files based on the identified file name extensions of extracted files, such as csv, xlsx, xls and xlsb etc, then combine them if they have same column headers and table structure, Finally load the combined data frame into power BI for further data modelling. The introduced R script in this video only focus on loading zipped files from local machine but it is possible to have slight modifications on the R script to be able to fulfil such automatic features online at cloud sites with the required respective http URL paths and access logins.   Let’s get start:   First, we need to prepare the received compressed sample files, we have four excel files with extensions, csv, xls, xlsx and  xlsb. All of them have the same data table structure, same column numbers with same column headers. After compressing them we get a zipped folder for the zipped four files as “Downl...

Power BI Advanced Visual & R: Simulate 3D Quadratic Surface in R Script Visual

Image
  In the video I have shared the detail steps and R script codes on creating 3D quadratic surface plot in power BI desktop. With changing the 8 parameter slicers in power BI visual we are able to simulate the different types of 3D quadratic surface with the View Angels at the levels of Horizontal and Vertical. The R package Lattice and function Wireframe are applied to plot the 3D quadratic Surface. The link of the R script codes for the video I have attached in the video descriptions in below. Hope this video brings some help for your project developments. R Scripts for the demo: # Load the lattice package: library(lattice) # Create Parameter Variable for rotating view angles HAngles=dataset$H_Angle VAngles=dataset$V_Angle # Create coefficient Prameter Variables: a = dataset$a b = dataset$b c = dataset$c d = dataset$d e = dataset$e f = dataset$f # Create data for a quadratic surface x <- seq(-5, 5, length.out = 100) y <- seq(-5, 5, length.out = 100) # z <- outer(x, y, fun...

Power BI Visualization & R : 3D ScatterPlot with Interactive Rotation View by R Script Visual

Image
  In the video. I have shared the method on using R script visual with package scatterplot3d to generate a 3D scatter plot, and also introduce a way on adding dynamic viewing angles to  rotate the 3D plot with slicer visual based on power BI new parameter feature generated angle value table . In the demo we applied power query editor to prepare source data table for the 3D plot, used the R studio to cerate and edit R script for 3d scatter plot and finally adopt the slicer visual generate by Power BI new parameter for interactive rotating 3D graphic view angels dynamically. Hope the video give some helps for your power BI project developments.  R Scripts: # Load the scatterplot3d library: library ( scatterplot3d ) # Define variables from the source data for plotting: x <- dataset $ "Technical Skills" y <- dataset $ "Leadership & Management" z <- dataset $ "Personal Development" l <- dataset $ "Employee ID" # apply scattedplot3d...

Power BI Advanced Visualizations & R : Circular BarPlot with R Script Visual.

Image
  In the video I have shared a method to draw the circular barplot in power BI desktop file. As shown in the screen, the Circular BarPlot, which wraps a barplot that has larger numbers of categorical entities in circular shape, thus with it users can obtain all entities with their measure in a more eye catching organization space chart. To get this Circular Barplot chart in power BI we need to employ the power BI R script visual.  To Enable R scripts Visual feature in Power BI Desktop , we need go to File > Options and settings > Options > R Scripting. In the R scripts options you have two fields to fill. First one is to choose home directory for R, which means you need first to install a R engine and select the installed R engine location for the field. To install R engine we may click the  link ”how to install R”. it brings us to the Microsoft learning site regarding where to download R engine and how to install it.  The second field is to choose which R I...