install.packages("ggmap")
install.packages("devtools")

library(stringi)
library(devtools)
library(ggplot2)
library(ggmap)


register_google(key = 'AIzaSyArs78-K15cgPVtHsEl3JqJREBrwRLXkpc')

su_map <- get_map(location="seoul", zoom=11, maptype='roadmap')
bu_map <- get_map(location="busan", zoom=11, maptype='roadmap')
store_201812_1 = read.csv("상가업소_201812/상가업소_201812_01.csv")
View(store_201812_1)
df_date_seoul_1812<- store_201812_1 %>%  filter(시도명 == "서울특별시")
df_date_busan_1812<- store_201812_1 %>%  filter(시도명 == "부산광역시")


df_date_seoul_rank10_1812 <- df_date_seoul_1812 %>%group_by(시군구명) %>% summarise(n=n()) %>% arrange(desc(n)) %>% head(10)
View(df_date_seoul_1812 %>%group_by(시군구명))



View(df_date_seoul_1812)
View(df_date_busan_1812)
ggmap(su_map)+geom_point(data= df_date_seoul_1812, aes(x=경도,y=위도, color=상권업종대분류명,),size=1, alpha=.75)
ggmap(bu_map)+geom_point(data= df_date_busan_1812, aes(x=경도,y=위도, color=상권업종대분류명,),size=1, alpha=.75)

