Philippine Standard Geographic Code (PSGC) Guide
A comprehensive guide to the official coding system used to classify Philippine administrative divisions, census data, and GIS boundaries.
What is the PSGC?
The Philippine Standard Geographic Code (PSGC) is a systematic coding system created and maintained by the Philippine Statistics Authority (PSA). It serves as the official national standard for classifying all geographic administrative units in the Philippines—from macro-regions down to individual barangays.
For developers, researchers, and spatial data analysts, the PSGC is the essential join key that connects tabular data (such as census demographics, health statistics, or electoral results) directly to cartographic shapefiles and GeoJSON vector maps.
PSGC Code Structure & Digit Breakdown
Standard PSGC identifiers exist in 9-digit (legacy) and 10-digit (modern expanded) numeric formats. The digits represent a strict hierarchical nesting:
13 for NCR, 03 for Central Luzon, 07 for Central Visayas).000 indicates the code represents the city or municipality as a whole.Philippine Administrative Levels Summary
The Philippine political architecture is organized into distinct tiers governed by the Local Government Code (Republic Act No. 7160):
1. Region (Rehiyon)
Administrative groupings of provinces established for regional planning (e.g., Region III, Region IV-A). The Philippines contains 17 regions, including autonomous regions like BARMM.
2. Province (Probinsya)
Primary political corporate bodies consisting of component cities and municipalities. Governed by elected Provincial Governors and Sangguniang Panlalawigan boards.
3. Cities & Municipalities
Local Government Units (LGUs) containing clusters of barangays. Cities are categorized into Highly Urbanized Cities (HUCs), Independent Component Cities (ICCs), and Component Cities.
4. Barangay
The fundamental political unit of Philippine society. Over 42,000 barangays serve as the primary grassroots planning and administrative body.
Special Administrative & Boundary Edge Cases
When working with PSGC datasets, developers must account for several unique administrative structures in the Philippines:
- National Capital Region (NCR / Metro Manila): NCR does not contain any provinces. Instead, its 16 cities and 1 municipality are organized into 4 Non-Government Administrative Districts (e.g., Manila, Eastern District, Northern District, Southern District).
- Highly Urbanized Cities (HUCs): Cities like Cebu City, Davao City, and Quezon City are legally and financially independent of their geographical provinces. In PSGC, they are assigned dedicated 4-digit province-level prefix blocks.
- BARMM Special Geographic Area (SGA): 63 barangays in North Cotabato voted to join BARMM in 2019. In 2024, these barangays were formally organized into 8 new municipalities (Pawa, Kadayangan, Nabalawag, etc.), updating their PSGC codes.
- Disputed Boundaries: Areas under territorial jurisdiction disputes (such as certain border barangays between Taguig and Makati) require careful spatial verification when matching historical census logs with current administrative geometry.
Developer Guide: Parsing & Querying PSGC Codes
Here is how you can parse a standard 9-digit PSGC string in JavaScript or TypeScript to extract geographic hierarchy attributes:
interface PsgcHierarchy {
rawCode: string;
regionCode: string;
provinceCode: string;
cityMuniCode: string;
barangayCode: string;
isBarangayLevel: boolean;
}
/**
* Parses a 9-digit PSGC code into administrative hierarchy segments.
* @param psgc 9-digit PSGC string (e.g., "045618000")
*/
function parsePsgc(psgc: string): PsgcHierarchy {
const cleanCode = psgc.padStart(9, '0');
return {
rawCode: cleanCode,
regionCode: cleanCode.substring(0, 2),
provinceCode: cleanCode.substring(0, 4),
cityMuniCode: cleanCode.substring(0, 6),
barangayCode: cleanCode.substring(6, 9),
isBarangayLevel: cleanCode.substring(6, 9) !== '000'
};
}
// Example Usage:
const info = parsePsgc("045618000");
console.log("Region Prefix:", info.regionCode); // Output: "04"
console.log("Province Prefix:", info.provinceCode); // Output: "0456"
console.log("Is Barangay Level:", info.isBarangayLevel); // Output: false