World Economic Outlook (WEO) - July 2021 update - WEOJuly2021update

Data - IMF

country

Code
WEOJuly2021update_sheet3 %>%
  group_by(country) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  print_table_conditional()
country Nobs
Argentina 1
Australia 1
Brazil 1
Canada 1
China 1
Egypt 2/ 1
France 1
Germany 1
India 2/ 1
Indonesia 1
Iran 2/ 1
Italy 1
Japan 1
Kazakhstan 1
Korea 1
Malaysia 1
Mexico 1
Netherlands 1
Nigeria 1
Pakistan 2/ 1
Philippines 1
Poland 1
Russia 1
Saudi Arabia 1
South Africa 1
Spain 1
Thailand 1
Turkey 1
United Kingdom 1
United States 1

Country

World

Code
WEOJuly2021update_sheet3_cumul %>%
  bind_rows(WEOJuly2021update_sheet4_cumul) %>%
  unique %>%
  filter(country %in% c("Germany", "France", "United States", "China", "Italy")) %>%
  left_join(colors, by = "country") %>%
  mutate(color = ifelse(country == "United States", color2, color)) %>%
  ggplot() + geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_5flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.15, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(40, 200, 5)) +
  ylab("100 = 2020-01-01") + xlab("") + 
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")

Europe

Code
WEOJuly2021update_sheet3_cumul %>%
  bind_rows(WEOJuly2021update_sheet4_cumul) %>%
  unique %>%
  filter(country %in% c("Germany", "France", "Italy", "Spain", "Euro Area")) %>%
  left_join(colors, by = "country") %>%
  mutate(color = ifelse(country == "France", color2, color)) %>%
  ggplot() + geom_line(aes(x = date, y = value, color = color)) +
  scale_color_identity() + add_5flags + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 1) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.15, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = seq(40, 200, 1)) +
  ylab("100 = 2020-01-01") + xlab("") + 
  geom_hline(yintercept = 100, linetype = "dashed",  color = "black")