Importing the custom visual package into Power BI
Now that the bulk of the work is done, importing your custom visual into Power BI is a breeze. First of all, you need to install the xml2
package in your R engine, as it is used by the provided utility functions:
- Open RStudio and make sure it is pointing to your latest CRAN R (version 4.2.2 in our case).
- Click on the Console window and type this command:
install.packages('xml2')
. If you remember, this library is listed in the dependency file you saw in the previous section. Then, press Enter.
Now let’s import the custom visual into Power BI:
- Make sure that Power BI Desktop is pointing to the correct R engine (the latest one) in Options.
- Click on Get data, search for
web
, select Web, and click on Connect. - Type the following URL as the source: http://bit.ly/titanic-dataset-csv. Then click OK.
- Make sure that the File Origin is 65001: Unicode (UTF-8) and click Load...