Revisiting an 8-Year-Old Cyprus Street Names Script
Back in late 2018, I wrote a small Ruby script to parse public postal code records from the Cyprus Open Data Portal and count the most common street names across the island. It was a weekend exploration. Once the tables were published, I barely touched the code again.
Eight years later, I decided to re-run that analysis against the latest official Cyprus Post postal codes workbook for the 2018 vs. 2026 street names update. The dataset had grown from 29,591 records to 34,416, and comparing the two snapshots side by side immediately exposed bugs that had been sitting quietly in the original output since 2018. You can also search the full normalized dataset directly in the Cyprus Street Names Explorer.
The Bug That Stayed Quiet
When you group street names across municipalities, you have to strip road-type prefixes like Leoforos, Dromos, Plateia, or Parodos, along with trailing section numbers from 1 to 4 so Grigoriou Afxentiou 1 and Grigoriou Afxentiou count as the same street.
In the 2018 script, the rule for removing section numbers stripped "1" anywhere in the string. For most streets in Cyprus, that worked fine. For 1 Apriliou, a very common street name commemorating the start of the EOKA campaign, it quietly turned the name into Apriliou at position #14.
Nothing crashed. The total row count still summed to 29,591, so the table looked plausible at a glance while the meaning of a row shifted underneath. Data normalization bugs are easy to miss like that because the pipeline stays green. Changing that rule to strip only trailing section numbers fixed 1 Apriliou across both the 2018 baseline and the 2026 directory.
String Cleanup vs. Longitudinal Pipeline
Data Engineering34,416 Street Rows Across Two Snapshots
Comparing 2018 and 2026 requires identical normalization rules and explicit handling for official spelling changes.
Global regexes • Raw string grouping • Unchecked deltas
- Date Prefixes: Removing
"1"globally turns1 ApriliouintoApriliou - Spelling Updates:
Agias MarinasandAgias Marinissplit into two rows - Fake Deltas: A spelling change looks like a sudden disappearance
Anchored regexes • Canonical maps • Edge-case assertions
- Trailing Only: Strip section numbers only at the end of the string
- Explicit Aliases: Map known transliteration updates to one shared name
- Regression Cases: Pin
1 Apriliouand spelling pairs in unit checks
Transliteration Drift Over Eight Years
Even with clean regexes, raw GROUP BY breaks when an official agency updates its Latin transliteration conventions. Between 2018 and 2026, Cyprus Post changed two Top 100 spellings in the English street sheet (Δρόμοι ΕΛ_Streets ENG):
Agias Marinas(98 occurrences in 2018) becameAgias Marinis(112 occurrences in 2026).Charalampou Mouskou(70 occurrences in 2018) becameCharalampous Mouskou(76 occurrences in 2026).
Without an explicit alias map, a longitudinal diff treats Agias Marinas as disappearing completely. Meanwhile, Agias Marinis shows up as a brand new street name with +112 entries. Mapping known official updates to a single shared name keeps the 8-year delta honest. It is a small dictionary in Git, and it avoids fuzzy string matching that might accidentally merge two genuinely different names.
Unicode normalization sits in the same bucket. Mixed accents and inconsistent apostrophes in titles like Archiepiskopou Makariou C' create phantom duplicates unless you normalize text consistently before grouping.
Classifying 34,416 Rows Without Burning Tokens
Once the 8,609 unique street names were clean, I wanted to group them into cultural and historical themes across the island. Sending a CSV of 8,609 names to an LLM for JSON categories is tempting today, though it adds cost and non-determinism for a public reference table. Re-running the script next year could easily shift a borderline name into another bucket. The diff gets noisy fast.
Instead, a layered deterministic approach handled the dataset cleanly. Curated mappings cover the top ~275 street names, which carry most of the total row volume and deserve manual precision. From there, simple prefix and dictionary rules catch Greek Orthodox saints (Agiou, Agias, Apostolou, Archangelou), Europe capitals, and Nature & Flora terms, while a lookup against the official Κοινότητες_Communities sheet classifies Cypriot village names automatically.
That left 39.1% of the 2026 records (5,479 unique names) in Other Local Toponyms & Unclassified. Most of those are single-word rural micro-toponyms and dialectal names. Accepting that unclassified long tail is better than forcing fragile rules or paying for guesses, because when someone asks why 1 Apriliou sits under EOKA (1955-1959) while Archiepiskopou Makariou C' sits under Modern Politics, the answer is right there in a plain mapping file.
Keeping the Next Run Honest
Whenever you clean up a dataset like this, it helps to leave behind a few small regression checks covering the exact edge cases that bit you. Test that 1 Apriliou keeps its 1, and that Agias Marinas and Agias Marinis resolve together. Also check that trailing section numbers strip cleanly without touching dates like 25 Martiou or 28 Oktovriou.
It is not worth building heavy infrastructure for a workbook that updates slowly. A small, deterministic script with a handful of edge-case checks gives you repeatable numbers you can actually explain.
Open Trade-Off
When you classify a messy real-world dataset, where do you stop adding deterministic rules and accept an “Unclassified” bucket, versus bringing in fuzzy matching or an LLM for the remaining long tail?
Dealing with messy public datasets or silent normalization bugs?
Let's grab a coffee and talk about deterministic data pipelines, regression checks, and knowing when simple rules are enough.
Grab a CoffeeTransparency Disclosure: In compliance with transparency guidelines for AI-assisted content under EU policy, please note that this article was co-authored by Savvas Alexandrou and Gemini 4 Hydrogen.
