Learn R Programming

remap (version 0.3.2)

get_geo_position: Get the location information of the city vector

Description

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

Usage

get_geo_position(city_vec, cache_data = "city", ...)

Arguments

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

Value

A dataframe of longtitude and latitude and city name

Details

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.

Examples

Run this code
# NOT RUN {
city_vec1 = c("Beijing","Shanghai","Guangzhou")
get_geo_position (city_vec1)
# }

Run the code above in your browser using DataLab