Я беспокоюсь, что мое решение слишком простое, но ваш объект f
также содержит количество несчастных случаев в столбце cum_dead
.
Я думаю, все, что вам нужно сделать, это изменить cum_confirm
на cum_dead
.
ggplot(filter(d, d$time > '2020-02-05' & country %in% f$country), mapping = aes(time, cum_confirm , color = country, label = country)) +
geom_line() +
geom_text(data = f, aes(label = country, colour = country, x = time, y = cum_dead))+
theme_minimal(base_size = 14)+
theme(legend.position = "none") +
ggtitle('Covid-19 Cases by Country', 'The progression of confirmed cases by countries')+
ylab('Confirmed Dead')