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.
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)