R语言中如何获取城市的经纬度
1、
> library(REmap)
> options(remap.ak = "此处输入个人秘钥")
> city_vec = c("Beijing","Haerbin","Shanghai","Guangzhou")
> get_city_coord("Shanghai")
[1] 121.48054 31.23593
> get_geo_position (city_vec)
lon lat city
1 116.4134 39.91092 Beijing
2 126.5416 45.80882 Haerbin
3 121.4805 31.23593 Shanghai
4 113.2714 23.13534 Guangzhou