https://github.com/pcofilada/psgc
🇵🇠Provides PSGC (Philippine Standard Geographic Code) data.
https://github.com/pcofilada/psgc
json philippines philippines-dataset
Last synced: 5 months ago
JSON representation
🇵🇠Provides PSGC (Philippine Standard Geographic Code) data.
- Host: GitHub
- URL: https://github.com/pcofilada/psgc
- Owner: pcofilada
- License: mit
- Created: 2018-04-09T14:17:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-11-17T16:33:34.000Z (over 2 years ago)
- Last Synced: 2025-10-17T23:31:07.292Z (8 months ago)
- Topics: json, philippines, philippines-dataset
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/psgc
- Size: 1.21 MB
- Stars: 32
- Watchers: 2
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Philippine Standard Geographic Code (PSGC)
Provides PSGC (Philippine Standard Geographic Code) data for your application.
[](https://sonarcloud.io/dashboard?id=pcofilada_psgc)



## Installation
PSGC is available via npm.
$ npm install --save psgc
Or you can use yarn.
$ yarn add psgc
## Usage
Import psgc into your app.
```js
import { regions, provinces, municipalities, barangays } from "psgc";
```
Use the methods `all`, `find`, or `filter` to get the data you need.
```js
regions.all(); // To get all regions
regions.find("Ilocos Region"); // To get a specific region, pass the exact region name
regions.filter("loco"); // To get a list of all regions with names that contain the argument; case-insensitive
provinces.all();
provinces.find("La Union");
regions.filter("la u");
municipalities.all();
municipalities.find("Agoo");
municipalities.filter("agoo");
barangays.all();
barangays.find("San Nicolas East");
barangays.filter("san nico");
```
## TODO
- Add and update additional information about regions, provinces, municipalities and barangays
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Credits
- [PSA Website](http://psa.gov.ph/)
- [darklight721/philippines](https://github.com/darklight721/philippines)