Function makes an API call to UN Comtrade, data is returned from the API as a JSON object. Return value of this function is a list containing the data as a dataframe and information on whether the connection to the API was successful, and whether or not data was returned from the API. For use with the UN Comtrade API, full API docs can be found at https://comtrade.un.org/data/doc/api/
ct_json_data(url, colname)
Complete url string of the call to the API.
Indication as to whether to use "human friendly" col names or "machine friendly" col names. Value will be either "H" or "M".
List of length three, elements are:
msg
: Brief message on success/failure of the API call.
details
: More detailed message on success/failure of the API
call.
data
: Dataframe object of return data.