Library of locations in the Philippines (regions, provinces, and cities & municipalities).
This library automatically checks the sources, ensuring the data is always updated.
# NPM
npm install ph-locations
# Yarn
yarn add ph-locations
Default (ISO 3166)
// CommonJS
const {
regions,
provinces,
citiesMunicipalities,
} = require('ph-locations');
// ES6
import {
regions,
provinces,
citiesMunicipalities,
} from 'ph-locations';
PSGC
// CommonJS
const {
regions,
provinces,
citiesMunicipalities,
} = require('ph-locations').psgc;
// ES6
import { psgc } from 'ph-locations';
const {
regions,
provinces,
citiesMunicipalities,
} = psgc;
ISO 3166 (same result as default)
// CommonJS
const {
regions,
provinces,
citiesMunicipalities,
} = require('ph-locations').iso3166;
// ES6
import { iso3166 } from 'ph-locations';
const {
regions,
provinces,
citiesMunicipalities,
} = iso3166;
- 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.
GitHub Actions (ISO 3166, PSGC) automatically run everyday to check if the data is updated. See the ISO 3166 and PSGC badges above.
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 | ✓ | ✓ |
ISO 3166
{
"code": "PH-05",
"name": "Bicol",
"nameTL": "Rehiyon ng Bikol",
"altName": "V"
}
PSGC
{
"code": "050000000",
"name": "Bicol Region",
"altName": "Region V"
}
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 | ✓ | ✓ |
ISO 3166
{
"code": "PH-CAS",
"name": "Camarines Sur",
"altName": null,
"nameTL": "Timog Kamarines",
"region": "PH-05"
}
PSGC
{
"code": "051700000",
"name": "Camarines Sur",
"altName": null,
"region": "050000000"
}
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 | ✓ | ✓ |
ISO 3166
{
"name": "Naga",
"fullName": "Naga City",
"altName": null,
"province": "PH-CAS",
"classification": "ICC",
"isCapital": false
}
PSGC
{
"code": "051724000",
"name": "Naga City",
"fullName": "City Of Naga",
"altName": null,
"province": "051700000",
"classification": "CITY",
"isCapital": false
}
ISO 3166
Value | Description |
---|---|
Mun | Municipality |
CC | Component city |
ICC | Independent component city |
HUC | Highly urbanized city |
PSGC
Value | Description |
---|---|
MUNICIPALITY | Municipality |
CITY | City |
Licensed under MIT License