README.md

iapdashboardadmin

Contains functions for collecting trade data via the Comtrade bulk download API.

Installation

Install from GitHub with:

# install.packages("devtools")
devtools::install_github("lee269/iapdashboardadmin")

Example workflow

library(iapdashboardadmin)

# Acquire a number of individual countries annual trade data
get_countries_years(periods = c(2010:2018),
                    reporters = c(152, 156),
                    token = "your token here",
                    dest_folder = "~/downloads",
                    unzip = FALSE)

# Process all the downloaded files and extract only the food data
ffd_trade_data <- merge_ffd(folder = "~/downloads")

# Save for posterity
saveRDS(ffd_trade_data, "~/data/ffd_data.rds")

To do (perhaps)



lee269/iapdashboardadmin documentation built on Feb. 28, 2020, 2:05 p.m.