1

I have been trying to do some dynamic Google Map plots from R using the PlotGoogleMaps() package. I have no problem in plotting the Spatial Points on google maps using this package.

I want to add filters to this map on Loan_ID (a column in the data frame). Below is the code I wanted to modify for filters on the html map. How can I add filter or multiple filters on this map.

Below is the code I ran

library(ggplot2)
library(ggmap)
library(RgoogleMaps)
require(rgdal)
require(sp)
require(plotGoogleMaps)

ddd<-read.csv("DATA.csv")

data<-cbind(ddd$u_long,ddd$u_lat)

AACRS <- CRS("+proj=longlat +ellps=WGS84")

UK_Map <- SpatialPointsDataFrame(data, ddd, proj4string = AACRS, match.ID=TRUE)

m <- plotGoogleMaps(UK_Map ,colPalette = rainbow(1), filename='MAP_Data.html')

The Dataset:

`u_lat      u_long     created_at         Emp-ID   loan_id   Visit_ID
18.9979405  73.1227208  11/6/2017 19:14     L1533   2323    3
20.0056743  73.7847664  11/7/2017 13:56     L0551   23      13
19.9888762  73.7831046  11/7/2017 15:17     L3310   46214   6
19.9888762  73.7831046  11/7/2017 15:17     L5250   456     13
21.0065718  75.556167   11/7/2017 17:40     L5525   4423    13
`

The plotted map

0 Answers0