Data Journey

International Studies Grad. racing for AI Engineer

Download as .zip Download as .tar.gz View on GitHub
15 February 2021

Gmap Data

by mervyn

source “K-MOOC 오세종 교수님의 강좌의 9. 지도상에 데이터 표현하기 중 (http://www.kmooc.kr/courses/course-v1:DKUK+DKUK0003+2020_T3)"

ggmap

library(ggmap) 
gc<- geocode(enc2utf8("용인")) # latitude, longtitude
cen<- as.numeric(gc) # lat/long in numbers
map<- get_googlemap(center=cen) # create map
ggmap(map) # present the map

get_googlemap parameter

Parameter Explanation
center center of the map
zoom zoom in, zoom out 3(continent)~21(building)
size width*height
maptype type of map
library(ggmap)
gc<- geocode(enc2utf8("설악산"))
cen<- as.numeric(gc)
map<- get_googlemap(center=cen,
zoom=8, 
size=c(640, 480),
maptype="hybrid")
ggmap(map)

Assignment

  1. Present a map of Seoul City Hall. Size: 800*600. Maptype: “roadmap”

  2. Present a map of Kumgang Mountain. Size: 640*480. Maptype: “hybrid”. Zoom: 8

  3. Longitude: 103.867881, Latitude: 1.331017. Maptype: “roadmap”. Zoom: 9.

back

Index

tags: R

Comments

Post comment
Loading...

Share this: