mike_honey's avatar
mike_honey
Memorable Member
9 years ago

Power BI demo - Creating Effective Graphs with Microsoft R Open

This demo is a companion to the excellent white paper and sample project: Creating Effective Graphs with Microsoft R Open, by by Naomi B. Robbins and Joyce Robbins:
 
 
In this demo file I have implemented the R scripts and Graphs shown in that white paper using Power BI, to showcase it's R Integration features. The pages in this report correspond to the Chapters in the white paper.
 
Where text/CSV files were used in the white paper, I have replaced the R code to load them with data from a Power BI Query. This gives an opportunity to demonstrate Power BI's interactive filtering, where Slicers or other visuals can be selected to filter and dynamically generate R graphs.
 
In my opinion Power BI represents a great platform to host R graphs/visualizations, and mash up R data integration scripts with Power BI data integration.
 
The example below shows 4 R graphs all controlled by a single Power BI slicer, with no extra code required:
 

6 Replies

  • mike_honey's avatar
    mike_honey
    Memorable Member

    Prerequisites (The sample .pbix files will not work without these prerequites completed)

    1. Install R Engine

    Power BI Desktop does not include, deploy or install the R engine. To run R scripts in Power BI Desktop, you must separately installR on your local computer. You can download and install R for free from many locations, including the Revolution Open download page, and the CRAN Repository.

     

    2. Install the required R packages.

    Download the R script attached to this message and run it to install all required packages on your local machine. 

     

    Required R packages:

    stats, lattice, MASS, ggplot2, tidyr, HH, dplyr, micromapST


    Tested on:

    CRAN 3.3.1, MRO 3.3.1, Power BI Desktop 2.38 (August 2016)

     

    Legal Disclaimers:

    Terms of Service and Third Party Programs.

     

    • mike_honey's avatar
      mike_honey
      Memorable Member

      Screen shots of my pages for:

       

      2. Direct Comparisons

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      3. Distributions

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      4. Trends over time

       

      • mike_honey's avatar
        mike_honey
        Memorable Member

        Screen shots of my pages for:

         

         

        5. Relationships

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

        6. Percents

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

         

        7. Special Cases

         

  • kavasimihaly's avatar
    kavasimihaly
    Frequent Visitor

    Thanks,

    it's a great help for me to learn how to use R with Power BI.

     

    Great work.

  • boefraty's avatar
    boefraty
    Microsoft Employee

    This is an amazing work.  If you consider to convert some of your R-visuals to R-powered-custom visuals, out team will be happy to assist you.  Almost all of these visuals are great candidates for the PBI Gallery ! I tested the support for R-packages in service, all of the  packages beside "micromapST" are already supported.

     

    The visibility of R-powered custom visuals in gallery is greater and it is not limited for R-users. 

  • Hi Mike,

     

    I've a question that is more related to Integration Architecture between PowerBI and HDInsight. Let's assume that my data is stored in Azure Storage Account or Data Lake STorage, and I have also HDInsight cluster running Microsoft R Server. In PowerBI, I need the R visual script to work on a massive amount of data stored in Data Lake Storage and run using Microsoft R Server, then it returns a relatively managebale dataset to be visualised. 

     

    Is this architecture attainable?

     

    Thanks.

    Is