The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Getting Started with ggpop

ggpop is a ggplot2 extension for creating icon-based population charts. Icons from Font Awesome replace bars or dots to represent population proportions visually.

Quick example

df_raw <- data.frame(
  sex = c("Female", "Male"),
  n   = c(55, 45)
)

df_plot <- process_data(
  data        = df_raw,
  group_var   = sex,
  sum_var     = n,
  sample_size = 40
) %>%
  mutate(icon = case_when(
    type == "Female" ~ "person-dress",
    type == "Male"   ~ "person"
  ))

ggplot() +
  geom_pop(
    data = df_plot,
    aes(icon = icon, color = type),
    size = 2.5, dpi = 72
  ) +
  scale_color_manual(values = c(Female = "#C0392B", Male = "#2980B9")) +
  theme_pop() +
  scale_legend_icon(size = 5) +
  labs(title = "Population by sex", color = NULL)

Vignettes

Vignette Description
process_data() Prepare count data for plotting
geom_pop() Population icon grids
geom_icon_point() Icon scatter plots
fa_icons() Search Font Awesome icons
Themes theme_pop(), theme_pop_dark(), theme_pop_minimal()
Tips Rules, gotchas, and best practices

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.