본문 바로가기
Data Analysis/Spotfire

Spotfire : R을 통해 GoogleMap 가져오기

by 불탄오징어 2013. 9. 11.
반응형

일전에 Spotfire와 R을 연동해서 GoogleMap을 가져오려고 했었는데 잘 안됐었다.

오늘 문의 했던 Support의 답변이 왔는데 아주 간단하게 해결되었네...



require(ggmap)
City_map <- get_map(City, zoom = zoom)
City_map_info<-ggmap(City_map, extent = "device", legend = "topleft")

googlemap<-makePNGBlob(print(City_map_info),width=500,height=500) 


print 함수를 써서 간단하게 해결....



해결된 결과 City/State에 도시를 입력하면 해당 도시에 대한 지도를 가져오는 예제이다.



댓글