ggmap

 

w=read.csv("LA.Neighborhoods.csv")
w=data.frame(w,density=w$Population/w$Area)
u=w[,c(1,2,5,6,11,16)]
hh=hclust(dist(scale(u[,-1])),"complete")
plot(hh,lables=u[,1],cex=.6)
id=identify(hh)

ppp=c(7,17,19,21,24)

plot(w[id[[1]],14:15],pch=ppp[1],col=1,xlim=c(-118.7,-118.1),ylim=c(33.73,34.32),main="Los Angeles")
for(i in 2:5)
points(w[id[[i]],14:15],pch=ppp[i])
legend("bottomleft",pch=ppp,paste("Cluster",1:5))

library(ggmap)
hdf=get_map(location = c(lon = -118.1,lat=33.9))
ggmap(hdf)

 

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-12-10
  • 2022-02-08
  • 2021-11-18
猜你喜欢
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案