Learn R Programming

amapGeocode (version 1.0.0)

extractCoord: Extract coordinate from a geocoding response

Description

Extract coordinate from a geocoding response

Usage

extractCoord(res)

Value

A `tibble` with one row per geocode candidate. The table contains the original columns provided by the API alongside a `match_rank` column that indicates the ordering reported by AutoNavi. When the response does not contain any matches a single placeholder row filled with `NA` values is returned.

Arguments

res

Required. Response object returned by [getCoord()] with `output = "JSON"` or by the AutoNavi geocoding API.

See Also

[getCoord()]

Examples

Run this code
if (FALSE) {
raw <- getCoord("IFS Chengdu", output = "JSON")
extractCoord(raw)
}

Run the code above in your browser using DataLab