get_eu_estimates: HMRC OTS EU estimates corrector

Description Usage Arguments Examples

View source: R/HMRC_API.R

Description

Mostly used to add EU estimates corrections to queries but can be used on its own

Usage

1
2
3
4
5
6
7
get_eu_estimates(
  time_window,
  code_filter = NULL,
  flow_filter = "eu",
  code_type,
  groupby
)

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. It is taken automatically from the query

code_filter

like "02" only works with HS as there is no breakdown for SITC on the API. It is taken automatically from the query

flow_filter

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

code_type

'hs' or 'sitc' populated automatically in code

groupby

takes a vector of keywords the full range is c("country", "year", "month", "hs2"). Disaggregation for EU estimates is not available at a lower level or at SITC level. Taken automatically from function.

Examples

1
2
3
 get_eu_estimates(time_window = "MonthId gt 201906 and MonthId lt 202008", code_type = 'hs', groupby = c("country", "year", "HS2"))
 get_eu_estimates(time_window = "MonthId gt 201906 and MonthId lt 202008", code_filter='02', code_type = 'hs', groupby = c("month", "HS2"))
 get_eu_estimates(time_window = "MonthId gt 202008", code_type = 'sitc', groupby = c("country", "year", "month"))

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