ph-locations
Library of locations in the Philippines
Usage
Install
# NPM npm install ph-locations # Yarn yarn add ph-locations
Import
Default (ISO 3166)
// CommonJSconst regions provinces citiesMunicipalities = ; // ES6;
PSGC
// CommonJSconst regions provinces citiesMunicipalities = psgc; // ES6;const regions provinces citiesMunicipalities = psgc;
ISO 3166 (same result as default)
// CommonJSconst regions provinces citiesMunicipalities = iso3166; // ES6;const regions provinces citiesMunicipalities = iso3166;
Sources
ISO 3166 & Wikipedia
Philippine Standard Geographic Code (PSGC)
- Regions
- Provinces
- Cities (e.g. Camarines Sur)
Notes regarding NCR:
PSGC does not assign NCR cities and municipalities under a province. Instead, they are classified under districts. Because of this, an unofficial pseudo-province called "Metro Manila" (code 130100000) was added and all cities and provinces of NCR are listed under this.
Automatic Checking
GitHub Actions (ISO 3166, PSGC) automatically run everyday to check if the data is updated. See the ISO 3166 and PSGC badges above.
Properties
Regions
Property | Description | ISO 3166 | PSGC |
---|---|---|---|
code | ISO 3166 or PSGC code | ✓ | ✓ |
name | English name | ✓ | ✓ |
nameTL | Tagalog name | ✓ | ✗ |
altName | Alternative name, often the roman number or acronym of the region | ✓ | ✓ |
Provinces
Property | Description | ISO 3166 | PSGC |
---|---|---|---|
code | ISO 3166 or PSGC code | ✓ | ✓ |
name | English name | ✓ | ✓ |
altName | Alternative name, often its former name | ✓ | ✓ |
nameTL | Tagalog name | ✓ | ✗ |
region | ISO 3166 or PSGC code of the province's region | ✓ | ✓ |
Cities and Municipalities
Property | Description | ISO 3166 | PSGC |
---|---|---|---|
code | PSGC code | ✗ | ✓ |
name | Name | ✓ | ✓ |
fullName | Complete name. For ISO 3166, all cities will have names end with "City". For PSGC, this will be the complete name as listed in the PSGC website. | ✓ | ✓ |
altName | Alternative name, often its former name | ✓ | ✓ |
province | ISO 3166 or PSGC code of the city's or municipality's province | ✓ | ✓ |
classification | Classification of the city or municipality (see below) | ✓ | ✓ |
isCapital | Is the city or municipality the capital of the province | ✓ | ✓ |
Classification
ISO 3166
Value | Description |
---|---|
Mun | Municipality |
CC | Component city |
ICC | Independent component city |
HUC | Highly urbanized city |
PSGC
Value | Description |
---|---|
MUNICIPALITY | Municipality |
CITY | City |
License
Licensed under MIT License