One bar per country, the largest at the top, re-ranked each
year as the animation plays, and the picked country in red. A country's gaps
between its first and last year are filled in a straight line, so that it
does not drop out of the race for a year. As in golemworldbank, only the
top_n largest are shown each year, and the year is printed large and gray
in the bottom right corner.
Arguments
- data
Data frame from
get_indicator().- indicator
The
idof the indicator inindicators(), for the title and the unit.- country
Eurostat code of the country to draw in red.
- top_n
How many countries to show each year, the largest; all of them by default.
Examples
plot_bar(saved_indicator("unemployment"), "unemployment", country = "EL", top_n = 10)