Skip to contents

Download ONS boundaries (with caching)

Usage

ons_get_boundaries(
  area_type = c("lad", "ctyua", "msoa", "pcon"),
  resolution = c("BUC", "BSC", "BGC"),
  nations = c(E = TRUE, N = FALSE, S = FALSE, W = FALSE),
  quiet = TRUE,
  use_cache = TRUE,
  cache_max_age_days = 30
)

Arguments

area_type

'lad','ctyua','msoa','pcon'

resolution

'BUC','BSC','BGC' (optionally 'BFC','BFE' if enabled)

nations

named logical vector for nation prefixes (E/N/S/W)

quiet

logical; if FALSE prints the fetch URL (URL printed only when quiet = FALSE)

use_cache

logical; if TRUE cache results on disk and reuse across sessions

cache_max_age_days

numeric; max age before re-downloading (Inf = never expire)

Value

sf object