R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

library(readxl)
library(ggmap)
## 필요한 패키지를 로딩중입니다: ggplot2
## ℹ Google's Terms of Service: <https://mapsplatform.google.com>
##   Stadia Maps' Terms of Service: <https://stadiamaps.com/terms-of-service/>
##   OpenStreetMap's Tile Usage Policy: <https://operations.osmfoundation.org/policies/tiles/>
## ℹ Please cite ggmap if you use it! Use `citation("ggmap")` for details.
library(dplyr)
## 
## 다음의 패키지를 부착합니다: 'dplyr'
## 
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)

data  <- read_excel("C:/RSample/복지관.xlsx")
register_google(key="AIzaSyBDSAqpeWrydo385GZdMsloBsYkfj5GaJE")

strk <- "서울역"
location = geocode(strk)
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=%EC%84%9C%EC%9A%B8%EC%97%AD&key=xxx>
markers_data <- data.frame(lon=location$lon,lat=location$lat)
gg_map <- get_googlemap(strk,maptype = "roadmap",
                        zoom = 15,markers = markers_data)
## ℹ <https://maps.googleapis.com/maps/api/staticmap?center=%EC%84%9C%EC%9A%B8%EC%97%AD&zoom=15&size=640x640&scale=2&maptype=roadmap&markers=37.555946,126.972317&key=xxx>
## ℹ <https://maps.googleapis.com/maps/api/geocode/json?address=%EC%84%9C%EC%9A%B8%EC%97%AD&key=xxx>
ggmap(gg_map)