comtradr
Interface to the UN Comtrade international trade statistics API for R
comtradr's 1.0 line is a long tail of patches against a brittle UN trade API.
◆Recent moves
- 13d ago
Long code lists split automatically to avoid HTTP 414 errors
Detects Comtrade's roughly 2000-character URL limit before sending, splitting partner and reporter codes across requests and recombining the results, which makes queries like partner = 'all_countries' work at last. Also swaps the soon-to-be-archived poorman dependency for dplyr and sharpens several error messages.
View source ↗ - 8mo ago
available_variables reference table exposes API metadata
Adds an available_variables reference table mapping original Comtrade field names to the package's tidy column names with descriptions. Addresses the recurring problem of not knowing what a returned column actually means.
View source ↗ - 10mo ago
ISO alpha-2 codes added to reference tables
Returns reporterCodeIsoAlpha2 and partnerCodeIsoAlpha2 from the reference tables and fixes a wrongly initialised object for EB02 services queries. Both fixes came from users.
View source ↗ - 1y ago
Patch restores tidy_cols after a regression
Repairs a tidy column regression introduced by the previous patch, with tests added to catch it next time. Churn within the 1.0 stabilisation series.
View source ↗ - 1y ago
Fixes for tidy_cols argument and bulk small-file downloads
Two contributed fixes: a missing return that made tidy_cols = FALSE impossible, and a file-size conversion bug that blocked bulk downloads of small files.
View source ↗ - 2y ago
Cache relocated to comply with CRAN policy
Moves the cache out of the wrong directory to settle a CRAN policy violation, with ct_migrate_cache() offered to move existing files. Housekeeping, though it requires action from earlier users.
View source ↗