Reshapes mfi from long to wide so indicator1 and indicator2 become
plottable x/y columns, joins in Region from country_code, and plots a
bubble scatter (bubble size = population, color = region), animated over
Year, with play/pause controls. Rows with missing values or no region
are dropped before plotting.
Arguments
- mfi
Data frame of World Bank indicator values (long format, with
Country Name,Indicator Name,Year,valuecolumns). Must also contain a"Population, total"indicator, used for bubble sizing.- country_code
Data frame mapping countries to region, with columns
Country Code,Short Name,Region.- indicator1
Character. Indicator name plotted on the x-axis.
- indicator2
Character. Indicator name plotted on the y-axis.
- font_style
A
plotlyfont list (e.g.list(size = 20, color = "gray25")) applied to the chart's layout.