# Global Import-Export HS2 Profile Series (1995-2024)

Annual HS2 trade values and growth, with measures of exporter and importer concentration and trade volatility for each broad product category.

## What one row represents
one year and one HS2 product category

## Included measures and context
- Annual global trade value and growth
- Exporter and importer concentration indexes
- Trade volatility score

## Metric notes
- HS2 is a two-digit Harmonized System product group.
- HHI summarizes concentration; higher values indicate activity is concentrated among fewer participants.
- Year-over-year growth compares a value with the previous year; a negative percentage indicates a decline.
- Fields marked USD are monetary values denominated in US dollars.
- Values ending in pct are percentages.

## Fields
Column names are shown exactly as they appear in the CSV file. The schema lists the same fields, and the sample file shows example values.

- `year` — `uint16`
- `hs2` — `string`
- `global_trade_usd` — `float64`
- `yoy_growth_pct` — `float64`
- `exporter_concentration_hhi` — `float64`
- `importer_concentration_hhi` — `float64`
- `volatility_score` — `float64`

## Coverage and size
- Coverage: 1995-2024 annual observations where available
- Records: 2,910
- CSV file size: 304.3 KB
- Release: 1.0.0
- SHA-256: `7eefdf6a88d4ef071b32840bd795b20fbb186c44cf84acb4126124562a980932`

## Files
- `data.csv` — complete dataset
- `manifest.json` — dataset description, coverage, record count, and download details
- `schema.json` — field names, row definition, included measures, and metric notes
- `sample.json` — example records
- `README.md` — these notes

## Read the CSV file with Python
```python
import pyarrow as pa
import pyarrow.csv as csv

column_types = {
    "year": pa.type_for_alias("uint16"),
    "hs2": pa.type_for_alias("string"),
    "global_trade_usd": pa.type_for_alias("double"),
    "yoy_growth_pct": pa.type_for_alias("double"),
    "exporter_concentration_hhi": pa.type_for_alias("double"),
    "importer_concentration_hhi": pa.type_for_alias("double"),
    "volatility_score": pa.type_for_alias("double"),
}
reader = csv.open_csv(
    "data.csv",
    read_options=csv.ReadOptions(use_threads=False),
    parse_options=csv.ParseOptions(newlines_in_values=True, ignore_empty_lines=False),
    convert_options=csv.ConvertOptions(
        column_types=column_types, null_values=[""],
        strings_can_be_null=True, quoted_strings_can_be_null=False,
    ),
)
for batch in reader:
    print(batch.num_rows)  # Process one batch at a time.
```

Install `pyarrow` if it is not already available: `python -m pip install pyarrow`.

## Sources and related files
- OECD BIMTS HS2017-6D
- Dataset page: https://www.yugalinks.org/datasets/v1/import-export/import-export-hs2-profile-series-v1/
- Original dataset record: https://huggingface.co/datasets/yugalinks/import-export-hs2-profile-series-v1

---

Published by Yugalinks: https://www.yugalinks.org/datasets/v1/import-export/import-export-hs2-profile-series-v1

Contact: [support@yugalinks.com](mailto:support@yugalinks.com)


## CSV values

The CSV uses UTF-8 and includes the field names in the first row. Country and product codes are text; keep their leading zeros.
An unquoted empty field means unavailable. A quoted empty field is an empty string. Literal text such as NA and null remains text.
Keep the column types shown above when reading numbers, so large counts and decimal values are not rounded.
