--- language: - en tags: - trade - customs - philippines - economics - government - imports size_categories: - 10M=0.20.0) with the following process: 1. **Multi-source ingestion:** - 2012-2019 data: Read from 8 CSV files - 2020-2025 data: Read from yearly partitioned Parquet files with year/month metadata extracted from source Excel filenames 2. **Schema unification:** All source data mapped to a common 37-column schema: - Numeric fields standardized to `Float64` (prices, values, duties, taxes, quantities, masses) - Temporal fields standardized to `Int32` (year, month, quarter) - Text fields standardized to `String` (codes, descriptions, country identifiers) - HS codes preserved as `String` to maintain leading zeros in tariff codes 3. **Column mapping and renaming:** - Legacy column names (e.g., `ty`, `dutypaid`, `vatpaid`) mapped to unified names (e.g., `year`, `duty`, `vat`) - Snake_case naming convention applied consistently across all columns - Missing columns in either source filled with null values 4. **Data quality handling:** - UTF-8 lossy encoding applied to handle invalid byte sequences - Ragged line handling for inconsistent column counts in CSV sources - Null value preservation for missing or incomplete data 5. **Streaming aggregation:** Lazy evaluation and streaming operations used to process 65+ million rows without exceeding memory constraints 6. **Compression:** Snappy compression applied to the unified file (4.92 GB total size) 7. **Statistics:** Column statistics embedded in Parquet metadata to enable query optimization and predicate pushdown #### Yearly Parquet Generation The yearly Parquet files were generated with: - Schema normalization ensuring consistent data types across years - Snappy compression reducing storage requirements - Yearly partitioning for efficient year-specific queries ## Additional Information ### Citation Information **For the unified dataset (2012-2025):** Bureau of Customs of the Philippines. (2012-2025). Import Transaction Records. Combined and unified dataset. **For the original 2012-2019 dataset:** Abante, Ken. (2020). An Open Data Set of Twenty Million Import Transactions from the Bureau of Customs of the Philippines (2012-2019). doi:10.13140/RG.2.2.24053.73444. **Data Sources:** - 2012-2019: Abante, K. (2020) via ResearchGate - 2020-2025: Bureau of Customs of the Philippines OneDrive Repository (https://customsph-my.sharepoint.com/personal/delakrusj_customs_gov_ph/_layouts/15/onedrive.aspx?id=%2Fpersonal%2Fdelakrusj%5Fcustoms%5Fgov%5Fph%2FDocuments%2FImport%20Entries&ga=1)