Gap between actual and trend gross domestic product at 2015 reference levels - AVGDGT

Data - AMECO

geo, Country

Code
AVGDGT %>%
  left_join(COU, by = "COU") %>%
  group_by(COUNTRY) %>%
  summarise(Nobs = n()) %>%
  mutate(Flag = gsub(" ", "-", str_to_lower(COUNTRY)),
         Flag = paste0('<img src="../../icon/flag/vsmall/', Flag, '.png" alt="Flag">')) %>%
  select(Flag, everything()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F, escape = F) else .}

France, Spain, Italy, Spain

All

Code
AVGDGT %>%
  filter(COU %in% c("FRA", "DEU", "ITA", "ESP"),
         vintage == 2021) %>%
  left_join(COU, by = "COU") %>%
  na.omit %>%
  ggplot() + theme_minimal() + ylab("Gap between actual and trend gross domestic product at 2015 reference levels") + xlab("") +
  geom_line(aes(x = date, y = value/100, color = COUNTRY)) +
  geom_image(data = . %>%
               filter(date == as.Date("2013-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", COUNTRY)), ".png")),
             aes(x = date, y = value/100, image = image), asp = 1.5) +
  scale_color_manual(values = c("#002395", "#000000", "#009246", "#C60B1E")) +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.2, 0.2),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
                     labels = scales::percent_format(accuracy = 1))

1990-

Code
AVGDGT %>%
  filter(COU %in% c("FRA", "DEU", "ITA", "ESP"),
         vintage == 2021) %>%
  left_join(COU, by = "COU") %>%
  filter(date >= as.Date("1990-01-01")) %>%
  na.omit %>%
  ggplot() + theme_minimal() + ylab("Gap between actual and trend gross domestic product at 2015 reference levels") + xlab("") +
  geom_line(aes(x = date, y = value/100, color = COUNTRY)) +
  geom_image(data = . %>%
               filter(date == as.Date("2013-01-01")) %>%
               mutate(image = paste0("../../icon/flag/", str_to_lower(gsub(" ", "-", COUNTRY)), ".png")),
             aes(x = date, y = value/100, image = image), asp = 1.5) +
  scale_color_manual(values = c("#002395", "#000000", "#009246", "#C60B1E")) +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%y")) +
  theme(legend.position = c(0.2, 0.2),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = 0.01*seq(-60, 60, 1),
                     labels = scales::percent_format(accuracy = 1))