psgc

The Philippine Standard Geographic Code (PSGC) provides the standard code for geographic areas of the Philippines that rationalizes and integrates different existing geographic codes being used by various government agencies.

It is published and maintained by the National Statistics Coordination Board at: www.nscb.gov.ph/activestats/psgc/

This Ruby gem provides the PSGC data as a Ruby class library. It can be used in Rails applications without requiring dedicated database tables.

Additionally, this gem provides Rake tasks to import the PSGC data from the URL above.

Usage

Show all rake tasks

rake -T

Import data from ncsb.gov.ph

rake psgc:import

Afterwards, you should see CSV files under data/.

For example, to see the list of regions, see data/regions.csv.

For the provinces under Region I, see data/1/provinces.csv, and so on.

Contributing to psgc

Copyright © 2012 Alistair A. Israel. See LICENSE.txt for further details.