How-To
Task-oriented recipes for the barangay PSGC package: search misspellings, validate addresses, export to pandas/CSV, traverse hierarchy, historical data, plugins, batch files, and legacy migration.
Recipes for solving a specific task. Each page assumes you already know the basics — see Learn if you are just starting.
Recipes
Searching & validating
- Search with misspellings — fuzzy search tuning, thresholds,
match_hooks, admin-level scoping. - Validate addresses —
validate()/validate_many(), thresholds, batch validation.
Exporting & transforming
- Export to CSV / pandas —
to_frame()/to_dicts(), CLI export, model selection.
Time & enrichment
- Work with historical data —
use_version,as_of,resolve_date. - Enrich with plugins —
psgc-aux-data,--plugin,PluginLoader.
Automation
- Geocode batch files — CLI
batch-search/batch validatefrom files.
Migration
- Migrate from the legacy API — consolidate
search()/BARANGAYdict usage onto the Database API.