When an address looks almost right but points to the wrong place

Address matching often begins with a messy string and ends with a Unique Property Reference Number: the identifier for a particular property. The difficult cases are not always dramatic spelling mistakes. Sometimes a small change makes an address describe a different flat, house or building.

There are amazing progress in the UK address matching space, such as the UK_Address_matcher. But a consistent bottleneck I hear people discuss was the lack of realistic, messy address for large-scale linkage methods comparison & evaluation.

That is why I have released address-errors, an open Python package for generating realistic UK address-recording errors with known answers.

A few examples

Consider an address such as:

2ND FLOOR FLAT 14 CHESTNUT AVENUE

If the flat or floor information is dropped, the result may become the address of the parent building rather than the individual dwelling.

A number change can have a similar effect:

193 Hamilton Street
193B Hamilton Street

These may be different properties, even though the edit is only one character.

There are the kinds of mistakes that can cause an address matcher to link a record to the wrong property. They are easy to miss because the resulting address often looks perfectly plausible.

Learning the patterns

The package was developed by comparing council tax address records with canonical address data for the same UPRNs. The differences were classified into named mechanisms, including sub-unit errors, building-name changes, number changes, formatting changes, postcode errors and label drift.

The generator then applies these mechanisms to clean address components. Each output includes an audit table showing what happened and what the correct answer should be. That makes it possible to test an address matcher on realistic errors rather than on generic random noise.

A taxonomy of address errors

The package describes 59 named mechanisms grouped into 11 families: The important distinction is that some families alter presentation while others can change which property the address describes.

  • Sub-unit (SU): errors in flats, rooms, units or floor information.
  • Building name (BN): adding, dropping or changing a building name.
  • Primary number (PN): changes to the main house or property number.
  • Descriptive qualifier (DQ): changes to words such as “rear”, “annexe” or “former”.
  • Street (ST): changes to the street name or street description.
  • Locality (LO): changes to neighbourhood, village or locality information.
  • Text edits (TX): spelling changes, dropped words, abbreviations and similar edits.
  • Format (FM): changes to punctuation, spacing, case or the order of address components.
  • Postcode (PC): postcode recording or transcription errors.
  • Label drift (LB): the address string is plausible, but the attached UPRN belongs to another related property.
  • Systemic (SY): errors caused by the recording system, such as truncating an address at a fixed character limit.

What transferred, and what did not?

The evaluation produced encouraging but qualified results. For an unseen urban council with similar characteristics, the generator reproduced:

  • the broad volume of address errors;
  • the mix of error mechanisms;
  • the rate of collisions with other real properties.

Error volume across leave-one-council-out checks.

Collisions occur when a recorded address matches another real property.

The result was different for councils at the edges of the development data. A rural council had roughly twice the error volume produced by the pooled setting, while a low-error council had substantially less. Overall intensity therefore needs to be calibrated to the source. Recording style also matters. Commas, field separators, wording and component order can reveal which system produced an address. These features need to be fitted from the same address field that the matcher will use.

What the package provides

The generator produces recorded-style addresses from clean address components. Every output includes a truth table showing:

  • the property the address came from;
  • the UPRN carried by the record;
  • the error mechanisms applied;
  • whether the property identity shifted;
  • whether the result collides with another real address.

This gives researchers and developers a controlled way to test address-to-UPRN matchers, including difficult cases involving flats, buildings, rural properties and neighbouring addresses.

The package is available on PyPI and GitHub.

A paper describing the method and evaluation is in preparation. It will set out the results, limitations and the cases where the learned profile did not transfer well!

Conference Thoughts & Reflections

It’s been a whopping 2.5 weeks of conferences, presentations, exploration and learning in September for me. Kicking off at the Royal Statistical Society International Conference (RSS) in early September (2 presentations), to a week at Institute of Health Metrics and Evaluation (IHME, University of Washington, Seattle) (2 invited lectures), followed by a week-long conferences and workshops at the International Population Data Linkage Network Conference (IPDLN) at Chicago (1 poster, 2 presentations). Lots of “firsts” this month, and this is a blog to organise my thoughts and experiences!

RSS – 4-5th September

Presenting at RSS, article will be out in November 2024 Edition of Significance!

My first ever RSS conference and I wish I had learned about it sooner! The conference is a great mix of statistical theory, methods and applied research, and an international representation with >700 attendees from academia, media, and people from government statistics. A flurry of exceptional talks and keynotes started with Tim Harford, reaffirming that it is key to reject the notion that “Stats can tell you anything” because it becomes synonymous to “Stats can tell you nothing” – undermining the confidence of the public (and sometimes our own!) towards statistics. Pivotal to my theoretical thinking & development is Erica Thompson’s talk and book “Escape from Model Land”, encapsulating the need for modellers to make use of their expert knowledge in their interpretation of statistical models, and take accountability, instead of pretending there is strong objectivity in research. My talk as the winner of the RSS Early Career Writing Competition was well received, with several follow-up chats and emails. It’s another imposter syndrome moment – who am I to give a talk to these brilliant and renowned statisticians!? People I met at the conference were kind and open to conversations, and I felt very welcomed from start to finish. Statisticians are a special group of people!

IHME – Seattle, University of Washington

“Stay open to new data and be prepared to keep freshening up your knowledge”
Hans Rosling, IHME

First few steps into the building and was greeted with Hans Rosling’s quote “Stay open to new data and be prepared to keep freshening up your knowledge.” Another humbling experience giving a 1-hour seminar, titled: The Road to Racial Health Equity Starts with Data Equity, Transparency and Clarity, with a strong 80+ audience online, and 10 in the room. Again I fell into my typical long-winded mode and couldn’t finish all of my slides, but it is re-assuring knowing that what I have been working on in the last 2 years can be meaningful and impactful to how researchers approaches racial and ethnic health inequalities. The dynamics at IHME is always upbeat with biweekly goal settings and meetings. As a PhD student, my research is sometimes a bit isolated from the rest of the group. It is quite nice to re-immerse in a team-based research process for a bit! I was ecstatic to visit the paediatric residents on the Health Equity Track at Seattle Children Hospital, had great conversations about quantitative and qualitative approaches to improving health equity. Also inspired my initiative to share our stories!

Conversation with Paediatrics Residents on the Health Equity Track, Seattle Children Hospital

IPDLN 2024, Chicago

Chicago – it’s been over a decade since I last visited and it is ever-stunning. IPDLN Edinburgh was my first conference as part of my PhD, I was 3 months in, and was properly amazed by the breadth and depth of topics discussed then. I hoped I could one day have an opinion, have something valuable to add to this community – and I did! With new friends I met at IHME, I was invited to help out at a pre-conference workshop, presented a poster with international collaborators (and meeting some for the first time in person!), and gave 2 different presentations. I am so glad to have met people across UK, US, AUS, NZ and beyond, working in inter-related areas on record linkage. Incredible workshop on data visualisation by Rowena from Wales, and again featuring Hans Rosling on his BBC visualisation on life expectancy! His legacy is felt deeply in this trip, and every time we hear from colleagues working with Swedish data! I look forward to keep being a part of this evolving community!

L to R: Peter Christen, Rainer Schnell, Joseph Lam;
Presenting work led by Sumayya Ziyad who cannot make it to Chicago this time.

Having Fun

I have yet to talk about the entertainment and cultural exchange bit 🙂 Seattle and Chicago has treated me well, from Space Needle to the Bean, from underground walk to architectural boat trip, from jazz club to blues bar, from Burke Museum to Second City, from Seahawks to the Cubs! This will be undoubtedly a fond memory when I finish my PhD – final stretch, now back to work!

詩篇15篇 - Seek Ye First

Wrote, Recorded and Produced a song 🙂 Psalm 15

Listen Here 🙂

