Description Usage Arguments Details Value Author(s) Examples
View source: R/get_geo_position.R
get_geo_position use the function of get_city_coord according to Baidu API <http://developer.baidu.com/map/>to get the longtitude and latitude of the city vector
1 | get_geo_position(city_vec, cache_data = "city", ...)
|
city_vec |
a character object of the name of Chinese city, |
cache_data |
c('city','airport','none') city for city geo_position, airport for the geo_position in that city, none for nothing for cache |
This function can transform the name of Chinese city ve tor Which can be a Chinese string or an English name,like Shanghai. This function is used BaiduAPI to get the geo information.\ It's recomendece to use Chinese city name because of the API we use is Baidu, which will performs better in Chiese\ Please make sure your bowser can open developer.baidu.com/map/ to get the data.
A dataframe of longtitude and latitude and city name
Dawei.Lang Chiffon <http://lchiffon.github.io>
1 2 | city_vec1 = c("Beijing","Shanghai","Guangzhou")
get_geo_position (city_vec1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.