Skip to content

Commit 6cf889e

Browse files
committed
docs: successors of abolished areas
1 parent 3ab610d commit 6cf889e

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,26 @@ Province(code='84', name_th='สุราษฎร์ธานี', name_en='Sur
5454
| `address(subdistrict_code)` | The subdistrict with its district and province, or `None` |
5555
| `by_postal_code(postal_code)` | The subdistricts that use a postal code |
5656
| `search(query, *, limit=10)` | Provinces, districts and subdistricts whose name has the query |
57-
| `DATA_VERSION` | The GeoThai/data release in this package, such as `'2026.10.20'` |
57+
| `DATA_VERSION` | The GeoThai/data release in this package, such as `'2026.10.22'` |
5858

5959
Every function takes codes as strings and returns a new list. The areas are frozen dataclasses, so you can use them as dictionary keys.
6060

6161
The areas that DOPA abolished have their own module:
6262

6363
```python
6464
>>> from geothai.abolished import abolished_areas
65-
>>> next(a for a in abolished_areas() if a.code == "100205").abolished_on
66-
'2006-01-01'
65+
>>> bang_na = next(a for a in abolished_areas() if a.code == "104701")
66+
>>> bang_na.abolished_on
67+
'2022-04-22'
68+
>>> bang_na.successors
69+
('104702', '104703')
70+
>>> bang_na.successors_basis
71+
'notice'
6772

6873
```
6974

75+
`successors` lists the codes that took an abolished area's place. `successors_basis` says how sure the link is: `"notice"` comes from a Royal Gazette notice, with the date and source in `successors_in_force` and `successors_source`. `"name"` is a match by Thai name for codes DOPA dropped in 2006, likely but not proven. When no successor is known, `successors` is empty.
76+
7077
## Types
7178

7279
```python

0 commit comments

Comments
 (0)