Code
WTS %>%
group_by(FREQ) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}| FREQ | Nobs |
|---|---|
| A | 1723157 |
Data
WTS %>%
group_by(FREQ) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}| FREQ | Nobs |
|---|---|
| A | 1723157 |
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 .}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 .}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 .}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) | 1162769 |
| I10 | NA | 287580 |
| I9 | Euro area 20 (fixed composition) as of 1 January 2023 | 272808 |
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 | 784260 |
| T | Double export weight | 474269 |
| M | Import weight | 232314 |
| X | Export weight | 232314 |
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 .}