Trade weights - WTS

Data


Data Structure Definition

  • Data Structure Definition (DSD). html

FREQ

Code
WTS %>%
  group_by(FREQ) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
FREQ Nobs
A 1312037

REF_AREA

Code
WTS %>%
  left_join(REF_AREA, by = "REF_AREA") %>%
  group_by(REF_AREA, Ref_area) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

CURRENCY_TRANS

Code
WTS %>%
  left_join(CURRENCY %>%
              rename(CURRENCY_TRANS = CURRENCY, Currency_trans = Currency),
            by = "CURRENCY_TRANS") %>%
  group_by(CURRENCY_TRANS, Currency_trans) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

COUNT_AREA

Code
WTS %>%
  left_join(REF_AREA %>%
              rename(COUNT_AREA = REF_AREA, Count_area = Ref_area),
            by = "COUNT_AREA") %>%
  group_by(COUNT_AREA, Count_area) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

AREA_DEFINITION

Code
WTS %>%
  left_join(REF_AREA %>%
              rename(AREA_DEFINITION = REF_AREA, Area_definition = Ref_area),
            by = "AREA_DEFINITION") %>%
  group_by(AREA_DEFINITION, Area_definition) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
AREA_DEFINITION Area_definition Nobs
X0 IMF Member Countries (IMF) 1039229
I9 Euro area 20 (fixed composition) as of 1 January 2023 272808

TRADE_WEIGHT

Code
WTS %>%
  left_join(TRADE_WEIGHT, by = "TRADE_WEIGHT") %>%
  group_by(TRADE_WEIGHT, Trade_weight) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
TRADE_WEIGHT Trade_weight Nobs
O Overall trade weight 532980
T Double export weight 367949
M Import weight 205554
X Export weight 205554

Ex 1: Germany

Code
WTS %>%
  year_to_date() %>%
  filter(REF_AREA == "DE",
         TRADE_WEIGHT == "O", # Overall trade weight
         CURRENCY_TRANS == "H10", # Euro area-19 countries and EER-38 group of trading partners
         date == as.Date("1995-01-01")) %>%
  left_join(REF_AREA %>%
              rename(COUNT_AREA = REF_AREA, Count_area = Ref_area),
            by = "COUNT_AREA") %>%
  select(COUNT_AREA, Count_area, OBS_VALUE) %>%
  arrange(-OBS_VALUE) %>%
  mutate(OBS_VALUE = (100*OBS_VALUE) %>% round(1) %>% paste0(" %")) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}