寫作靈感:
這首歌靈感來自上週詩篇經課-詩篇15篇。詩篇15篇是「進殿詩」,以提醒來到聖殿敬拜的人,在日常行為上應追求的標準。第一節為進殿者的求告,二到五節為大衛的答覆。以果實辨認植物,大衛的所提出的不是單要殿中敬虔的摸樣,更要在聖殿以外行合乎信仰,出於信心和愛心的事。

作曲上,嘗試保留詩中對答的架構,分別開進殿者的提問 (Chorus) 和詩人的回答。 Verse 沿用了 Pachelbel’s Canon,對應耳熟能詳的《先求祂的國》。大衛所列信徒應有的表徵,是追求神國和義的表現,也是預備敬拜時應有的心境。

Inspiration:
The inspiration came from the Psalm reading from last Sunday – Psalm 15. Psalm 15 was sung (yup, not read) as people come to the church to worship. It reminds them the standards of moral and behavioural standards people should strive for in their daily lives. The first Verse is a petitions of those who came to the place of worship, and the rest of the psalm is a response from David. Identifying the crops by their fruit, David’s proposed that Christians were not only to be godly at church, but to act accordance with their faith in their daily lives.

The composition tries to retain the question (Chorus) & answer (Verse) structure of the poem. I used the well-known Pechelbel’s Canon for the verse, echoing to the well-known song 《Seek Ye First》. This reiterates David’s point that the behaviours of the believers reflects their pursue of God’s kingdom and justice, and prepares the appropriate mindset for worship.

詩篇15篇 – Seek Ye First

(Chorus 1)
耶和華啊, 誰能住在 你的 帳幕 (Lord, who may dwell in your sanctuary?)
耶和華啊,誰能住在 你的 聖山 (Lord, who may live on your holy hill?)
我們如何 手潔心清 到你 座前 (How do we come before you with clean hands and a pure heart?)
你的詩篇 告訴我 (Your Psalms tells me how)

(Verse)
不說閒話讒謗, 不惡待朋友 (Speak no slander on his tongues, Do his neighbour no wrong)
行事正直公義,說實話的人 (Do what is righteous and blameless, speaks the truth from his heart)
不放債取利,不受賄賂害無辜 (Do not lend without usury, do not accept a bribe against the innocent)
敬畏耶和華的人 (Honour those who fear the Lord)

(Chorus 2)
耶和華啊, 誰能住在 你的 帳幕 (Lord, who may dwell in your sanctuary?)
耶和華啊,誰能住在 你的 聖山 (Lord, who may live on your holy hill?)
你為我在 敵人面前 擺設 筵席 (You prepare a table before me in the presence of my enemies)
你是我們的 救主 (You are our saviour)

(Bridge)
看各人比自己更強 (value others above yourselves)
自卑的,必升為高 (he who humbles himself shall be exalted)
放下自傲 與弟兄和好 (drop your arrogance and reconcile with your brothers)
行這些事的 - 必不動搖 (He who does these things will never be shaken)

詩篇15篇

 大 衛 的 詩 。 

1 耶 和 華 啊 , 誰 能 寄 居 你 的 帳 幕 ? 誰 能 住 在 你 的 聖 山 ?
2 就 是 行 為 正 直 、 做 事 公 義 、 心 裡 說 實 話 的 人 。
3 他 不 以 舌 頭 讒 謗 人 , 不 惡 待 朋 友 , 也 不 隨 夥 毀 謗 鄰 里 。
4 他 眼 中 藐 視 匪 類 , 卻 尊 重 那 敬 畏 耶 和 華 的 人 。 他 發 了 誓 , 雖 然 自 己 吃 虧 也 不 更 改 。
5 他 不 放 債 取 利 , 不 受 賄 賂 以 害 無 辜 。 行 這 些 事 的 人 必 永 不 動 搖 。

其他參考經文
利未記25:35-46
詩篇23:5
腓立比書2:3
馬太福音23:12
馬太福音5:24
馬太福音6:33