Public Access
1
0

chore: improve postal data import observability

Add progress logging and a status script for postal imports and neighbor builds, and ignore local raw and generated postal datasets.
This commit is contained in:
pguerrerox
2026-04-12 23:22:36 +00:00
parent cc00a439bf
commit dc7686f507
11 changed files with 267 additions and 23 deletions
+15
View File
@@ -54,6 +54,21 @@ If you open the app from another machine on your LAN, set `VITE_API_BASE_URL` an
3. Import and build adjacency:
`npm run seed:postal`
Notes:
- Raw postal source files and generated GeoJSON datasets under `db/rawdata/` and `db/datasets/postal/*.geojson` are ignored by git.
- The importer expects WGS84 lon/lat GeoJSON. If a source file is projected, re-export it to `EPSG:4326` before importing.
Observability commands:
- `npm run import:postal` logs progress every 500 features by default.
- `npm run build:postal-neighbors` logs per-country progress and final adjacency totals.
- `npm run check:postal` prints current postal area and neighbor counts from the database.
You can change the import log interval with `POSTAL_IMPORT_LOG_EVERY`, for example:
`POSTAL_IMPORT_LOG_EVERY=1000 npm run import:postal`
If you want to validate the current postal tables after an import or neighbor build, run:
`npm run check:postal`
## Google Maps Requirements
Enable these Google Cloud APIs for the keys you use: