Skip to contents

Uses a verified catalogue; latest means the latest verified vintage in the installed catalogue, not an unrecorded live change. Boundaries are BGC (20 m generalised, coast clipped). Region polygons cover England. Census hierarchy and current administrative lookups are attached with separate vintages.

Usage

sl_boundaries(
  type,
  vintage = "latest",
  dir = sl_cache_dir(),
  codes = NULL,
  lookups = TRUE
)

Arguments

type

One of lsoa21, msoa21, ward, lad, pfa, region.

vintage

A catalogue vintage (YYYY-MM), or latest.

dir

Explicit cache directory.

codes

Optional ONS codes to limit acquisition.

lookups

Fetch and attach the ONS lookup tables.

Value

An sf object with geography_code, geography_name, source metadata and lookups, or NULL with a message when the source is unavailable.

Examples

boundaries <- readRDS(system.file("extdata", "sample-boundaries.rds",
  package = "searchlight"
))
boundaries$lsoa21[1, "geography_code"]
#> Simple feature collection with 1 feature and 1 field
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -1.764669 ymin: 53.84234 xmax: -1.746633 ymax: 53.85079
#> Geodetic CRS:  WGS 84
#>   geography_code                       geometry
#> 1      E01010568 POLYGON ((-1.749345 53.8490...