Support for ISO 3166-2 subdivision codes is incomplete
Maintainers usually reply within 1 day
@stepps00 is already working on this.
Since Feb 5, 2026.
Assessment
This issue has not been assessed yet.
Description
I've run into a downstream problem in wkls where the Overture divisions dataset can be queried in a user-friendly way using the ISO 3166-1 and 3166-2 codes for countries and their subdivisions, but querying a valid ISO 3166 code can return zero results. The main issue appears to be that complex subdivision structures aren't represented correctly in the dataset.
For example, Puerto Rico has its own ISO 3166-1 country code PR, but as a territory of the United States it is also assigned the ISO 3166-2 subdivision code US-PR. The divisions dataset currently has country as PR and region as NULL.
This script compares the Overture dataset with the curated lists in the iso3166_2 package:
Overture has 272 countries and 3544 regions
iso3166_2 has 250 countries and 5049 subdivisions
2 countries in ISO 3166 not in Overture: ['EH', 'PS']
24 countries in Overture not in ISO 3166: ['CP', 'XA', 'XB', 'XC', 'XD', 'XE', 'XG', 'XH', 'XI', 'XJ', 'XL', 'XM', 'XN', 'XO', 'XP', 'XQ', 'XR', 'XS', 'XT', 'XU', 'XW', 'XX', 'XY', 'XZ']
1514 subdivisions in ISO 3166 not in Overture: ['AG-03', 'AG-04', 'AG-05', 'AG-06', 'AG-07', ...]
9 regions in Overture not in ISO 3166: ['ET-SE', 'LY-SU', 'NO-31', 'NO-32', 'NO-33', 'NO-39', 'NO-40', 'NO-55', 'NO-56']
I'm not too worried about the couple dozen mismatched country codes and the nine extra regions in Overture -- these are likely edge cases that can be addressed if there's interest.
However, the 1,514 subdivision codes missing from the Overture dataset's region attribute need to be queryable somehow. This affects about 50 countries, and any downstream geocoding based on ISO 3166-2 codes won't work as expected.
- Dominant language
- Python
- Stars
- 219
- Forks
- 20
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 37
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OvertureMaps/schema
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OvertureMaps/schema#867 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
OvertureMaps/schema#694 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OvertureMaps/schema#693 ·
Maintainers usually reply within 1 day
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
OvertureMaps/schema#675 ·
Maintainers usually reply within 1 day
-
[BUG](ci) `main` fails `make check` on unused `type: ignore` commentsPossibly taken @sethfitz claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
OvertureMaps/schema#899 ·
Maintainers usually reply within 1 day
All issues in OvertureMaps/schema
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
needs-triage type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
pollen-robotics/reachy_mini_conversation_app#631 ·
Maintainers usually reply within 7 days
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100