get_geo_position: Get the location information of the city vector

Description Usage Arguments Details Value Author(s) Examples

View source: R/get_geo_position.R

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

1
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

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.

Value

A dataframe of longtitude and latitude and city name

Author(s)

Dawei.Lang Chiffon <http://lchiffon.github.io>

Examples

1
2
city_vec1 = c("Beijing","Shanghai","Guangzhou")
get_geo_position (city_vec1)

Lchiffon/REmap documentation built on Dec. 14, 2019, 11:43 p.m.