EXR |>
filter(FREQ == "D",
CURRENCY %in% c("USD", "CHF", "GBP")) |>
month_to_date() |>
filter(date >= as.Date("2021-01-01")) |>
ggplot() + geom_line(aes(x = date, y = OBS_VALUE, color = TITLE)) +
theme_minimal() + xlab("") + ylab("") +
scale_x_date(breaks = "3 months",
labels = date_format("%b %Y")) +
scale_y_continuous(breaks = seq(0.1, 3, 0.05),
labels = dollar_format(accuracy = .1, prefix = "", suffix = "/€")) +
theme(legend.position = c(0.8, 0.9),
legend.title = element_blank(),
axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)) +
geom_label(data = . %>% filter(max(date) == date),
aes(x = date, y = OBS_VALUE, label = round(OBS_VALUE, 3), color = TITLE),
show.legend = F)