call_sitc_hmrc_rts_with_key_word_search: HMRC RTS query base on key word and SITC

Description Usage Arguments Examples

View source: R/HMRC_API.R

Description

Querying the HMRC OTS data using HS nomenclature. The arguments are not case-sensitive the API itself is still in BETA thus we continue reporting issues.

Usage

1
2
3
4
5
6
7
8
call_sitc_hmrc_rts_with_key_word_search(
  time_window = NULL,
  key_word = NULL,
  filter_agg = "none",
  country_filter = NULL,
  flow_filter = NULL,
  groupby = NULL
)

Arguments

time_window

like "MonthId gt 202000 and MonthId lt 202100" which is everything from 2020 or "MonthId gt 201908 and MonthId lt 202009" last 12 month up to end of August

key_word

anything like "cheese" or "whisky" or "sprout" stick to single words

filter_agg

the aggregation level at which you are looking for the keyword like "sitc1" or "sitc4"

country_filter

use ISO-2-alpha code e.g. "FR" check HMRC for inconsistencies such as former Yugoslavian countries.

flow_filter

choose from "export" "import" or "EU"

groupby

takes a vector of keywords the full range is c("country", "year", "month", "SITC1", "SITC2", "SITC3", "SITC4")

Examples

1
2
 call_sitc_hmrc_rts_with_key_word_search(key_word = "dairy", filter_agg = "sitc2", time_window = "MonthId eq 201901", groupby = c("sitc4", "COUNTRY"))
 call_sitc_hmrc_rts_with_key_word_search(filter_agg = "sitc1", time_window = "MonthId gt 201906 and MonthId lt 202008", country_filter = "FR", flow_filter = "EXport", groupby = c("SITc2", "COUNTRY"))

FruzsiG/hmrcwrappER documentation built on Dec. 17, 2021, 9:22 p.m.