| extractAdmin | R Documentation |
Extract subordinate administrative regions from a district response
extractAdmin(res, include_polyline = FALSE)
res |
Required. Response object returned by [getAdmin()] with 'output = "JSON"' or by the AutoNavi district API. |
include_polyline |
Logical indicating whether to include the polyline column (requires 'extensions = "all"'). Defaults to 'FALSE'. |
A 'tibble' describing each administrative region present in the response. The table includes parent metadata ('parent_name', 'parent_adcode', 'parent_level'), centre coordinates ('lng', 'lat'), and a 'depth' column describing the nesting level (0 for the matched region, 1+ for subregions). When no results are present a single placeholder row filled with 'NA' values is returned.
[getAdmin()]
## Not run:
raw <- getAdmin("Sichuan Province", output = "JSON")
extractAdmin(raw)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.