Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

amapGeocode (version 0.6.0)

extractLocation: Extract location from coordinate request

Description

Extract location from coordinate request

Usage

extractLocation(res)

Arguments

res

Required. Response from getLocation.

Value

Returns a data.table which extracts detailed location information from results of getLocation. See https://lbs.amap.com/api/webservice/guide/api/georegeo for more information.

See Also

getLocation

Examples

Run this code
# NOT RUN {
library(dplyr)
library(amapGeocode)

# Before the `getLocation()` is executed,
# the token should be set by `option(amap_key = 'key')`
# or set by key argument in `getLocation()`
# Get reverse-geocode as a XML
getLocation(104.043284, 30.666864, output = "XML") %>%
  # extract reverse-geocode regions as a table
  extractLocation()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab