Skip to contents

Convenience wrapper that calls ukh_ppd() for each year in a vector and row-binds the results. Caches each year independently.

Usage

ukh_ppd_years(years, ...)

Arguments

years

Integer vector. Years to fetch.

...

Additional arguments passed to ukh_ppd() (e.g. la, postcode, property_type).

Value

A single data frame combining transactions from all requested years.

Examples

# \donttest{
op <- options(ukhousing.cache_dir = tempdir())
try({
  five_year <- ukh_ppd_years(2020:2024, la = "Westminster",
                             property_type = "flat")
  nrow(five_year)
})
#> ℹ Downloading pp-2020.csv from HM Land Registry...
#> ℹ Downloading pp-2021.csv from HM Land Registry...
#> ℹ Downloading pp-2022.csv from HM Land Registry...
#> ℹ Downloading pp-2023.csv from HM Land Registry...
#> ℹ Loading pp-2024.csv from cache.
#> [1] 13833
options(op)
# }