This repository serves as the absolute, data-driven authority for onboarding and whitelabeling congressional district offices on the platform. It hosts the standardized 9-column PSGC barangay datasets and optimized GeoJSON boundary shapefiles.
By utilizing this automated framework, geographic dropdowns, dashboards, and map components render dynamically across instances with zero code deployments or hardcoded backend maps.
All incoming .csv payloads must strictly follow this 9-column specification. Legacy 8-column files will be rejected immediately by the client-side validation linter. The literal text written in the municipality_name column acts as the absolute display authority in the application frontend UI.
| Index | Column Header | Data Type | Example | Notes |
|---|---|---|---|---|
| 0 | psgc_10_digit |
String (10) | 1704001001 |
Unique Barangay identifier |
| 1 | name |
String | Agot |
Official Barangay title |
| 2 | geographic_level |
String | Bgy |
Baseline aggregation layer |
| 3 | urban_rural |
String (1) | R |
U (Urban) or R (Rural) |
| 4 | correspondence_code |
String | 174001001 |
Legacy code mapping |
| 5 | income_classification |
String | "" |
Optional blank override field |
| 6 | municipality_psgc_code |
String (7) | 1704001 |
Parent Municipality Identifier |
| 7 | municipality_name |
String | Boac |
Verbatim dropdown string text |
| 8 | province_name |
String | Marinduque |
Parent Province Layer |
To render optimized map borders without throttling client-side browser performance, raw national shapefiles from the Humanitarian Data Exchange (HDX) must be isolated, downsampled, and converted using mapshaper.org.
Locate the official "Philippines - Subnational Administrative Boundaries" dataset on HDX provided by OCHA FISS. Select your layer package based on your interface mapping targets:
- Admin 3 File (
phl_admbnda_adm3_ocha_fiss): Contains Municipality and City boundaries. Use this if your dashboard highlights municipal borders. - Admin 4 File (
phl_admbnda_adm4_ocha_fiss): Contains Barangay boundaries. Use this for high-resolution interactive barangay maps.
- Drag and drop your downloaded file package directly into mapshaper.org. If using standard shapefiles, import the entire unzipped folder containing the
.shp,.shx,.dbf, and.prjfile variations simultaneously. - Click the Console button in the top right corner of the menu bar to open the dark command-line interface.
- Paste the case-sensitive regional filter expression matching your district project and press Enter to instantly drop the other 81 provinces:
- For the Marinduque Instance:
-filter "ADM2_EN == 'Marinduque'"
- For the Basilan + Isabela City Instance:
-filter "ADM2_EN == 'Basilan' || ADM3_EN == 'Isabela City' || ADM2_EN == 'Isabela City'"
- Click the Simplify button in the top menu bar.
- Keep the default configuration set to Visvalingam / weighted area, ensure prevent shape removal is checked, and click Apply.
- Use the slider widget at the top of the interface to compress the map weight down to
10.0%or15.0%. This strips out microscopic, unneeded coastline coordinate noise while preserving clean visual borders.
- Click Export in the upper right menu layout.
- Select GeoJSON as your output option format and save the file locally.
- Rename your asset file clearly (e.g.,
marinduque-district.geojson).
GitHub acts as our high-availability asset CDN. To stream vector coordinates into the system maps, you must grab the raw layout link instead of the standard web repository link.
- Push your updated
.geojsonmap asset and your 9-column.csvdata payload file to your GitHub repository main branch. - Open the
.geojsonfile within the GitHub web browser player interface and click the "Raw" button located on the file layout header. - Inspect your browser's address bar to ensure it points to the pure data stream:
- ❌ Wrong (HTML App Wrapper):
https://github.com/username/repo/blob/main/marinduque.geojson - ✅ Right (Pure Map Vectors CDN):
https://raw.githubusercontent.com/username/repo/main/marinduque.geojson
To provision a completely new territory without making code modifications or requesting backend deployments, execute this checklist:
- Format the Ingestion Dataset: Format your district target records into a clean 9-column CSV matching the Ingestion Schema Contract.
- Generate the Optimized Map: Run the raw subnational shapefiles through the Mapshaper Processing Pipeline to create a lightweight
.geojsonasset. - Commit Assets to Main: Push both your pristine
.csvdata payload and your compressed.geojsonvector map to your repository. - Copy the Direct Raw Links: Click Raw on both files within GitHub and capture their absolute delivery paths.
- Configure the Office Profile: Go to your administrative settings interface on the platform. Insert your target district's numeric PSGC prefix parameters and paste your Raw Map link into the
GeoJSON URLfield. - Execute Provisioning Workflow: Open the
officeProfileingestion dashboard modal, upload your 9-column CSV file, and select Re-provision. The environment will instantly purge stale cached data, establish your strict schema properties, and render your custom white-labeled maps and selection selectors dynamically.