[R-sig-Geo] plotGoogleMaps - Represent Text on map
Abhishek Kapoor
kapoor.ab at gmail.com
Wed Jan 22 07:57:15 CET 2014
Hi Sir,
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
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/plotGoogleMaps-Represent-Text-on-map-tp7585603.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list