The raw input data exhibited severe structural heterogeneity, manifesting as seven distinct structural formats (Formats A–G) characterized by inconsistent header placement, nested merged cells, variable string representations, and missing values. To address these challenges without relying on static rule-based scripts, an intelligent adaptive parser was developed using dynamic regular expressions (regex) and token-density schema mapping based on normalized Levenshtein distance. The adaptive pipeline automatically identified table structures and standardized heterogeneous column definitions into a unified relational database, achieving a data-cleaning accuracy of 99.4%. To enhance the analytical value of conventional demographic data, a spatial feature enrichment pipeline was implemented by integrating three external Application Programming Interfaces (APIs): OpenStreetMap Nominatim for high-precision geocoding, the Google Maps Distance Matrix API for calculating actual road-network distances and travel times, and the Open-Meteo Elevation API for extracting elevation data. This study contributed to public sector data engineering by demonstrating that the integration of automated adaptive parsing with geospatial multi-API enrichment successfully transformed fragmented public documents into a high-fidelity, multidimensional data repository suitable for robust spatial–demographic policy analysis.
Copyrights © 2026