Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi I am trying to build a map that I can connect cordinates and fill in the area. I have had success with Rstudio but would prefer to get the code to work in PowerBi. the Rstudio code I used is
library(dplyr)
library(leaflet)
map<-leaflet(width =500, height= 500) %>%
addTiles() %>%
addPolygons(lng = c(-76.12483,-75.49118,-75.01104,-75.05677,-75.37360,-76.27835,-77.11451,-76.60171,-76.77809,-76.50045,-76.12483), lat=c(38.56060,39.18615,38.64739,37.87028,37.49547,37.17344,37.33463,38.01968,38.34830,38.59635,38.56060)) %>%
addCircles(lng = c(-76), lat= c(38), color ="red",weight = 70 )
map
I am hand writting the cordinates to test but plan on using a datafile instead. The issue I am getting is that Power Bi is reporting that no visual was created, but this produces one in Rstudio. From my understanding, leaflet is supported in PowerBi (according to Learn which R packages are supported - Power BI | Microsoft Learn).
Is there something else I would need to add to the code to get it to show up? Are there better packages for the job? Heck, if there is a good power bi specific solution I would love that. Thanks for your input!
Hi @ctruxillo ,
Please make sure you have installed the node.js.
Here is a solved post with similar issue like yours, I hope it could help you.
You may refer to offical blogs to learn more details.
For reference:
Run R scripts in Power BI Desktop
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 39 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 83 | |
| 71 | |
| 39 | |
| 29 | |
| 27 |