Fetches TS021 (NM_2041_1), with exact codes verified against returned cells. Supply ONS codes or an sf boundary object. Current ward and LAD boundaries must not be silently matched to Census 2021 units: unchanged codes alone do not demonstrate unchanged boundaries. A new exposure source must be supplied for changed units. Census disclosure control may cause small inconsistencies between separately published tables. Unknown is retained with NA exposure.
Usage
sl_population(geography, classification = c("5", "19"), dir = sl_cache_dir())See also
sl_exposure(), sl_population_crosstab()
Other ingest:
sl_archive_download(),
sl_archive_index(),
sl_archive_snapshot(),
sl_assign_geography(),
sl_boundaries(),
sl_cache_clear(),
sl_cache_dir(),
sl_contract(),
sl_exposure(),
sl_list_versions(),
sl_population_crosstab(),
sl_read_records(),
sl_sample(),
sl_select_version()
Examples
p <- readRDS(system.file("extdata", "sample-population.rds",
package = "searchlight"
))
head(p$msoa21)
#> # A tibble: 6 × 3
#> geography_code ethnicity population
#> <chr> <chr> <dbl>
#> 1 E02002183 Asian 57
#> 2 E02002183 Black 17
#> 3 E02002183 Mixed 65
#> 4 E02002183 Other 5
#> 5 E02002183 White 5558
#> 6 E02002184 Asian 219