ts_hsfcl_nolinks: Extract all unmapped HS codes across years

View source: R/ts_hsfcl_nolinks.R

ts_hsfcl_nolinksR Documentation

Extract all unmapped HS codes across years

Description

Extract all unmapped HS codes across years

Usage

ts_hsfcl_nolinks(collection_path = NULL, prefix = NULL)

Arguments

collection_path

String with path where single-year report directories are stored.

prefix

String with report directory name prefix without trailing underscore. By default NULL.

Examples

## Not run: 
library(ggplot2)
library(dplyr)

uniq_hs <- ts_hsfcl_nolinks("/mnt/storage/sws_share/sas",
                            "complete_tf_cpc")
uniq_hs %>%
  group_by(year, flow) %>%
  dplyr::summarize(uniq_hs = n()) %>%
  ggplot(aes(as.factor(year), uniq_hs)) +
  geom_bar(stat = "identity") +
  ylab("Number of unique unmapped HS") + xlab("") +
  ggtitle(paste0("There are ",
                 nrow(uniq_hs),
                 " unmapped HS codes"),
          "New reporters absent in the map are not included")

## End(Not run)


SWS-Methodology/faoswsTrade documentation built on Feb. 13, 2023, 1:04 a.m.