Loads data on all products imported to or exported from Brazil.

load_br_trade(dataset, raw_data = FALSE, time_period, language = "eng")

Arguments

dataset

A dataset name ("comex_export_mun", "comex_import_mun", "comex_export_prod" or "comex_import_prod").

raw_data

A boolean setting the return of raw (TRUE) or processed (FALSE) data.

time_period

A numeric indicating for which years the data will be loaded, in the format YYYY. Can be any vector of numbers, such as 2010:2012.

language

A string that indicates in which language the data will be returned. Portuguese ("pt") and English ("eng") are supported.

Value

A tibble.

Examples

if (FALSE) {
# download treated (raw_data = FALSE) exports data by municipality (dataset = "comex_export_mun")
# from 2020 to 2021 (time_period = 2020:2021)
data <- load_br_trade(
  dataset = "comex_export_mun",
  raw_data = FALSE,
  time_period = 2020:2021
)
# download treated(raw_data = FALSE) imports data by municipality (dataset = "comex_import_mun")
# from 2020 to 2021 (time_period = 2020:2021)
data <- load_br_trade(
  dataset = "comex_import_mun",
  raw_data = FALSE,
  time_period = 2020:2021
)
}