
Function reference
Authentification
Two helper functions for setting and getting your own key in the environment variable of R.
-
set_primary_comtrade_key() - Set your primary Comtrade API key in the environment variable
-
get_primary_comtrade_key() - get_primary_comtrade_key
-
get_comtrade_data() - Get trade data from the Comtrade API
-
check_params() - check_params
-
check_clCode() - Check HS classification parameter
-
check_cmdCode() - Check commodity_code parameter
-
check_flowCode() - Check flow_direction parameter
-
check_freq() - Check frequency parameter
-
check_date() - Check date parameter
-
check_partnerCode() - Check partner parameter
-
check_reporterCode() - Check reporter parameter
Helper functions for request
These functions form the httr2 request, execute it and process the result
-
build_comtrade_request() - Build a valid request object from the checked parameters
-
perform_comtrade_request() - Performs the request to the Comtrade API
-
process_comtrade_response() - Processes the response object