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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

R interactive map in Power BI using raster and shapefile

Hello!
I'm trying to load my script in power BI, which is:

-----------
library(ggplot2)
library(ggmap)
library(plotly)
library(raster)
library(sf)
library(rgdal)
library(rgeos)
library(mapview)


setwd("C:/Users/Daniel/Desktop/IDGeo/Earth analytics course_Learn data science/data/week 4")

ndwi <- raster("california/SJER/vector_data/2017_06_04_NDWI_CLIP.tif")

pivos <- readOGR(dsn = "california/SJER/vector_data",
"aneis_anapaula_0904")


M2<- mapView(ndwi, alpha.regions = 0.50, na.color = "transparent")
m4 <- mapview(pivos, lwd = 1.5, color = "gray40")

M2 + m4

 

-------------
ndwi = my raster data
pivos = my shapefile

----

In R it works perfectly and returns an interactive map containing my raster data plus myshapefile, however, in pwrbi nothing happen...

Anyone knows what could be happening?
Or, anyone could suggest another way to plot raster + shapefile interactive maps in power BI using R?
Thanks very much, best regards.

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.