Extract subordinate administrative regions from a district response
Source:R/getAdmin.R
extractAdmin.RdExtract subordinate administrative regions from a district response
Value
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.
Examples
if (FALSE) { # \dontrun{
raw <- getAdmin("Sichuan Province", output = "JSON")
extractAdmin(raw)
} # }