The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello and thanks for reading my question,
I like the specific map customization that Leaflet for R provides but need to present my work using Power BI.
Is there a way to render an html file in Power BI?
My R code is basic:
library(leaflet)
library(htmlwidgets)
path <- file.path(getwd(), "test.html")
m <- leaflet() %>% addTiles(urlTemplate = url,
attribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>') %>%
addMarkers(lng = 174.768, lat = -36.852, popup = "Something")
m
saveWidget(m, file = path)
I also tried pasting that into the R script visualization with no success. I read about creating a custom visual with nodeJS, but not being an expert, that sounds a bit scary. What are my options?
Thanks again!
Hi. I'm trying to do the same. I have a hexagon map in R that works just fine in leaflet, but when I add it to power BI as an R visual, it says it's not possible to present the visual element.
I've tried creating my own visual, I've installed powershell and did all the pbiviz package tutorials I could find.
Is there a way to do this? If not, is there an alternative?
Hi @Anonymous,
AFAIK, power bi desktop has limitations to use R visual and r script so this code may not fully work well when you use on r visual.
You can take a look at the following document to know more about use R script in power bi:
Create Power BI visuals using R#known-limitations
BTW, of these formulas work on power bi desktop side, you also need to pay attention about use them on power bi service side.
It not as same as executing R script on a local device, r script processing on a cloud server should have more limit and they may be blocked due to performance and security related reasons.
Create visuals by using R packages in the Power BI service
Power BI Security#data-storage-security
Regards,
Xiaoxin Sheng
@Anonymous , refer if one of these can help if you have not explored
https://docs.microsoft.com/en-us/power-bi/visuals/service-r-visuals
https://blogs.perficient.com/2017/07/13/how-to-use-r-visuals-in-the-power-bi/
https://medium.com/@Konstantinos_Ioannou/how-to-create-an-r-custom-visual-html-for-powerbi-7f2d2e44e453
User | Count |
---|---|
75 | |
70 | |
40 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
50 | |
46 |