OvertureMaps / OvertureMaps/data

[Places][2026-07-22.0] addresses[].region is null on 92.3% of Türkiye records and inconsistent on the rest

Open
#570 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
47
Avg merge
3h 42m
Merged PRs (30d)
1

Description

Summary

For places in Türkiye, addresses[1].region cannot be used to answer "which province is this place in". It is null on 92.3% of records, and where present it mixes plate codes, province names in several casings, the country name and a handful of ISO codes. We ended up assigning province by point-in-polygon against division_area instead, which works, but most consumers will reach for the address field first.

Release and scope

  • Release: 2026-07-22.0, theme places, type place
  • Filter: bounding box xmin 25.5..45.0, ymin 35.7..42.3 and addresses[1].country = 'TR'
  • Records: 1,786,685

Numbers

Measure Count Share
addresses[1].region IS NULL 1,649,580 92.3%
region in ISO 3166-2 form (TR-xx) 31 0.002%
region present, any form 137,105 7.7%

The 25 most frequent non-null values, which show the mix of conventions:

('07', 12244)        plate code, Antalya
('06', 11307)        plate code, Ankara
('İstanbul', 10649)
('16', 8462)         plate code, Bursa
('42', 5476)         plate code, Konya
('01', 4558)
('41', 4299)
('09', 4251)
('Ankara', 4129)
('Türkiye', 3852)    the country, not a region
('İzmir', 3665)
('20', 3110)
('İSTANBUL', 2822)
('Istanbul', 2657)
('Bursa', 2362)
('Antalya', 2352)
('34', 2142)         plate code, İstanbul
('Konya', 1490)
('Muğla', 1214)
('Kocaeli', 1207)
('İZMİR', 917)
('ANKARA', 910)
('Adana', 910)
('Mersin', 880)
('Gaziantep', 758)

So İstanbul alone appears as İstanbul, İSTANBUL, Istanbul and 34, and Antalya as Antalya and 07.

Reproduce

INSTALL httpfs; LOAD httpfs; SET s3_region='us-west-2';
SELECT
  count(*) AS total,
  count(*) FILTER (WHERE addresses[1].region IS NULL) AS region_null,
  count(*) FILTER (WHERE addresses[1].region LIKE 'TR-%') AS region_iso
FROM read_parquet('s3://overturemaps-us-west-2/release/2026-07-22.0/theme=places/type=place/*', hive_partitioning=1)
WHERE bbox.xmin BETWEEN 25.5 AND 45.0 AND bbox.ymin BETWEEN 35.7 AND 42.3
  AND addresses[1].country = 'TR';

SELECT addresses[1].region AS region, count(*) c
FROM read_parquet('s3://overturemaps-us-west-2/release/2026-07-22.0/theme=places/type=place/*', hive_partitioning=1)
WHERE bbox.xmin BETWEEN 25.5 AND 45.0 AND bbox.ymin BETWEEN 35.7 AND 42.3
  AND addresses[1].country = 'TR' AND addresses[1].region IS NOT NULL
GROUP BY 1 ORDER BY c DESC LIMIT 25;

What would help

The schema documents region as the ISO 3166-2 subdivision code, which for Türkiye maps 1:1 to the two-digit plate code (TR-34 = İstanbul = plate 34). Normalising the values that are already there (plate code or province name in any casing) to TR-xx would recover a usable field for the 7.7%, and if the source pipeline can derive it from coordinates the way consumers have to today, the 92.3% too.

Workaround we use, in case it helps others: division_area with subtype = 'region', country = 'TR' and class = 'land' gives exactly the 81 provinces; a per-province ST_Within loop over a locally materialised extract assigns every record. Notes on that, including why the join has to be done locally rather than against S3, are written up here: https://pinlyx.com/research/turkey-business-digital-report

Related: a second, separate observation about listed versus reachable websites values will follow as its own issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied DuckDB queries against the 2026-07-22.0 places parquet release and inspect how addresses[1].region is produced. Compare the existing values with the division_area region records and determine whether normalization or coordinate-derived assignment belongs in the source pipeline. Done means Türkiye region values are consistently emitted as TR-xx, including records currently missing them, with the reported query results providing validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.