Skip to contents

Plots several indicators over the years for one country, one line per indicator, for the Indicator Comparison tab. The indicators share one y axis, so they compare well only when they have the same unit and a similar scale (e.g. the female and the male population). Rows with a missing value are left out.

Usage

plot_indicator_comp(mfi, country, indicators, font_style)

Arguments

mfi

Data frame of World Bank indicator values (long format, with Country Name, Indicator Name, Year, value columns).

country

Character. Country name to plot.

indicators

Character vector of indicator names to plot.

font_style

A plotly font list for the layout of the chart; the app passes font_style.

Value

A plotly htmlwidget.

Examples

plot_indicator_comp(
  mfi,
  country = "Greece",
  indicators = c("Population, female", "Population, male"),
  font_style = font_style
)