0

I'm working to create a visual in Power BI using R plotly library (which I see is now supported by Power BI) but I am receiving an error which states "No image was created. The R code didn't result in creation of any visuals. Make sure your R script results in a plot to the R default device."

Here is the code:

g <- plot_geo(dataset, lat = ~Latitude, lon = ~Longitude, color= ~Dollars)
g_info <- g %>% add_trace(hoverinfo = "text", hovertext = paste("DMA: ", dataset$DMA_NAME, "Dollars: ", dataset$Dollars))
g_info

In RStudio this works great and results in the interactive map which I am trying to produce. However nothing will show up in Power BI.

Seems like every article about this is from 2017 before plotly was supported so I'm hoping there is something simple that I'm missing with today's PBI environment.

3 Answers 3

2

They should pull plotly off the list of supported R libraries for Power BI. It's not properly ready yet.

Sign up to request clarification or add additional context in comments.

1 Comment

Completely agree! So many finicky steps to get it working.
2

It's a little bit more complicated to use R plotly within PowerBI than just R ggplot as it renders an html and not a just a graphic like png. Here is how to do it: https://towardsdatascience.com/interactive-power-bi-custom-visuals-with-r-a6a4ac998710

Comments

0

First of all, you need to integrate R into Power BI. Go to "get data" in Power BI and on the list of all sources, choose R. Then you need to enter the directory of the R program files on your machine in order to link the two together.

1 Comment

Can you provide some screenshots / code snippets?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.