Skip to contents

Plots one indicator over the years, one line per country, for the Country Comparison tab. The hover text gives the country, indicator, year and value. Rows with a missing value are left out.

Usage

plot_country_comp(mfi, countries, indicator, font_style)

Arguments

mfi

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

countries

Character vector of country names to plot.

indicator

Character. Indicator name 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_country_comp(
  mfi,
  countries = c("Greece", "Bulgaria"),
  indicator = "Population, total",
  font_style = font_style
)