Fetches and imports ABARES trade data. As the data file is large, ~1.4GB uncompressed CSV file, caching is offered to save repeated downloading.
Arguments
- cache
Boolean
Cache the ABARES trade data locally after download to save download time in the future. Uses tools::R_user_dir to identify the proper directory for storing user data in a cache for this package. Defaults toTRUE
, caching the file as a gzipped CSV file. IfFALSE
, this function usestempdir()
and the files are deleted upon closing of the active R session.
Value
A data.table object of the ABARES trade data.
Note
Columns are renamed for consistency with other ABARES products serviced in this package using a snake_case format and ordered consistently.
The cached file is not the same as the raw file that is available for download. It will follow the renaming scheme and filling values that this function will perform on the raw data.
See also
Other Trade:
read_abares_trade_regions()