Function makes an API call to UN Comtrade, data is returned from the API as a CSV 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_csv_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 whether data was returned.
details
: Further details related to the nature of the API
return.
data
: Dataframe object of return data.