Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#570 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, sql
Lĩnh vực
data

Hướng nghiên cứu

Bắt đầu với các truy vấn DuckDB được cung cấp trên 2026-07-22.0 places parquet release và kiểm tra cách addresses[1].region được tạo ra. So sánh các giá trị hiện có với các bản ghi region của division_area và xác định liệu việc chuẩn hóa hoặc việc gán dựa trên tọa độ có thuộc source pipeline hay không. Công việc được xem là hoàn tất khi các giá trị region của Türkiye luôn được xuất dưới dạng TR-xx, bao gồm cả các bản ghi hiện đang thiếu chúng, với các kết quả truy vấn được báo cáo cung cấp phần xác thực.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

external

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.

Ngôn ngữ chính
Python
Star
1.2k
Fork
48
Merge trung bình
10 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OvertureMaps/data

Tất cả issue của OvertureMaps/data

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.