| at_level | R Documentation |
The village-level 2011 tables (census_2011_demographics(),
census_2011_workers(), census_2011_marginal_detail()) stack seven levels
from India down to ward, and three sectors. Summing without filtering counts
every population several times over. census_1981 stacks levels and sectors
the same way.
at_level(data, level = "district", sector = "total")
data |
A table with a |
level |
Geographic level, e.g. |
sector |
|
India, state, district, subdistrict and village are exact: each level sums to its parent for every numeric column, and rural + urban sums to total.
"town" and "ward" are not. The census files a municipality and that same
municipality plus its outgrowth as separate town rows, so the two overlap.
Summing towns to their subdistrict overcounts 325 subdistricts by 73,877,047
people in total; Bengaluru's BBMP (M Corp.) and BBMP (M Corp. + OG) each
carry 8,443,675. Ward rows differ from their town by 3,738,272 across 295
towns. Treat both as a lookup, not an additive slice.
data filtered to that level and sector.
census_1981 |>
at_level("state") |>
nrow()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.