Skip to contents

Access UK housing data from official sources in R. House prices, individual property transactions, planning data, and rental price indices.

The UK has world-class housing data. It is also a mess.

The UK publishes some of the richest housing data anywhere in the world. Every residential transaction in England and Wales since 1995 is public. Planning applications, brownfield land registers, affordability ratios, rental price indices, and stamp duty receipts are all available at no cost, with long back-series, and at local authority resolution.

The catch is that this data is scattered across roughly ten institutions, each with its own format, access pattern, and quirks:

  • HM Land Registry publishes the UK House Price Index via a linked-data SPARQL endpoint plus a REST API, and Price Paid Data as multi-gigabyte bulk CSVs with no header row
  • planning.data.gov.uk (Digital Land) has a clean REST API with JSON and GeoJSON output
  • ONS publishes the Price Index of Private Rents as a monthly workbook (its Beta API copy stopped at January 2024), and affordability ratios only as Excel workbooks with multi-row headers
  • DLUHC publishes housing supply data as ODS live tables with hash-based URLs that change on every republication
  • HMRC publishes Stamp Duty Land Tax statistics as ODS/XLSX
  • VOA publishes private rental market data separately, also as ODS
  • Registers of Scotland and NI Land & Property Services hold equivalent data for those jurisdictions in different formats

ukhousing wraps the three stable API-based sources (Land Registry HPI, Land Registry Price Paid, planning.data.gov.uk) plus ONS PIPR rental prices, and exposes them through a consistent R interface. The flaky Excel/ODS scraping sources are deliberately out of scope: they change format too often to maintain reliably.

Installation

install.packages("ukhousing")

# Or install the development version from GitHub
# install.packages("devtools")
devtools::install_github("charlescoverdale/ukhousing")

Data sources covered

Source Coverage
HM Land Registry UK HPI (441+ regions) + Price Paid Data (28M+ transactions since 1995)
planning.data.gov.uk 100+ datasets: planning applications, brownfield land, local plans, listed buildings, conservation areas, flood risk zones
ONS Beta API Price Index of Private Rents (UK and regional, from January 2015)

All sources are free and need no registration. A SPARQL escape hatch (ukh_sparql()) is provided for queries the dedicated helpers don’t cover.

Quick start

library(ukhousing)

# UK average house prices, monthly
uk <- ukh_hpi("united-kingdom", from = "2020-01-01")
head(uk)
#>        date         region  hpi avg_price pct_change_monthly pct_change_annual
#>  2020-01-01 united-kingdom 81.9    213657                0.1               1.6
#>  2020-02-01 united-kingdom 81.4    212429               -0.6               1.3
#> ...

# All Westminster flats sold in 2024
wm <- ukh_ppd(2024, la = "Westminster", property_type = "flat")
head(wm)

House Price Index

# Compare prices across regions
prices <- ukh_hpi_compare(
  c("london", "manchester", "newcastle-upon-tyne"),
  measure = "avg_price",
  from = "2015-01-01"
)
plot(prices$date, prices$london, type = "l", ylim = range(prices[-1], na.rm = TRUE))
lines(prices$date, prices$manchester, col = "red")
lines(prices$date, prices$`newcastle-upon-tyne`, col = "blue")

Price Paid Data

The Land Registry publishes every residential property sale in England and Wales since 1995. The yearly file is about 150 MB and contains ~900,000 transactions.

# Detached houses sold in Manchester for over GBP 1m during 2024
manchester <- ukh_ppd(
  year = 2024,
  la = "Manchester",
  property_type = "detached"
)
manchester[manchester$price > 1e6, c("date", "postcode", "price", "street")]

# Monthly transaction counts nationally
summary <- ukh_ppd_summary(2024, by = "month")
plot(as.Date(paste0(summary$month, "-01")), summary$n, type = "l")

Functions

Land Registry

Function Description
ukh_hpi() UK HPI time series for a region
ukh_hpi_compare() One measure across multiple regions
ukh_transactions() Monthly transaction volumes (shortcut)
ukh_ppd() Individual property transactions
ukh_ppd_bulk() Download a bulk PPD CSV (yearly or complete)
ukh_ppd_summary() Aggregated PPD statistics
ukh_ppd_years() PPD across multiple years, row-bound
ukh_ppd_transaction() Look up a single transaction by ID
ukh_ppd_address() Look up transactions by postcode

Planning

Function Description
ukh_planning() Query planning entities (supports format = "sf")
ukh_planning_datasets() List available datasets

ONS

Function Description
ukh_pipr() Price Index of Private Rents and average rents (monthly, UK, regions and local authorities, by bedrooms or property type)

Advanced

Function Description
ukh_sparql() Raw SPARQL query against Land Registry or any SPARQL endpoint

Helpers

Function Description
ukh_regions() Region slug lookup
ukh_clear_cache() Empty the local cache
ukh_cache_info() Show cached files

Caching

Downloads are cached to tools::R_user_dir("ukhousing", "cache") by default. Subsequent calls are instant. The monthly series (ukh_hpi(), ukh_transactions(), ukh_pipr()) are fetched again once the cached copy is more than 7 days old, so new monthly releases come through; change this with options(ukhousing.cache_max_age = <days>). Price Paid bulk downloads are only re-fetched with refresh = TRUE. Override the location with options(ukhousing.cache_dir = "/path/to/dir"). Use ukh_clear_cache() to remove all cached files.

Data coverage

  • UK HPI: 441+ areas, from January 1995 (E&W), 2004 (Scotland), 2005 (Northern Ireland)
  • Price Paid Data: every residential sale in England and Wales since 1995 (~28 million records)
  • Planning: 100+ datasets covering the full England planning system
Package Description
ons UK Office for National Statistics data
hmrc HM Revenue and Customs data (Stamp Duty Land Tax)
boe Bank of England data (mortgage rates, lending)
obr Office for Budget Responsibility forecasts
inflateR Inflation adjustment for real-terms house prices
inflationkit Inflation analysis (housing component of CPI)
inequality Inequality and poverty measurement

Issues

Report bugs or request features at GitHub Issues.

Keywords

UK housing, land registry, price paid data, UK HPI, planning, brownfield land, MHCLG, housing data, house prices, property, real estate