Skip navigation

The {waffle} package got some đź’™ this week and now has a substantially improved geom_waffle() along with a brand new sibling function geom_pictogram() which has all the powerful new features of geom_waffle() but lets you use Font Awesome 5 brand and solid glyphs to make isotype pictograms.

This slideshow requires JavaScript.

A major new feature is that stat_waffle() (which powers both geoms) has an option to auto-compute proportions so you can use a proper 10×10 grid to show parts of a whole without doing any extra work (works in facet contexts, too).

You can look at a preview of the vignettes below or bust the iframes to see waffles and pictograms in action.

Building Waffle Charts

Building Pictograms

FIN

You can get the updated {waffle} code at your preferred social coding service (See the list for {waffle} over at CINC.

It needs much tyre kicking, especially the pictogram geom. File issues/PRs wherever you’re comfortable.

5 Comments

  1. as always bringing more and more awesomeness to R. Thanks so much Robert !

  2. The default waffle::waffle() font family, “FontAwesome5Free-Solid”, despite those .ttf fonts from the waffle package being installed. I got “fontawesome-webfont.ttf” directly from FontAwesome, then this works:

    library(waffle)
    library(extrafont)
    loadfonts()
    waffle(c(50, 30, 15, 5),
    rows = 5,
    use_glyph = “users”,
    glyph_size = 4,
    glyph_font = “FontAwesome”,
    glyph_font_family = “FontAwesome”)

    • Sorry. Meant to say defaults don’t work for me, despite fonts being installed.

    • thx for posting. will get to debugging this when i have time (i maintain quite a few pkgs). what platform are you on?

  3. Thank you very much, Robert, for this package and this tutorial.
    I was wondering if it is still working as of August 2021 (two years after last commit) and if the package is still maintained.

    I am struggling to make Font Awesome work, even after reproducing your detailed explanation here. There are plenty of issues in the github repo about that (not sure if we should ask them on gitlab instead, maybe?) and several outdated solutions in stack overflow.


One Trackback/Pingback

  1. […] Click to view slideshow. […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.