Skip to contents

Plots, for one country, the share of each five-year age group in the male population (bars to the left) and in the female population (to the right), animated over Year, for the Pyramid tab. The male values are negated so that the two sexes stand back to back; the labels on the bars show them positive, and so do the axis ticks (-5 reads "5%").

Usage

plot_pyramid(mfi_population, country, font_style)

Arguments

mfi_population

Data frame of population shares by age group and sex (long format, with Country Name, sex, age, Year, value columns), see mfi_population.

country

Character. Country 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_pyramid(mfi_population, country = "Greece", font_style = font_style)