Skip to contents

Downloads and caches a yearly (or the complete) Price Paid Data CSV from HM Land Registry. Returns the path to the cached file. Yearly files are typically 100-200 MB; the complete file (1995-present) is approximately 5.3 GB.

Usage

ukh_ppd_bulk(
  year = as.integer(format(Sys.Date(), "%Y")),
  full = FALSE,
  refresh = FALSE
)

Arguments

year

Integer. Year to download. Ignored when full = TRUE. Defaults to the current year.

full

Logical. If TRUE, download the complete file (pp-complete.csv, ~5.3 GB) instead of a single year. Default FALSE.

refresh

Logical. Re-download even if cached? Default FALSE.

Value

Character. The path to the cached CSV file.

Examples

# \donttest{
op <- options(ukhousing.cache_dir = tempdir())
path <- ukh_ppd_bulk(2025)
#>  Downloading pp-2025.csv from HM Land Registry...
options(op)
# }