BACI

Overview

BACI (Base pour l’Analyse du Commerce International) is a comprehensive database of bilateral trade flows developed by CEPII (Centre d’Études Prospectives et d’Informations Internationales), a leading French research center on international trade.

This dataset provides:

The BACI dataset is widely used in academic research, policy analysis, and international trade studies due to its comprehensive coverage and quality control procedures.

Data Source and Methodology

BACI is constructed from UN Comtrade data with significant processing: - Reconciliation of discrepancies between reported imports and exports - Imputation of missing values using econometric techniques - Classification using the Harmonized System (HS) nomenclature - All values converted to USD for comparability

For detailed methodological information, visit the CEPII BACI documentation.


Available Dataset

HS92 (Harmonized System 1992)

The HS92 classification provides trade data organized under the 1992 version of the Harmonized System nomenclature.


Important Information About Downloads

Download Size and Time

Important: The BACI dataset is very large. All data is packaged in a single compressed file on the CEPII server. Even if you only need data for specific years, the entire dataset must be downloaded first, then processed locally.

Recommendation: Plan your download during off-peak hours or use a stable, high-speed connection.


Function Parameters

1. dataset

Currently only one dataset is available:

dataset = "HS92"  # Harmonized System 1992 classification

2. raw_data

Controls whether to download the original data or the processed/cleaned version.

raw_data = FALSE  # logical

3. time_period

Specifies which year(s) to download. You can request single or multiple years.

time_period = 2016              # single year
time_period = c(2010, 2015)     # multiple specific years
time_period = 2010:2020         # range (will select available years)

4. language

Output language for variable names and documentation.

language = "eng"  # character string


Examples

# download treated trade data for 2016 (HS92 classification)
# Warning: large download, may take a long time
trade_2016 <- load_baci(
  dataset = "HS92",
  raw_data = FALSE,
  time_period = 2016,
  language = "eng"
)

Data Notes

Raw vs. Treated Data

Data Structure

Each row typically represents a trade flow with: - Exporter: Country code (ISO 3-letter code) - Importer: Country code (ISO 3-letter code) - Year: Calendar year of the trade flow - Product code: HS 6-digit classification - Product name: Description of the product - Value: Trade value in USD - Quantity: Physical quantity (where available)

Country and Product Coverage

Quality Notes