Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
jaimeroncero
New Member

Custom Visual Script R Polygon map Interactive

Good morning, I am trying to create a map with power bi r script, I cannot use shiny and I cannot use leaflet either, can you recommend some option to represent a polygon map from the R script, it has to be interactive.

2 REPLIES 2
jaimeroncero
New Member

Good morning , and thank for your info. The link is very ussefull.

I have created a map in R with leaflet, and when I load it into Power Bi in R script, I get an error: "no image has been created, the R code has not generated any visual, Please make sure the R script results in a plot on R's default device."


My goal is to load with R, using any library, an interactive map that can click on spatial objects (polygons, points, lines) and return values ​​of their attributes.
Could it be that R Script cannot contain this functionality in Power BI?

jaimeroncero_0-1721804014843.png

 

Anonymous
Not applicable

Hi @jaimeroncero ,

By default, Power BI Desktop doesn't include, deploy, or install the R engine. To run R scripts in Power BI Desktop, you must separately install R on your local computer. 

Then I think you can go to File > Options and settings > Options. Under Global, select R scripting.

vyilongmsft_0-1721798081051.png

If you want to know more about this, I think you can read this document: How to create geographic maps in Power BI using R (sqlshack.com)

vyilongmsft_1-1721798532820.png

 

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.