x | y | NT_CN |
121.564003 | 25.0359 | 184 |
121.5149994 | 25.0451 | 110 |
121.5500031 | 25.0992 | 102 |
121.564003 | 25.0404 | 91 |
121.5049973 | 25.0452 | 86 |
R Script如下:
#change directory
setwd("C:/Users/chienhung0304/Desktop")
#read data
data = read.csv("geo.csv",header=T,sep=",")
#import package
library(ggplot2)
library(ggmap)
#center 中心點
#zoom 調整圖資深淺度
#maptype 圖資類型"terrain","satellite", "roadmap", and "hybrid"
#size 調整圖資大小
ggmap(get_googlemap(center='taipei city', zoom=12, maptype='roadmap', size = c(680,680), scale = 4), extent='device') + geom_point(data=data, aes(x=x, y=y), colour='red', size=data$NT_CN*0.1, shape = 19)
呈現結果如下:
沒有留言:
張貼留言