Hi Grp members,
is it possible to plot map using factor variable?
I am trying to plot ATMs, Hospital, and restaurant location (Lat/Long) and with address but i m not getting desired result.
Below is the code
eq <- read.csv ('C:/Users/abc/Desktop/2013_08_01_NCR_Master.csv')
str (eq)
'data.frame': 13430 obs. of 6 variables:
$ Type : Factor w/ 3 levels "ATM","Hospital",..: 2 2 2 2 2 2 2 2 2 2 ...
$ Lat : num 28.5 28.5 28.4 28.6 28.7 ...
$ Lng : num 77 77 77 77 77 ...
$ PhoneNumber: Factor w/ 5562 levels "","0","011 2004 4406",..: 4922 1 2610 1 1 2669 1 2652 1 4075 ...
$ Address : Factor w/ 13394 levels "???, IGI Airport T3 Road, IGI Airport, New Delhi, DL",..: 11064 11071 13208 9306 12497 2644 10809 9722 6499 12089 ...
$ Type1 : int 2 2 2 2 2 2 2 2 2 2 ...
coordinates(eq) = ~Lng + Lat
proj4string(eq) = CRS("+proj=longlat +datum=WGS84")
eq <- SpatialPointsDataFrame( eq , data = data.frame( id = row.names( eq ) ) )
ma<-plotGoogleMaps(eq,zcol="Type", colPalette=c("#FFF7BC", "#FEC44F","#D95F0E"),filename='myMap82.html',mapTypeId= 'TERRAIN', fitBounds=T)
but it is not producing desired results
I want only 3 color bubbles by "Type" - ATM, Hospital & Restaurants
I hope you can help me, this is my first time in R.
I am using Windows and R is 3.0.2
Thanks in advance
Regards
Abhishek