mapview icon indicating copy to clipboard operation
mapview copied to clipboard

Show popupTable + popupGraph

Open ViniciusBMoreira opened this issue 5 years ago • 2 comments

I made a lot of search trying to figure out if is possible to show in mapview both atributtes table and a graph for a point data.

It is possible?

ViniciusBMoreira avatar May 26 '20 17:05 ViniciusBMoreira

Can you provide a reproducible example?

tim-salabim avatar May 27 '20 07:05 tim-salabim

Of course. I want to do something like this:

library(mapview)
library(lattice)
library(sp)

zipcodes <- unique(breweries$zipcode)

pList <- lapply(zipcodes,
                function(i) {
                  xyplot(founded ~ number.of.types, data = breweries,
                         col = "blue",
                         subset = (zipcode == i),
                         type = 'p',
                         xlab = '', ylab = '')} #whatever graph
)

mapview(breweries,popup = popupGraph(pList) + popupTable(breweries,
                                                         zcol = c("brewery",
                                                                  "village",
                                                                  "founded")))

ViniciusBMoreira avatar May 27 '20 12:05 ViniciusBMoreira