Questions tagged [waffle-chart]

A waffle chart (also known as a "square pie chart") is a type of data visualization that presents quantities as proportions of a rectangular grid.

Description

A waffle chart (also known as a "square pie chart") is a type of data visualization that presents quantities as proportions of a rectangular grid. This method of presentation can be better at presenting proportional data than a standard pie chart, as the grid structure helps viewers compare the proportion of each category more precisely.

Tools for producing waffle charts exist for programming languages/packages such as , , and . This tag should be used for any questions involving the formatting and/or implementation of these plots.

Implementations

PyWaffle, for Python

The waffle package for R

Additional Resources

  • An RBlogger post introducing the waffle package
  • Examples of waffle charts made using D3
72 questions
2
votes
0 answers

Is there a way to create waffle charts using apache echarts

I was trying to create a waffle chart using echarts3 library. Is there an existing method to do that? Any help is appreciated Waffle chart sample
2
votes
3 answers

How make a human infographic using waffle on R?

I would like make a human infographic like this I´m trying with the waffle function: install.packages(c("waffle", "extrafont")) library(waffle) library(extrafont) font_import() # check that Font Awesome is imported fonts()[grep("Awesome",…
2
votes
0 answers

Failure to Render Waffle Charts in Rmarkdown using FontAwesome glyphs

When running this code from an r markdown file: --- output: pdf_document --- ```{r test} library(extrafont) library(waffle) parts <- c(80, 30, 20, 10) waffle(parts, rows=8, use_glyph="shield") ``` I'm getting the following warnings that look…
Matt
  • 174
  • 1
  • 2
  • 14
2
votes
1 answer

Can not load Font Awesome in R and RStudio

I'm following this instruction : link and I have this code: library(waffle) library(extrafont) font_import() # use this if things look odd in RStudio under Windows loadfonts(device = "win") waffle(c(50, 30, 15, 5), rows = 5, use_glyph = "fa-car",…
DSaad
  • 181
  • 3
  • 12
2
votes
2 answers

Waffle package on R icon

I'm trying to make a square pie with waffle function but the male icon can't be used library(waffle) library(extrafont) parts <- c(`Sick=14` =14, `Treated=19` = 19, `Not sick=7` =7) loadfonts(device = "win") system.file("fonts",…
2
votes
1 answer

Create waffle chart in ggplot2

I'm trying to create a graph like this: in ggplot2. The idea is to visualize the distribution of True/False values, i.e. in the upper bar 3 out of 80 and in the lower bar 2 out of 280. How would one do this in ggplot2?
LukasKawerau
  • 1,071
  • 2
  • 23
  • 42
2
votes
1 answer

Translating coordinates to CSS fixed positioning in pixels

So I made an animated square pie chart that uses some basic CSS to display itself in a large grid format. However, how can I change each individual block (the larger squares) to be arranged in a state map grid? I have the below code in javascript…
Deeba Yavrom
  • 81
  • 1
  • 11
1
vote
1 answer

Is it possible to fill waffle charts from the top down using geom_waffle?

I am working on a waffle chart and there's one aesthetic that I am having trouble with. Currently I have my waffle chart filled row-wise, but it's starting at the bottom (with category A) and filling in left to right from the bottom up. I would like…
1
vote
0 answers

Why does PyWaffle raise a UserWarning and produce an unexpected pictogram with the "icons" argument?

I have been trying to follow the steps described in the PyWaffle documentation to use icons instead of the default blocks. Yet even when I run a simple example that I took from Python-Charts.com: from pywaffle import Waffle import matplotlib.pyplot…
1
vote
2 answers

R ggplot legend with Waffle chart

library(tidyverse) library(waffle) df_2 <- structure(list(group = c(2, 2, 2, 1, 1, 1), parts = c("A", "B", "C", "A", "B", "C"), values = c(1, 39, 60, 14, 15, 71)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame")) df_2 %>%…
Zhiqiang Wang
  • 6,206
  • 2
  • 13
  • 27
1
vote
1 answer

How to force specific order of the variables in a waffle chart in R?

please do forgive me for potentially asking a really silly question but its really important that the data I am representing in my waffle chart is ordered according to the input of my vector. I am really struggling to force the graph to not reorder…
1
vote
1 answer

How do I change the direction of a vertical Waffle?

I have this script that generates a Waffle of example date: import matplotlib.pyplot as plt from pywaffle import Waffle values = [3, 8, 9, 13, 9, 4, 5, 9, 10, 7, 4, 1] colors = ["#1D428A", "#5566A6", "#838DC2", "#B1B6DF", "#DEE1FC",…
Gleb Ryabov
  • 153
  • 7
1
vote
2 answers

Waffle chart in R: Legend text merely consists of "A", "B", "C"; how to change?

I have this dataframe DF: |total | n | |------|----| | 0 | 19 | | 1 | 16 | | 2 | 23 | | 3 | 31 | | 4 | 20 | | 5 | 95 | ... or, to make it reproducible: > dput(DF) structure(list(total = c(0, 1, 2, 3, 4, 5), n = c(19L, 16L, 23L,…
anpami
  • 760
  • 5
  • 17
1
vote
1 answer

Create a waffle chart with hatches in python using pywaffle

I'd like to create a waffle chart in grey shapes for the following dataFrame data = pd.DataFrame({'Category': ['a', 'b', 'c', 'd'], 'no_occurrence' : [594, 5, 10, 9]}) Here is what I've done so far based on this post import matplotlib.pyplot as plt…
TiTo
  • 833
  • 2
  • 7
  • 28
1
vote
1 answer

Waffle Bar Chart with scale

I'm trying to recreate this waffle bar chart: https://github.com/hrbrmstr/waffle#waffle-bar-charts-with-scales library(dplyr) library(waffle) storms %>% filter(year >= 2010) %>% count(year, status) -> storms_df ggplot(storms_df, aes(fill =…
Liza
  • 1,066
  • 2
  • 16
  • 26