get_census: Get India census data

View source: R/get_census.R

get_censusR Documentation

Get India census data

Description

Census data for India at state, district, or subdistrict level.

Usage

get_census(
  year,
  geography = c("state", "district", "subdistrict"),
  variables = NULL,
  state = NULL,
  geometry = FALSE,
  sector = c("total", "rural", "urban")
)

Arguments

year

Census year. One of: 1901, 1911, 1921, 1931, 1941, 1951, 1961, 1971, 1981, 1991, 2001, 2011.

geography

Geographic level: "state", "district", or "subdistrict". Not all geographies are available for all years.

variables

Character vector of variables to retrieve. Use list_census_variables() to see available variables. If NULL (default), returns all available variables for the specified year and geography.

state

Optional. Filter to specific state(s). Can be state name or abbreviation (e.g., "Maharashtra" or "MH").

geometry

If TRUE, returns an sf object with geographic boundaries.

sector

For 1971/1981, filter to "total", "rural", or "urban".

Value

A tibble (or sf object if geometry = TRUE).

Examples

get_census(2011, "state")
get_census(1971, "district", state = "Maharashtra")
get_census(1981, "district", variables = c("population", "literacy_rate"), geometry = TRUE)


censusindia documentation built on Oct. 15, 2026, 5:08 p.m.