#' Get list of CT reporters
getCTReporters <-
function() {
ct_reporters <-
data.frame(
jsonlite::fromJSON("http://comtrade.un.org/data/cache/reporterAreas.json")$results
) %>%
dplyr::tbl_df()
ct_reporters %>%
dplyr::rename(Reporter.Code = id,
Reporter = text) %>%
dplyr::filter(Reporter != "All") %>%
dplyr::mutate(Reporter.Code = as.integer(Reporter.Code))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.