Returns Indian administrative boundaries as an sf object. Useful as the
polygons argument to extract_panel().
Arguments
- level
One of
"country","state", or"district".- source
One of
"gadm"(default) or"bhuvan". Forlevel = "state", the default uses a bundled LGD dataset with SoI-compliant boundaries regardless ofsource."bhuvan"fetches geometries from the Bhuvan API so that names matchbhuvan_stats()output exactly.
Details
State boundaries use a bundled LGD (Local Government Directory) dataset derived from the Survey of India.
For custom boundaries, load your own file with sf::read_sf() and pass it
directly to extract_panel() – no wrapper needed.
Examples
if (FALSE) { # \dontrun{
states <- get_india_admin("state")
districts <- get_india_admin("district")
# custom boundary:
districts <- sf::read_sf("https://bharatviz.org/India-bhuvan-districts.geojson")
} # }