Datasets:
Add 2020-2025 data
Browse filesReorganized data files and added 2020-2025 customs data.
- .gitattributes +1 -0
- README.md +206 -110
- boc_lite_combined.parquet → combined.parquet +2 -2
- boc_lite_2012.csv → yearly/csv/2012.csv +0 -0
- boc_lite_2013.csv → yearly/csv/2013.csv +0 -0
- boc_lite_2014.csv → yearly/csv/2014.csv +0 -0
- boc_lite_2015.csv → yearly/csv/2015.csv +0 -0
- boc_lite_2016.csv → yearly/csv/2016.csv +0 -0
- boc_lite_2017.csv → yearly/csv/2017.csv +0 -0
- boc_lite_2018.csv → yearly/csv/2018.csv +0 -0
- boc_lite_2019.csv → yearly/csv/2019.csv +0 -0
- yearly/csv/2020.csv +3 -0
- yearly/csv/2021.csv +3 -0
- yearly/csv/2022.csv +3 -0
- yearly/csv/2023.csv +3 -0
- yearly/csv/2024.csv +3 -0
- yearly/csv/2025.csv +3 -0
- {boc_lite_partitioned → yearly/parquet}/2012.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2013.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2014.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2015.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2016.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2017.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2018.parquet +0 -0
- {boc_lite_partitioned → yearly/parquet}/2019.parquet +0 -0
- yearly/parquet/2020.parquet +3 -0
- yearly/parquet/2021.parquet +3 -0
- yearly/parquet/2022.parquet +3 -0
- yearly/parquet/2023.parquet +3 -0
- yearly/parquet/2024.parquet +3 -0
- yearly/parquet/2025.parquet +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 60 |
boc_lite_*.csv filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 60 |
boc_lite_*.csv filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
yearly/csv/*.csv filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -16,9 +16,9 @@ size_categories:
|
|
| 16 |
|
| 17 |
## Dataset Summary
|
| 18 |
|
| 19 |
-
This dataset contains **
|
| 20 |
|
| 21 |
-
The data was extracted from the Bureau of Customs' electronic2mobile (e2m) system and has been cleaned and
|
| 22 |
|
| 23 |
## Languages
|
| 24 |
|
|
@@ -28,140 +28,179 @@ The dataset is primarily in English (`en`).
|
|
| 28 |
|
| 29 |
### Data Instances
|
| 30 |
|
| 31 |
-
The dataset is
|
| 32 |
|
|
|
|
| 33 |
```json
|
| 34 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
"uid": "2012q1 00000001",
|
| 36 |
-
"
|
| 37 |
-
"
|
| 38 |
-
"
|
| 39 |
-
"
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
"
|
| 43 |
-
"
|
| 44 |
-
"
|
| 45 |
-
"
|
| 46 |
-
"fx_usd": 1,
|
| 47 |
-
"dutiablevalueforeign": 2486856.15,
|
| 48 |
-
"exchangerate": 43.921,
|
| 49 |
"currency": "USD",
|
| 50 |
-
"
|
| 51 |
-
"
|
| 52 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
"arrastre": 274985,
|
| 54 |
"wharfage": null,
|
| 55 |
-
"
|
| 56 |
-
"
|
| 57 |
-
"
|
| 58 |
-
"
|
| 59 |
-
"
|
| 60 |
-
"
|
| 61 |
-
"
|
| 62 |
-
"
|
| 63 |
-
"
|
| 64 |
-
"
|
| 65 |
}
|
| 66 |
```
|
| 67 |
|
| 68 |
### Data Fields
|
| 69 |
|
|
|
|
|
|
|
| 70 |
| Field | Description | Data Type |
|
| 71 |
|-------|-------------|-----------|
|
| 72 |
-
| `
|
| 73 |
-
| `
|
| 74 |
-
| `
|
| 75 |
-
| `
|
| 76 |
-
| `
|
| 77 |
-
| `
|
| 78 |
-
| `
|
| 79 |
-
| `
|
| 80 |
-
| `
|
| 81 |
-
| `
|
| 82 |
-
| `
|
| 83 |
-
| `
|
| 84 |
-
| `
|
| 85 |
-
| `
|
| 86 |
-
| `
|
| 87 |
-
| `
|
| 88 |
-
| `
|
| 89 |
-
| `
|
| 90 |
-
| `
|
| 91 |
-
| `
|
| 92 |
-
| `
|
| 93 |
-
| `
|
| 94 |
-
| `
|
| 95 |
-
| `
|
| 96 |
-
| `
|
| 97 |
-
| `
|
| 98 |
-
| `
|
| 99 |
-
| `
|
| 100 |
-
| `
|
| 101 |
-
| `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
### Data Splits
|
| 104 |
|
| 105 |
-
The dataset
|
| 106 |
-
|
| 107 |
-
| Year |
|
| 108 |
-
|
| 109 |
-
| 2012 |
|
| 110 |
-
| 2013 |
|
| 111 |
-
| 2014 |
|
| 112 |
-
| 2015 |
|
| 113 |
-
| 2016 |
|
| 114 |
-
| 2017 |
|
| 115 |
-
| 2018 |
|
| 116 |
-
| 2019 |
|
| 117 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
### Parquet Files
|
| 120 |
|
| 121 |
-
The dataset is
|
| 122 |
|
| 123 |
-
####
|
| 124 |
|
| 125 |
-
`
|
| 126 |
|
| 127 |
-
**Best for:** Full dataset queries, cross-year analysis, and
|
| 128 |
|
| 129 |
```python
|
| 130 |
# Python - Polars
|
| 131 |
import polars as pl
|
| 132 |
-
df = pl.read_parquet('
|
| 133 |
|
| 134 |
# Python - Pandas
|
| 135 |
import pandas as pd
|
| 136 |
-
df = pd.read_parquet('
|
| 137 |
|
| 138 |
# DuckDB
|
| 139 |
-
SELECT * FROM '
|
| 140 |
```
|
| 141 |
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
```python
|
| 160 |
# Read all years
|
| 161 |
-
df = pl.read_parquet('
|
| 162 |
|
| 163 |
# Read specific year
|
| 164 |
-
|
| 165 |
```
|
| 166 |
|
| 167 |
## Dataset Creation
|
|
@@ -172,32 +211,89 @@ df_2015 = pl.read_parquet('boc_lite_partitioned/2015.parquet')
|
|
| 172 |
|
| 173 |
The data was extracted from the Bureau of Customs' electronic2mobile (e2m) system, which is the official electronic customs processing system in the Philippines.
|
| 174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
### Annotations
|
| 176 |
|
| 177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
### Parquet Aggregation
|
| 179 |
|
| 180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
|
| 182 |
-
|
| 183 |
-
- Numeric fields
|
| 184 |
-
-
|
| 185 |
-
-
|
|
|
|
| 186 |
|
| 187 |
-
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
-
|
|
|
|
|
|
|
|
|
|
| 190 |
|
| 191 |
-
|
| 192 |
|
| 193 |
-
|
| 194 |
|
| 195 |
-
|
| 196 |
|
| 197 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 198 |
|
| 199 |
## Additional Information
|
| 200 |
|
| 201 |
### Citation Information
|
| 202 |
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
## Dataset Summary
|
| 18 |
|
| 19 |
+
This dataset contains **65,163,468 import transactions** from the Bureau of Customs of the Philippines spanning from **2012 to 2025**. It represents a comprehensive record of goods imported into the Philippines, including detailed information on product classifications, values, duties paid, countries of origin, and ports of entry.
|
| 20 |
|
| 21 |
+
The data was extracted from the Bureau of Customs' electronic2mobile (e2m) system and has been cleaned, standardized, and unified for research purposes. The original 2012-2019 data contains 20,255,360 transactions with 30 variables, while the extended 2020-2025 data adds 44,908,108 transactions. All data has been combined into a unified schema with 37 columns.
|
| 22 |
|
| 23 |
## Languages
|
| 24 |
|
|
|
|
| 28 |
|
| 29 |
### Data Instances
|
| 30 |
|
| 31 |
+
The unified dataset is available in Parquet format combining all years from 2012 to 2025. The data follows a standardized schema across all years with 37 columns.
|
| 32 |
|
| 33 |
+
Example record structure:
|
| 34 |
```json
|
| 35 |
{
|
| 36 |
+
"year": 2012,
|
| 37 |
+
"month": null,
|
| 38 |
+
"quarter": 1,
|
| 39 |
+
"month_code": null,
|
| 40 |
"uid": "2012q1 00000001",
|
| 41 |
+
"entry_number": null,
|
| 42 |
+
"hs_code": "15119090000",
|
| 43 |
+
"goods_description": "PALM OLEIN IN BULK",
|
| 44 |
+
"country_origin": "MYS",
|
| 45 |
+
"country_export": "MYS",
|
| 46 |
+
"quantity": 2499867,
|
| 47 |
+
"unit_of_measure": null,
|
| 48 |
+
"unit_price": 0.97359568,
|
| 49 |
+
"gross_mass_kg": null,
|
| 50 |
+
"net_mass_kg": null,
|
|
|
|
|
|
|
|
|
|
| 51 |
"currency": "USD",
|
| 52 |
+
"dutiable_value_foreign": 2486856.15,
|
| 53 |
+
"exchange_rate": 43.921,
|
| 54 |
+
"dutiable_value_php": 109225209,
|
| 55 |
+
"customs_value": null,
|
| 56 |
+
"fx_usd": 1,
|
| 57 |
+
"fob_value": 2433859.8,
|
| 58 |
+
"cif_value": 2486856.3,
|
| 59 |
+
"freight": null,
|
| 60 |
+
"insurance": null,
|
| 61 |
"arrastre": 274985,
|
| 62 |
"wharfage": null,
|
| 63 |
+
"duty": 0,
|
| 64 |
+
"vat_base": 112934962,
|
| 65 |
+
"vat": 13552195,
|
| 66 |
+
"excise_ad_valorem": 0,
|
| 67 |
+
"duties_taxes_total": 13552195,
|
| 68 |
+
"other_tax": null,
|
| 69 |
+
"fines_penalties": null,
|
| 70 |
+
"preference_code": "AFTA",
|
| 71 |
+
"port": null,
|
| 72 |
+
"subport": null
|
| 73 |
}
|
| 74 |
```
|
| 75 |
|
| 76 |
### Data Fields
|
| 77 |
|
| 78 |
+
The unified schema contains 37 columns standardized across all years (2012-2025):
|
| 79 |
+
|
| 80 |
| Field | Description | Data Type |
|
| 81 |
|-------|-------------|-----------|
|
| 82 |
+
| `year` | Transaction year (2012-2025) | Int32 |
|
| 83 |
+
| `month` | Transaction month (1-12) | Int32 |
|
| 84 |
+
| `quarter` | Transaction quarter (1-4) | Int32 |
|
| 85 |
+
| `month_code` | Month code identifier | String |
|
| 86 |
+
| `uid` | Unique identifier for each transaction | String |
|
| 87 |
+
| `entry_number` | Entry declaration number | String |
|
| 88 |
+
| `hs_code` | Harmonized System tariff code (typically 11-digit AHTN) | String |
|
| 89 |
+
| `goods_description` | Text description of the imported goods | String |
|
| 90 |
+
| `country_origin` | Country of origin (ISO 3166-1 alpha-3 code or full name) | String |
|
| 91 |
+
| `country_export` | Country of export (ISO 3166-1 alpha-3 code or full name) | String |
|
| 92 |
+
| `quantity` | Quantity of goods imported | Float64 |
|
| 93 |
+
| `unit_of_measure` | Unit of measurement for quantity | String |
|
| 94 |
+
| `unit_price` | Unit price (calculated as dutiable value / quantity) | Float64 |
|
| 95 |
+
| `gross_mass_kg` | Gross mass in kilograms | Float64 |
|
| 96 |
+
| `net_mass_kg` | Net mass in kilograms | Float64 |
|
| 97 |
+
| `currency` | Original currency code of the transaction | String |
|
| 98 |
+
| `dutiable_value_foreign` | Dutiable value in foreign currency | Float64 |
|
| 99 |
+
| `exchange_rate` | Exchange rate to convert to Philippine Peso | Float64 |
|
| 100 |
+
| `dutiable_value_php` | Dutiable value in Philippine Peso | Float64 |
|
| 101 |
+
| `customs_value` | Customs valuation amount | Float64 |
|
| 102 |
+
| `fx_usd` | Exchange rate to convert foreign currency to USD | Float64 |
|
| 103 |
+
| `fob_value` | Free on Board value in USD | Float64 |
|
| 104 |
+
| `cif_value` | Cost, Insurance, and Freight value in USD | Float64 |
|
| 105 |
+
| `freight` | Freight charges | Float64 |
|
| 106 |
+
| `insurance` | Insurance charges | Float64 |
|
| 107 |
+
| `arrastre` | Arrastre (cargo handling) charges in PHP | Float64 |
|
| 108 |
+
| `wharfage` | Wharfage fees in PHP | Float64 |
|
| 109 |
+
| `duty` | Customs duty paid in PHP | Float64 |
|
| 110 |
+
| `vat_base` | Base amount for VAT computation in PHP | Float64 |
|
| 111 |
+
| `vat` | Value Added Tax paid in PHP | Float64 |
|
| 112 |
+
| `excise_ad_valorem` | Ad valorem excise tax paid in PHP | Float64 |
|
| 113 |
+
| `duties_taxes_total` | Total duties and taxes paid in PHP | Float64 |
|
| 114 |
+
| `other_tax` | Other taxes paid in PHP | Float64 |
|
| 115 |
+
| `fines_penalties` | Fines and penalties assessed in PHP | Float64 |
|
| 116 |
+
| `preference_code` | Preferential trade agreement code (e.g., AFTA, ACFTA, JPEPA, AKFTA, AANZFTA) | String |
|
| 117 |
+
| `port` | Port of entry code | String |
|
| 118 |
+
| `subport` | Subport of entry code | String |
|
| 119 |
|
| 120 |
### Data Splits
|
| 121 |
|
| 122 |
+
The complete unified dataset spans 2012-2025 with yearly distribution:
|
| 123 |
+
|
| 124 |
+
| Year | Transactions | Percentage |
|
| 125 |
+
|------|--------------|------------|
|
| 126 |
+
| 2012 | 1,193,628 | 1.83% |
|
| 127 |
+
| 2013 | 1,225,431 | 1.88% |
|
| 128 |
+
| 2014 | 1,421,241 | 2.18% |
|
| 129 |
+
| 2015 | 2,236,612 | 3.43% |
|
| 130 |
+
| 2016 | 3,140,436 | 4.82% |
|
| 131 |
+
| 2017 | 3,490,131 | 5.36% |
|
| 132 |
+
| 2018 | 3,753,118 | 5.76% |
|
| 133 |
+
| 2019 | 3,794,763 | 5.82% |
|
| 134 |
+
| 2020 | 3,173,563 | 4.87% |
|
| 135 |
+
| 2021 | 6,813,301 | 10.46% |
|
| 136 |
+
| 2022 | 8,031,537 | 12.33% |
|
| 137 |
+
| 2023 | 8,467,089 | 12.99% |
|
| 138 |
+
| 2024 | 8,992,137 | 13.80% |
|
| 139 |
+
| 2025 | 9,430,481 | 14.47% |
|
| 140 |
+
| **Total** | **65,163,468** | **100%** |
|
| 141 |
+
|
| 142 |
+
**Original Source Data:**
|
| 143 |
+
- 2012-2019: 8 CSV files totaling 3.8 GB with 20,255,360 transactions
|
| 144 |
+
- 2020-2025: 6 yearly partitioned Parquet files totaling 44,908,108 transactions
|
| 145 |
|
| 146 |
### Parquet Files
|
| 147 |
|
| 148 |
+
The dataset is available in Apache Parquet format for improved query performance and reduced storage.
|
| 149 |
|
| 150 |
+
#### Unified Combined File (2012-2025)
|
| 151 |
|
| 152 |
+
`combined.parquet` contains all 65+ million transactions with a unified schema in a single file (4.92 GB).
|
| 153 |
|
| 154 |
+
**Best for:** Full dataset queries, cross-year analysis, and comprehensive research requiring all historical data.
|
| 155 |
|
| 156 |
```python
|
| 157 |
# Python - Polars
|
| 158 |
import polars as pl
|
| 159 |
+
df = pl.read_parquet('combined.parquet')
|
| 160 |
|
| 161 |
# Python - Pandas
|
| 162 |
import pandas as pd
|
| 163 |
+
df = pd.read_parquet('combined.parquet')
|
| 164 |
|
| 165 |
# DuckDB
|
| 166 |
+
SELECT * FROM 'combined.parquet' WHERE year = 2024 LIMIT 10;
|
| 167 |
```
|
| 168 |
|
| 169 |
+
**Key Statistics:**
|
| 170 |
+
- Total rows: 65,163,468
|
| 171 |
+
- Total columns: 37
|
| 172 |
+
- Unique HS codes: 20,639
|
| 173 |
+
- Date range: 2012-2025
|
| 174 |
+
- Total dutiable value: ₱103 trillion
|
| 175 |
+
- Total duties & taxes: ₱15.3 trillion
|
| 176 |
+
|
| 177 |
+
#### Yearly Partitioned Files
|
| 178 |
+
|
| 179 |
+
`yearly/parquet/` contains separate files for each year:
|
| 180 |
+
|
| 181 |
+
| File | Size | Transactions |
|
| 182 |
+
|------|------|--------------|
|
| 183 |
+
| 2012.parquet | 86 MB | 1,193,628 |
|
| 184 |
+
| 2013.parquet | 89 MB | 1,225,431 |
|
| 185 |
+
| 2014.parquet | 105 MB | 1,421,241 |
|
| 186 |
+
| 2015.parquet | 156 MB | 2,236,612 |
|
| 187 |
+
| 2016.parquet | 222 MB | 3,140,436 |
|
| 188 |
+
| 2017.parquet | 252 MB | 3,490,131 |
|
| 189 |
+
| 2018.parquet | 268 MB | 3,753,118 |
|
| 190 |
+
| 2019.parquet | 273 MB | 3,794,763 |
|
| 191 |
+
| 2020.parquet | - | 3,173,563 |
|
| 192 |
+
| 2021.parquet | - | 6,813,301 |
|
| 193 |
+
| 2022.parquet | - | 8,031,537 |
|
| 194 |
+
| 2023.parquet | - | 8,467,089 |
|
| 195 |
+
| 2024.parquet | - | 8,992,137 |
|
| 196 |
+
| 2025.parquet | - | 9,430,481 |
|
| 197 |
|
| 198 |
```python
|
| 199 |
# Read all years
|
| 200 |
+
df = pl.read_parquet('yearly/parquet/*.parquet')
|
| 201 |
|
| 202 |
# Read specific year
|
| 203 |
+
df_2024 = pl.read_parquet('yearly/parquet/2024.parquet')
|
| 204 |
```
|
| 205 |
|
| 206 |
## Dataset Creation
|
|
|
|
| 211 |
|
| 212 |
The data was extracted from the Bureau of Customs' electronic2mobile (e2m) system, which is the official electronic customs processing system in the Philippines.
|
| 213 |
|
| 214 |
+
**2012-2019 Data:** Original dataset published by Ken Abante (2020), containing 20,255,360 transactions extracted from the e2m system.
|
| 215 |
+
|
| 216 |
+
**2020-2025 Data:** Extended dataset obtained from the Bureau of Customs via their OneDrive repository at 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, containing 44,908,108 additional transactions.
|
| 217 |
+
|
| 218 |
### Annotations
|
| 219 |
|
| 220 |
+
#### Data Enrichment and Unification
|
| 221 |
+
|
| 222 |
+
To create a unified dataset spanning 2012-2025, the following transformations and annotations were applied:
|
| 223 |
+
|
| 224 |
+
**2020-2025 Data Processing:**
|
| 225 |
+
- **Year and month extraction:** Year and month columns were extracted from the original Excel filenames (format: YYYY-MM) and added as separate columns to enable temporal analysis
|
| 226 |
+
- **Source format:** Original data provided as Excel (.xlsx) files, one per month, converted to Parquet format
|
| 227 |
+
- **Schema standardization:** Column names and data types were standardized to match the unified 37-column schema
|
| 228 |
+
|
| 229 |
+
**Schema Unification (2012-2025):**
|
| 230 |
+
- Columns from both data sources (2012-2019 and 2020-2025) were mapped to a common schema with 37 unified columns
|
| 231 |
+
- Column name standardization: Original column names were converted to snake_case format (e.g., `dutiablevaluephp` → `dutiable_value_php`)
|
| 232 |
+
- Data type normalization: All numeric fields standardized to Float64, temporal fields to Int32, and identifiers to String
|
| 233 |
+
- Country code handling: Both ISO 3166-1 alpha-3 codes and full country names are preserved in `country_origin` and `country_export` fields
|
| 234 |
+
- Missing column handling: Columns present in one dataset but not the other are filled with null values
|
| 235 |
+
|
| 236 |
+
**Column Mappings:**
|
| 237 |
+
- 2012-2019: `ty` → `year`, `tm` → `month`, `tq` → `quarter`
|
| 238 |
+
- 2012-2019: `hscode` → `hs_code`, `goodsdescription` → `goods_description`
|
| 239 |
+
- 2012-2019: `countryorigin_iso3` → `country_origin`, `countryexport_iso3` → `country_export`
|
| 240 |
+
- 2012-2019: `p` → `unit_price`, `q` → `quantity`
|
| 241 |
+
- 2012-2019: `dutypaid` → `duty`, `vatpaid` → `vat`, `vatbase` → `vat_base`
|
| 242 |
+
- 2012-2019: `m_fob` → `fob_value`, `m_cif` → `cif_value`
|
| 243 |
+
- 2012-2019: `dutiestaxes` → `duties_taxes_total`, `prefcode` → `preference_code`
|
| 244 |
+
- 2012-2019: `finesandpenalties` → `fines_penalties`, `othertax` → `other_tax`
|
| 245 |
+
|
| 246 |
### Parquet Aggregation
|
| 247 |
|
| 248 |
+
#### Unified Dataset Generation
|
| 249 |
+
|
| 250 |
+
The unified Parquet file (`combined.parquet`) was generated using Polars (>=0.20.0) with the following process:
|
| 251 |
+
|
| 252 |
+
1. **Multi-source ingestion:**
|
| 253 |
+
- 2012-2019 data: Read from 8 CSV files
|
| 254 |
+
- 2020-2025 data: Read from yearly partitioned Parquet files with year/month metadata extracted from source Excel filenames
|
| 255 |
|
| 256 |
+
2. **Schema unification:** All source data mapped to a common 37-column schema:
|
| 257 |
+
- Numeric fields standardized to `Float64` (prices, values, duties, taxes, quantities, masses)
|
| 258 |
+
- Temporal fields standardized to `Int32` (year, month, quarter)
|
| 259 |
+
- Text fields standardized to `String` (codes, descriptions, country identifiers)
|
| 260 |
+
- HS codes preserved as `String` to maintain leading zeros in tariff codes
|
| 261 |
|
| 262 |
+
3. **Column mapping and renaming:**
|
| 263 |
+
- Legacy column names (e.g., `ty`, `dutypaid`, `vatpaid`) mapped to unified names (e.g., `year`, `duty`, `vat`)
|
| 264 |
+
- Snake_case naming convention applied consistently across all columns
|
| 265 |
+
- Missing columns in either source filled with null values
|
| 266 |
|
| 267 |
+
4. **Data quality handling:**
|
| 268 |
+
- UTF-8 lossy encoding applied to handle invalid byte sequences
|
| 269 |
+
- Ragged line handling for inconsistent column counts in CSV sources
|
| 270 |
+
- Null value preservation for missing or incomplete data
|
| 271 |
|
| 272 |
+
5. **Streaming aggregation:** Lazy evaluation and streaming operations used to process 65+ million rows without exceeding memory constraints
|
| 273 |
|
| 274 |
+
6. **Compression:** Snappy compression applied to the unified file (4.92 GB total size)
|
| 275 |
|
| 276 |
+
7. **Statistics:** Column statistics embedded in Parquet metadata to enable query optimization and predicate pushdown
|
| 277 |
|
| 278 |
+
#### Yearly Parquet Generation
|
| 279 |
+
|
| 280 |
+
The yearly Parquet files were generated with:
|
| 281 |
+
- Schema normalization ensuring consistent data types across years
|
| 282 |
+
- Snappy compression reducing storage requirements
|
| 283 |
+
- Yearly partitioning for efficient year-specific queries
|
| 284 |
|
| 285 |
## Additional Information
|
| 286 |
|
| 287 |
### Citation Information
|
| 288 |
|
| 289 |
+
**For the unified dataset (2012-2025):**
|
| 290 |
+
|
| 291 |
+
Bureau of Customs of the Philippines. (2012-2025). Import Transaction Records. Combined and unified dataset.
|
| 292 |
+
|
| 293 |
+
**For the original 2012-2019 dataset:**
|
| 294 |
+
|
| 295 |
+
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.
|
| 296 |
+
|
| 297 |
+
**Data Sources:**
|
| 298 |
+
- 2012-2019: Abante, K. (2020) via ResearchGate
|
| 299 |
+
- 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)
|
boc_lite_combined.parquet → combined.parquet
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79c4e6cd94844709ce6a488da7bb3fb7a4193b0b25affefa4685ce8e20c820e1
|
| 3 |
+
size 5282852997
|
boc_lite_2012.csv → yearly/csv/2012.csv
RENAMED
|
File without changes
|
boc_lite_2013.csv → yearly/csv/2013.csv
RENAMED
|
File without changes
|
boc_lite_2014.csv → yearly/csv/2014.csv
RENAMED
|
File without changes
|
boc_lite_2015.csv → yearly/csv/2015.csv
RENAMED
|
File without changes
|
boc_lite_2016.csv → yearly/csv/2016.csv
RENAMED
|
File without changes
|
boc_lite_2017.csv → yearly/csv/2017.csv
RENAMED
|
File without changes
|
boc_lite_2018.csv → yearly/csv/2018.csv
RENAMED
|
File without changes
|
boc_lite_2019.csv → yearly/csv/2019.csv
RENAMED
|
File without changes
|
yearly/csv/2020.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3de1416e5ce4f5a34d51fb2545d435927ae6eb33410c586bb7f7bd6bc1f79804
|
| 3 |
+
size 561753864
|
yearly/csv/2021.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba0ec84f6ba2d6066cc63ba8d68e447b1966379e9d544d472e51b01d372ef323
|
| 3 |
+
size 1218198155
|
yearly/csv/2022.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1601a5992ec19feedc7a1ba2be7afeb1b4bd4802221ba0bb0f39f9783ad6533b
|
| 3 |
+
size 1485550823
|
yearly/csv/2023.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75dfd206423a088758b289308a622e363d7701c0d885be1096256fbb01aae5ef
|
| 3 |
+
size 1605334384
|
yearly/csv/2024.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5dacf9cb24e3636ead81082c431788d81783056a7d5a41443ef099220be23e3b
|
| 3 |
+
size 1720528044
|
yearly/csv/2025.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f45dbc97e944aa84526c904bcf5cf3c2c74be80610dd4335160a380666441a0
|
| 3 |
+
size 1802735743
|
{boc_lite_partitioned → yearly/parquet}/2012.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2013.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2014.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2015.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2016.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2017.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2018.parquet
RENAMED
|
File without changes
|
{boc_lite_partitioned → yearly/parquet}/2019.parquet
RENAMED
|
File without changes
|
yearly/parquet/2020.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4ddb4531bc83a1f43eeaea213cc3b3303bb521924315b2ed1a1440e3d4f16fd5
|
| 3 |
+
size 259536702
|
yearly/parquet/2021.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34456a42495b561bf3691544994f3db435aec4db951d028fa442b0a77f8a02e4
|
| 3 |
+
size 559452575
|
yearly/parquet/2022.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cbfb9cd6db9af672942b816b82c69dab934cd9031d03c579f829fdf25d23164e
|
| 3 |
+
size 674540897
|
yearly/parquet/2023.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:042094f8e98bb88d1ad5889cb53060d98b287f064ddedb12a3c95fc9089826b1
|
| 3 |
+
size 735684212
|
yearly/parquet/2024.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7125910a025d0a615d0fa96aecf3bc90cb72b58103d039cf4702f08ff479626
|
| 3 |
+
size 762909055
|
yearly/parquet/2025.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be8cf3353682243db488ce4b488d045843ca677c07c1a3f541a460c49c829a9d
|
| 3 |
+
size 799659139
|