extractAdmin: Get Subordinate Administrative Region from getAdmin request...

View source: R/getAdmin.R

extractAdminR Documentation

Get Subordinate Administrative Region from getAdmin request Now, it only support extract the first layer of subordinate administrative region information.

Description

Get Subordinate Administrative Region from getAdmin request Now, it only support extract the first layer of subordinate administrative region information.

Usage

extractAdmin(res)

Arguments

res

Response from getAdmin.

Value

Returns a data.table which extracts detailed subordinate administrative region information from results of getCoord. See https://lbs.amap.com/api/webservice/guide/api/district for more information.

See Also

getAdmin

Examples

## Not run: 
library(dplyr)
library(amapGeocode)

# Before the `getAdmin()` is executed,
# the token should be set by `option(amap_key = 'key')`
# or set by key argument in `getAdmin()`

# Get subordinate administrative regions as a XML
getAdmin("Sichuan Province", output = "XML")  |>
  # extract subordinate administrative regions as a data.table
  extractAdmin()

## End(Not run)


womeimingzi11/amapGeocode documentation built on Nov. 5, 2023, 6:24 a.m.