Skip to contents

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.

Usage

plot_bar(data, indicator, country = NULL, top_n = Inf)

Arguments

data

Data frame from get_indicator().

indicator

The id of the indicator in indicators(), 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.

Value

A plotly object.

Examples

plot_bar(saved_indicator("unemployment"), "unemployment", country = "EL", top_n = 10)