1.1.3 • Published 4 years ago

ph-locations v1.1.3

Weekly downloads
10
License
MIT
Repository
github
Last release
4 years ago

ph-locations

NPM version CI ISO 3166 PSGC License: MIT

Library of locations in the Philippines

Usage

Install

# NPM
npm install ph-locations

# Yarn
yarn add ph-locations

Import

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;

Sources

ISO 3166 & Wikipedia

Philippine Standard Geographic Code (PSGC)

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

PropertyDescriptionISO 3166PSGC
codeISO 3166 or PSGC code
nameEnglish name
nameTLTagalog name
altNameAlternative name, often the roman number or acronym of the region

Provinces

PropertyDescriptionISO 3166PSGC
codeISO 3166 or PSGC code
nameEnglish name
altNameAlternative name, often its former name
nameTLTagalog name
regionISO 3166 or PSGC code of the province's region

Cities and Municipalities

PropertyDescriptionISO 3166PSGC
codePSGC code
nameName
fullNameComplete 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.
altNameAlternative name, often its former name
provinceISO 3166 or PSGC code of the city's or municipality's province
classificationClassification of the city or municipality (see below)
isCapitalIs the city or municipality the capital of the province

Classification

ISO 3166

ValueDescription
MunMunicipality
CCComponent city
ICCIndependent component city
HUCHighly urbanized city

PSGC

ValueDescription
MUNICIPALITYMunicipality
CITYCity

License

Licensed under MIT License