Skip to contents

Get data

Workhorse function of the package

ct_get_data()
Get trade data from the UN Comtrade API

Internal functions

These functions are called internally by ct_get_data and set the comtrade keys.

get_primary_comtrade_key()
get_primary_comtrade_key
set_primary_comtrade_key()
Set your primary Comtrade API key in the environment variable

Access package data

These functions allow you to access internal reference tables, such as possible ISO codes and commodity codes.

country_codes
Country codes
ct_commodity_lookup()
UN Comtrade commodities database query
ct_get_ref_table()
Get reference table from package data

Deprecated functions

These functions were part of the previous iteration of the package and are now deprecated.

ct_commodity_db_type()
ct_commodity_db_type
ct_country_lookup()
ct_country_lookup
ct_get_remaining_hourly_queries()
ct_get_remaining_hourly_queries
ct_get_reset_time()
ct_get_reset_time
ct_pretty_cols
ct_pretty_cols
ct_register_token()
ct_register_token
ct_search()
ct_search
ct_update_databases()
ct_update_databases
ct_use_pretty_cols()
ct_use_pretty_cols