Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

2016 1 20 Analyzing and Visualizing Data with Power BI MOD3 11h

0 (0 Likes / 0 Dislikes)
  • Embed Video

  • Embed normal player Copy to Clipboard
  • Embed a smaller player Copy to Clipboard
  • Advanced Embedding Options
  • Embed Video With Transcription

  • Embed with transcription beside video Copy to Clipboard
  • Embed with transcription below video Copy to Clipboard
  • Embed transcript

  • Embed transcript in:
    Copy to Clipboard
  • Invite a user to Dotsub
If you're a data scientist, you might be familiar with a package called R. This is a really common application that data scientists use to do very deep analytical and statistical analysis over data. It's also a really good visualization platform. And what we did with Power BI Desktop was allowed you to integrate with R, to go and say, "Okay, we'll use some of the packages and some of the visualizations that are available in R but host those within the Power BI Desktop report. That means that you can send data that's within your Power BI Desktop file over to R, get R to generate some visuals or run some script to get into that data and then bring it back into the report and use it on the canvas just like any other visual. Let's take a look at how that works. I've got a desktop report here with some data already loaded. In this case we're looking at different models of car and then some stats around kind of their number of carburetors, the number of cylinders, the engine size, et cetera, et cetera. Let's just add a table just so you can see the sort of data I'm talking about. It's just some simple numeric data. And what we're going to do here is actually look at the correlation between all of these different metrics for each car. Maybe there is some correlation between things like the miles per gallon or the horsepower compared to the number of cylinders, for example. So to create an R visual, all I need to do is choose that from the visualizations pane. It'll get added to the canvas just like anything else, and you'll see at the bottom of the window, there's an R script editor that gets generated. Now because of the way that we've zoomed in in this video, it takes over a whole lot of the screen. If you were using a larger screen resolution, you wouldn't see this. Or at least it wouldn't take up so much space. But you can see to get started we need to start adding some fields into the values area of the field wheel. So let's just pick the fields that we're interested in. I'm going to add all of these ones down here. And you can see them being added to the field wheel here on the right-hand side. And you can see in the script editor we're actually starting to build some of the R script up. These are just some commented outlines. This is some work that we did behind the scenes to create a data set, which is the unit of data that R operates over. And we're doing it by passing in all of the different fields that we selected from our model. And then down the bottom I can start pasting or typing in my R script. I've got some that I've already typed up before. And you can see what we're doing is we're using a correlation plot library that I downloaded and installed from the web. We're converting our data set into a matrix. That's what the correlation plot library uses. And you can see here this is the line that actually generates our correlation plot. So it uses our matrix, and then there are some parameters that just change the way that that visual looks. So now I to hit run. What's going to happen is we're going to take that data from the Power BI desktop, send it to my local installation of R, run this script, get a visual back and put that onto the Power BI canvas. So there you go. That happened pretty quickly. It's taken that data, sent it over to R, and then brought the visual back in. And you can see we've got some correlations shown in this visual. So there's obviously a really high correlation between the individual fields. But you can see the blue one's a high correlation and the red one's lower. I can come back and edit that script further. So I've got a few different examples here. I've just commented out some different lines that just render the correlation plot in a slightly different way just changing some of the parameters for that. So hit run, hit re-render, and now we get one with circles instead of squares. The size of the circle is indicated on the correlation table. But because this is just a visual on the Power BI Desktop canvas, it works like any other visual. So I can resize it. I can move it around. But it's also interactive like any other visual. So if I create a little doughnut chart, and let's just add whether or not this car was a sports car and just do a count of the number of sports cars. So you can see that we've got a few more sports cars than we have— sorry, a few fewer sports cars than we have non-sports cars. But now when I start selecting and interacting with these visuals, the R visual will get updated as well. So if I want to focus and look just at the sports cars, when I click on that you'll see the R visual gets updated and it gets filtered out just to show the data for those cars. Compare that to the non-sports cars. And you can see it's re-rendering as I interact with that data. So in the same way that we would have filtered or rehighlighted any other visual when I interact with it, the R visual has the data filter damp gets sent back to R, the visualization gets rendered again and gets sent back to the Power BI Desktop. And I can save this report and do anything else that I would normally do with a Power BI Desktop report. So it's a really easy way to integrate with that R package and use any of the visuals or statistical analysis that are available through R right here in the Power BI Desktop.

Video Details

Duration: 5 minutes and 22 seconds
Language: English
License: Dotsub - Standard License
Genre: None
Views: 2
Posted by: csintl on Feb 9, 2016

Caption and Translate

    Sign In/Register for Dotsub to translate this video.