get_country_year: Download complete trade for one country for one year.

Description Usage Arguments Value Examples

View source: R/get_country_year.R

Description

get_country_year is a low level function which downloads a single years data. Use get_countries_years to acquire multiple countries and multiple years data.

Usage

1
2
3
4
5
6
7
get_country_year(
  period = "2016",
  reporter = "152",
  token = "",
  dest_folder = getwd(),
  unzip = FALSE
)

Arguments

period

year to request

reporter

country id

token

bulk dowload API access token

dest_folder

folder to save file in format id-year.<suffix>

unzip

whether to unzip the downloaded file

Value

Data files are stored in the location specified in dest_folder

Examples

1
2
3
4
5
6
7
8
## Not run: 
get_country_year <- function(period = "2016",
                             reporter = "152",
                             token = "xxxx",
                             dest_folder = "~/downloads",
                             unzip = FALSE)

## End(Not run)

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