Administrative Hierarchy
Overview
The Philippine administrative structure, from region down to barangay, and how the different city classes (HUC, ICC, component city) fit in.
Levels
The highlighted path shows how Tongmageng resolves: BARMM → Tawi-Tawi (province) → Sitangkai (municipality) → Tongmageng (barangay) — the same example used throughout the tutorials.
Level-by-level
Each level in the hierarchy is a distinct administrative unit with its own PSGC segment and governing body. The table below uses real bundled-data examples.
| Level | Administered by | Example (psgc_id) |
|---|---|---|
| Region | National government — top-level grouping of provinces/cities | Bangsamoro Autonomous Region In Muslim Mindanao (BARMM) 1900000000 |
| Province | Provincial government, under a region | Tawi-Tawi 1907000000 |
| Highly urbanized city (HUC) | Independent city government, chartered outside any province | City of Manila 1380600000 |
| Independent component city (ICC) | Independent city government (fewer than HUCs) — 6 exist | City of Isabela (Not a Province) 0990100000 |
| Component city | City government under a province | City of Lamitan 1900702000 |
| Municipality | Municipal government, under a province | Sitangkai 1907005000 |
| Sub-municipality | District-level division of a HUC | Binondo 1380602000 |
| Barangay | Smallest unit — a barangay council | Tongmageng 1907005010 |
| Special geographic area (SGA) | Special administrative unit, region-level | Special Geographic Area |
Every record in the package knows its full parent chain, so you rarely need to reason about levels yourself:
from barangay import Database
brgy = Database().barangays.lookup("1907005010")
for a in brgy.ancestors:
print(repr(a))
# <municipality: Sitangkai (1907005000)>
# <province: Tawi-Tawi (1907000000)>
# <region: ... (BARMM) (1900000000)>City distinctions
The Philippines has three city classes, and the difference trips up every newcomer: administrative independence from a province. HUCs and ICCs are chartered independently of any province and report directly to their region; component cities sit inside a province.
| Class | Reports to | Count | Example (psgc_id) |
|---|---|---|---|
| Highly urbanized city (HUC) | Region directly (no province) | many | City of Manila 1380600000, City of Lapu-Lapu 0731100000 |
| Independent component city (ICC) | Region directly (no province) | 6 | City of Isabela (Not a Province) 0990100000 |
| Component city | A province | many | City of Lamitan 1900702000 |
You can see this in the resolved hierarchy fields. A Manila barangay has province = None and highly_urbanized_city = 'City of Manila', whereas a Lamitan barangay has a populated province:
from barangay import Database
db = Database()
manila_brgy = db.barangays.lookup("1380602005") # Barangay 291, Binondo
lamitan_brgy = db.barangays.lookup("1900702001") # Arco, City of Lamitan
print(manila_brgy.province, "/", manila_brgy.highly_urbanized_city)
# None / City of Manila
print(lamitan_brgy.province, "/", lamitan_brgy.highly_urbanized_city)
# Basilan / NoneYou never need to special-case HUC vs ICC vs component city. .parent, .ancestors, and the nine resolved-name fields (.region, .province, .municipality, …) walk the real parent chain — which jumps straight from a Manila barangay to the HUC, skipping the (absent) province. See Hierarchy indicator (rphicmsgb) for how this is encoded compactly.