International Financial Statistics, Annual - IFS_A

Data - IMF

Code
load_data("imf/IFS_A.RData")
load_data("imf/CL_INDICATOR_IFS.RData")
load_data("imf/CL_AREA_IFS.RData")

CL_INDICATOR_IFS

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

CL_AREA_IFS

Code
IFS_A %>%
  left_join(CL_AREA_IFS, by = c("iso2c" = "AREA")) %>%
  group_by(iso2c, AREA_desc) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Exchange Rates

Ex 1A: ENDE_XDC_USD_RATE - Exchange Rates

Code
IFS_A %>%
  filter(INDICATOR == "ENDE_XDC_USD_RATE",
         iso2c %in% c("GB", "FR", "DE")) %>%
  ggplot +
  geom_line(aes(x = date, y = value, color = iso2c, linetype = iso2c)) + 
  theme_minimal() + xlab("") + ylab("Exchange Rate ($1 = ?National Currency)") +
  scale_x_date(breaks = seq(1960, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_continuous(breaks = seq(0, 10, 1),
                     labels = dollar_format(accuracy = 0.1, prefix = "", suffix = "../$")) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

Ex 1B: EREER_ULC_IX - REER based on ULC

Code
IFS_A %>%
  filter(INDICATOR == "EREER_ULC_IX",
         iso2c %in% c("GB", "FR", "DE", "US")) %>%
  ggplot() +
  geom_line(aes(x = date, y = value, color = iso2c, linetype = iso2c)) +
  theme_minimal() + xlab("") + ylab("REER based on ULC") +
  scale_x_date(breaks = seq(1960, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_log10(breaks = seq(0, 200, 10),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.8, 0.2),
        legend.title = element_blank())

Ex 1C: EREER_IX - Exchange Rates, REER based on CPI

Code
IFS_A %>%
  filter(INDICATOR == "EREER_IX",
         iso2c %in% c("GB", "FR", "DE", "US")) %>%
  ggplot() +
  geom_line(aes(x = date, y = value, color = iso2c, linetype = iso2c)) +
  theme_minimal() + xlab("") + ylab("REER based on CPI") +
  scale_x_date(breaks = seq(1960, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_log10(breaks = seq(0, 200, 10),
                     labels = dollar_format(accuracy = 1, prefix = "")) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.8, 0.80),
        legend.title = element_blank())

Ex 2: Financial Market Prices, Equities, Index - FPE_IX

Code
IFS_A %>%
  filter(INDICATOR == "FPE_IX",
         iso2c %in% c("GB", "FR", "DE", "US")) %>%
  ggplot() +
  geom_line(aes(x = date, y = value, color = iso2c, linetype = iso2c)) +
  theme_minimal() + xlab("") + ylab("Market Values") +
  scale_x_date(breaks = seq(1950, 2020, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  scale_y_log10(breaks = c(seq(0, 5, 1), seq(0, 50, 10), seq(0, 200, 50)),
                labels = dollar_format(accuracy = 1, prefix = "")) +
  scale_color_manual(values = viridis(5)[1:4]) +
  theme(legend.position = c(0.8, 0.20),
        legend.title = element_blank())