Skip to contents

This function opens the ComexStat HS4 trade data as an Arrow Dataset. The data is assumed to be located in the ComexStat data directory and to have been downloaded using the comex_download() function.

Usage

comex_hs4()

Value

An Arrow Dataset containing combined import and export HS4 trade data. The dataset has the following columns:

  • year: Year (integer)

  • month: Month (integer)

  • hs4: 4-digit HS product code (integer)

  • country_code: Country code (integer)

  • state: Brazilian state abbreviation (string)

  • mun_code: Municipality code (integer)

  • kg_net: Net weight in kilograms (integer64)

  • fob_usd: FOB value in US dollars (integer64)

  • direction: Trade direction, either 'exp' (export) or 'imp' (import)

Details

This function reads HS4 parquet files in the user data directory.

Examples

if (FALSE) { # \dontrun{
# Open the ComexStat HS4 dataset:
hs4_dataset <- comexstat_hs4()

} # }