GFSMAB %>%
left_join(CL_SECTOR_GFSMAB, by = "SECTOR") %>%
group_by(SECTOR, SECTOR_desc) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}
SECTOR | SECTOR_desc | Nobs |
---|---|---|
S1321 | NA | 126024 |
S1311B | NA | 121074 |
S13 | NA | 101615 |
S1313 | NA | 99830 |
S1311 | NA | 99229 |
S1314 | NA | 86389 |
S13112 | NA | 43131 |
S1312 | NA | 30858 |
GFSMAB %>%
left_join(CL_UNIT_GFSMAB, by = "UNIT") %>%
group_by(UNIT, UNIT_desc) %>%
summarise(Nobs = n()) %>%
arrange(-Nobs) %>%
{if (is_html_output()) print_table(.) else .}
UNIT | UNIT_desc | Nobs |
---|---|---|
XDC | Domestic currency | 355764 |
XDC_R_B1GQ | Percent of GDP | 352386 |
GFSMAB %>%
left_join(CL_SECTOR_GFSMAB, by = "SECTOR") %>%
left_join(iso2c, by = "iso2c") %>%
filter(INDICATOR == "G24__Z",
UNIT == "XDC_R_B1GQ",
SECTOR == "S1321") %>%
group_by(iso2c, Iso2c) %>%
summarise(Nobs = n(),
year1 = first(year(date)),
value1 = first(round(value, 1)),
year2 = last(year(date)),
value2 = last(round(value, 1))) %>%
arrange(-Nobs) %>%
{if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}
GFSMAB %>%
left_join(iso2c, by = "iso2c") %>%
filter(INDICATOR == "G24__Z",
UNIT == "XDC_R_B1GQ",
iso2c %in% c("GB", "IE", "US"),
SECTOR == "S1321") %>%
ggplot(.) + geom_line() + theme_minimal() +
aes(x = date, y = value/100, color = Iso2c, linetype = Iso2c) +
xlab("") + ylab("Interest Payments (% of GDP)") +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.title = element_blank(),
legend.position = c(0.85, 0.85)) +
scale_x_date(breaks = seq(1900, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 10000, 1),
labels = percent_format(a = 1)) +
geom_hline(yintercept = 0, linetype = "dashed", color = "grey")
GFSMAB %>%
left_join(iso2c, by = "iso2c") %>%
filter(INDICATOR == "G24__Z",
UNIT == "XDC_R_B1GQ",
iso2c %in% c("AT", "AU", "CY"),
SECTOR == "S1321") %>%
ggplot(.) + geom_line() + theme_minimal() +
aes(x = date, y = value/100, color = Iso2c, linetype = Iso2c) +
xlab("") + ylab("Interest Payments (% of GDP)") +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.title = element_blank(),
legend.position = c(0.15, 0.85)) +
scale_x_date(breaks = seq(1900, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 10000, 1),
labels = percent_format(a = 1)) +
geom_hline(yintercept = 0, linetype = "dashed", color = "grey")
GFSMAB %>%
left_join(iso2c, by = "iso2c") %>%
filter(INDICATOR == "G24__Z",
UNIT == "XDC_R_B1GQ",
iso2c %in% c("DE", "FR", "IT"),
SECTOR == "S1321") %>%
ggplot(.) + geom_line() + theme_minimal() +
aes(x = date, y = value/100, color = Iso2c, linetype = Iso2c) +
xlab("") + ylab("Interest Payments (% of GDP)") +
scale_color_manual(values = viridis(4)[1:3]) +
theme(legend.title = element_blank(),
legend.position = c(0.15, 0.85)) +
scale_x_date(breaks = seq(1900, 2020, 5) %>% paste0("-01-01") %>% as.Date,
labels = date_format("%y")) +
scale_y_continuous(breaks = 0.01*seq(-100, 10000, 1),
labels = percent_format(a = 1)) +
geom_hline(yintercept = 0, linetype = "dashed", color = "grey")
imf_codes