반응형
install.packages("ggplot2")
install.packages("ggmap")
library(ggmap)
library(ggplot2)
setwd("d:/data")
wifizone<-read.csv("wifizone.csv",encoding = "EUC-KR") #한글이 있어서 인코딩
cent<-c(mean(wifizone$LON),mean(wifizone$LAT))
gc<-geocode("seoul,korea",source="google")
center<-as.numeric(gc)
center
bmap<-ggmap(get_googlemap(center=cent,zoom=11),extent="device",base_layer=ggplot(wifizone,aes(x=LON,y=LAT,colour=FLY_GBN)))
bmap+geom_point()
bmap+geom_density2d()+facet_wrap(~FLY_GBN)
반응형
'R Programming > R을 이용한 누구나 하는 통계분석' 카테고리의 다른 글
BostonHousing 자료 다중선형회귀 (0) | 2015.10.29 |
---|---|
공공 WIFI 지도로 나타내기 (1) | 2015.10.07 |
제 2장 기술통계 (0) | 2015.07.04 |
제 1장 시작하기 (0) | 2015.07.03 |