map_india {mapindiatools}R Documentation

Retrieve Indian mapping data

Description

Retrieve Indian mapping data

Usage

map_india(
  regions = c("states", "state", "districts", "district"),
  include = c(),
  exclude = c()
)

Arguments

regions

The region breakdown for the map, can be one of ("states", "state", "districts", "district"). The default is "states".

include

The regions to include in the resulting map. If regions is "states"/"state", the value can be either a state name, abbreviation or code. If states are provided in the district map, only ditricts in the included states will be returned.

exclude

he regions to exclude in the resulting map. If regions is "states"/"state", the value can be either a state name, abbreviation or code. The regions listed in the include parameter are applied first and the exclude regions are then removed from the resulting map. Any excluded regions not present in the included regions will be ignored.

Value

An 'sf' data frame of indian map coordinates divided by the desired regions.

Examples

str(map_india())

df <- map_india(regions = "districts")

include_states <- map_india(include = c("WB", "NL", "AP"))

exclude_states <- map_india(exclude = c("WB", "NL", "AP"))

[Package mapindiatools version 1.0.1 Index]