

{"id":3325,"date":"2015-03-18T15:44:25","date_gmt":"2015-03-18T20:44:25","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3325"},"modified":"2018-03-10T07:56:13","modified_gmt":"2018-03-10T12:56:13","slug":"making-waffle-charts-in-r-with-the-new-waffle-package","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/","title":{"rendered":"Making waffle charts in R (with the new &#8216;waffle&#8217; package)"},"content":{"rendered":"<div style=\"padding:5px;background:#f0f0f0;width:auto;font-size:75%\"><b>NOTE:<\/b> The waffle package (sans JavaScript-y goodness) is <a href=\"https:\/\/cran.r-project.org\/web\/packages\/waffle\/index.html\">up on CRAN<\/a> so you can do an <code>install.packages(\"waffle\")<\/code> and <code>library(waffle)<\/code> vs the <code>devtools<\/code> dance.<\/div>\n<p>My disdain for pie charts is fairly well-known, but I do concede that there are times one needs to communicate parts of a whole graphically verses using just words or a table. When that need arises, I&#8217;m partial to &#8220;waffle charts&#8221; or &#8220;square pie charts&#8221;.  @eagereyes did a great post <a href=\"https:\/\/eagereyes.org\/techniques\/square-pie-charts\">a while ago<\/a> on them (make sure to read the &#8216;debate&#8217; between Robert and @hadleywickham in the comments, too), so head there for the low-down on them. Rather than have every waffle chart I make be a one-off creation, I <a href=\"https:\/\/github.com\/hrbrmstr\/waffle\">made an R package<\/a> for them.<\/p>\n<p>There is currently one function in the package &#8212; <code>waffle<\/code> &#8212; and said function doesn&#8217;t mimic all the goodness of these charts as described in Robert&#8217;s post (yet). It does, however, do a pretty decent job covering the basics. Let&#8217;s take the oft-cited New York times &#8220;debt&#8221; graphic:<\/p>\n<p><center><\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg?w=510\" alt=\"img\" \/><\/p>\n<p><\/center><\/p>\n<p>We can replicate that pretty closely in R. To make it as simple as possible, the <code>waffle<\/code> function takes a named numeric vector. If no names are specified, or you leave some names out, <code>LETTERS<\/code> will be used to fill in the gaps. The function takes your data quite literally, so if you give it a vector that sums up to, say, <code>10,000<\/code>, then the function will try to create a ggplot object with 10,000 <code>geom_rect<\/code> elements. Needless to say, that&#8217;s a bad idea. So, I suggest using the raw numbers in the vector and passing in a scaled version of the vector to the function. That way, you can play with the values to get the desired look. Here&#8217;s the R version of of the NYT graphic:<\/p>\n<pre lang=\"rsplus\"># devtools::install_github(\"hrbrmstr\/waffle\")\nlibrary(waffle)\nsavings <- c(`Mortgage ($84,911)`=84911, `Auto and\\ntuition loans ($14,414)`=14414, \n             `Home equity loans ($10,062)`=10062, `Credit Cards ($8,565)`=8565)\nwaffle(savings\/392, rows=7, size=0.5, \n       colors=c(\"#c7d4b6\", \"#a3aabd\", \"#a0d0de\", \"#97b5cf\"), \n       title=\"Average Household Savings Each Year\", \n       xlab=\"1 square == $392\")<\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3327\" data-permalink=\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/savings\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/savings.png?fit=800%2C180&amp;ssl=1\" data-orig-size=\"800,180\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"savings\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/savings.png?fit=300%2C68&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/savings.png?fit=510%2C115&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/savings.png?resize=510%2C115&#038;ssl=1\" alt=\"savings\" width=\"510\" height=\"115\" class=\"aligncenter size-full wp-image-3327\" \/><\/p>\n<p>This package evolved from a <a href=\"https:\/\/gist.github.com\/hrbrmstr\/475dae58deaf0754e1a8\">teensy gist<\/a> I made earlier this year to help communicate the scope of the Anthem data breach in the US. Since then, a recent breach at Premera occurred and added to the tally. Here's two views of that data, one with one square equalling one million people and another with one square equalling ten million people (using the blue shade from each of the company's logos):<\/p>\n<pre lang=\"rsplus\">parts <- c(`Un-breached\\nUS Population`=(318-11-79), `Premera`=11, `Anthem`=79)\n\nwaffle(parts, rows=8, size=1, colors=c(\"#969696\", \"#1879bf\", \"#009bda\"), \n       title=\"Health records breaches as fraction of US Population\", \n       xlab=\"One square == 1m ppl\")<\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3330\" data-permalink=\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/attachment\/320\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/320.png?fit=800%2C200&amp;ssl=1\" data-orig-size=\"800,200\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"320\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/320.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/320.png?fit=510%2C128&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/320.png?resize=510%2C128&#038;ssl=1\" alt=\"320\" width=\"510\" height=\"128\" class=\"aligncenter size-full wp-image-3330\" \/><\/p>\n<pre lang=\"rsplus\">waffle(parts\/10, rows=3, colors=c(\"#969696\", \"#1879bf\", \"#009bda\"), \n       title=\"Health records breaches as fraction of US Population\", \n       xlab=\"One square == 10m ppl\"<\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3331\" data-permalink=\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/attachment\/10\/\" data-orig-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/10.png?fit=800%2C200&amp;ssl=1\" data-orig-size=\"800,200\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"10\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/10.png?fit=300%2C75&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/10.png?fit=510%2C128&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/03\/10.png?resize=510%2C128&#038;ssl=1\" alt=\"10\" width=\"510\" height=\"128\" class=\"aligncenter size-full wp-image-3331\" \/><\/p>\n<p>I'm betting that gets alot <em>bluer<\/em> by the end of the year.<\/p>\n<p>The function returns a ggplot object, so fonts, sizes, etc can all be customized and the source is <a href=\"https:\/\/github.com\/hrbrmstr\/waffle\">up on github<\/a> for all to play with and contribute to.<\/p>\n<p>Along with adding support for filling in the chart as shown in the @eagereyes post, there will also be an <span class=\"removed_link\" title=\"htmlwidgets.org\">htmlwidget<\/span> version coming as well. Standard drill applies: issues\/enhancements to github issues, feedback and your own examples in the comments.<\/p>\n<p><strong>UPDATE<\/strong><\/p>\n<p>Thanks to a PR by @timelyportfolio, there is now a widget option in the package.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: The waffle package (sans JavaScript-y goodness) is up on CRAN so you can do an install.packages(&#8220;waffle&#8221;) and library(waffle) vs the devtools dance. My disdain for pie charts is fairly well-known, but I do concede that there are times one needs to communicate parts of a whole graphically verses using just words or a table. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[24,678,673,674,91],"tags":[810],"class_list":["post-3325","post","type-post","status-publish","format-standard","hentry","category-charts-graphs","category-data-visualization","category-datavis-2","category-dataviz","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Making waffle charts in R (with the new &#039;waffle&#039; package) - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Making waffle charts in R (with the new &#039;waffle&#039; package) - rud.is\" \/>\n<meta property=\"og:description\" content=\"NOTE: The waffle package (sans JavaScript-y goodness) is up on CRAN so you can do an install.packages(&quot;waffle&quot;) and library(waffle) vs the devtools dance. My disdain for pie charts is fairly well-known, but I do concede that there are times one needs to communicate parts of a whole graphically verses using just words or a table. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-03-18T20:44:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-10T12:56:13+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Making waffle charts in R (with the new &#8216;waffle&#8217; package)\",\"datePublished\":\"2015-03-18T20:44:25+00:00\",\"dateModified\":\"2018-03-10T12:56:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\"},\"wordCount\":474,\"commentCount\":17,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg\",\"keywords\":[\"post\"],\"articleSection\":[\"Charts &amp; Graphs\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\",\"url\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\",\"name\":\"Making waffle charts in R (with the new 'waffle' package) - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg\",\"datePublished\":\"2015-03-18T20:44:25+00:00\",\"dateModified\":\"2018-03-10T12:56:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage\",\"url\":\"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg\",\"contentUrl\":\"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Making waffle charts in R (with the new &#8216;waffle&#8217; package)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rud.is\/b\/#website\",\"url\":\"https:\/\/rud.is\/b\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rud.is\/b\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\/\/rud.is\"],\"url\":\"https:\/\/rud.is\/b\/author\/hrbrmstr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Making waffle charts in R (with the new 'waffle' package) - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/","og_locale":"en_US","og_type":"article","og_title":"Making waffle charts in R (with the new 'waffle' package) - rud.is","og_description":"NOTE: The waffle package (sans JavaScript-y goodness) is up on CRAN so you can do an install.packages(\"waffle\") and library(waffle) vs the devtools dance. My disdain for pie charts is fairly well-known, but I do concede that there are times one needs to communicate parts of a whole graphically verses using just words or a table. [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/","og_site_name":"rud.is","article_published_time":"2015-03-18T20:44:25+00:00","article_modified_time":"2018-03-10T12:56:13+00:00","og_image":[{"url":"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg","type":"","width":"","height":""}],"author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Making waffle charts in R (with the new &#8216;waffle&#8217; package)","datePublished":"2015-03-18T20:44:25+00:00","dateModified":"2018-03-10T12:56:13+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/"},"wordCount":474,"commentCount":17,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage"},"thumbnailUrl":"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg","keywords":["post"],"articleSection":["Charts &amp; Graphs","Data Visualization","DataVis","DataViz","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/","url":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/","name":"Making waffle charts in R (with the new 'waffle' package) - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage"},"image":{"@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage"},"thumbnailUrl":"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg","datePublished":"2015-03-18T20:44:25+00:00","dateModified":"2018-03-10T12:56:13+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#primaryimage","url":"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg","contentUrl":"http:\/\/graphics8.nytimes.com\/images\/2008\/07\/20\/business\/20debtgraphic.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Making waffle charts in R (with the new &#8216;waffle&#8217; package)"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-RD","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3340,"url":"https:\/\/rud.is\/b\/2015\/03\/20\/fixing-colors-proportions-in-jerusalem-post-election-graphics\/","url_meta":{"origin":3325,"position":0},"title":"Fixing Colors &#038; Proportions in Jerusalem Post Election Graphics","author":"hrbrmstr","date":"2015-03-20","format":false,"excerpt":"Vis expert Naomi Robbins did an excellent [critique](http:\/\/www.forbes.com\/sites\/naomirobbins\/2015\/03\/19\/color-problems-with-figures-from-the-jerusalem-post\/) of the [graphics](http:\/\/www.jpost.com\/Israel-Elections\/Analysis-The-Israel-election-decided-by-one-vote-394229) that went along with an article on Israeli election in the Jerusalem Post. Non-uniform and color-blind-unfriendly categorical colors and disproportionate arc sizes are definitely three substantial issues in that series of visualizations. We can rectify all of them with\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":12403,"url":"https:\/\/rud.is\/b\/2019\/07\/12\/quick-hit-waffle-1-0-font-awesome-5-pictograms-and-more\/","url_meta":{"origin":3325,"position":1},"title":"Quick Hit: {waffle} 1.0 Font Awesome 5 Pictograms and More","author":"hrbrmstr","date":"2019-07-12","format":false,"excerpt":"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. A major new\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"Isotype pictogram of food","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/07\/noms.png?fit=624%2C495&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/07\/noms.png?fit=624%2C495&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/07\/noms.png?fit=624%2C495&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":12700,"url":"https:\/\/rud.is\/b\/2020\/03\/26\/the-waffle-house-index\/","url_meta":{"origin":3325,"position":2},"title":"The Waffle House Index","author":"hrbrmstr","date":"2020-03-26","format":false,"excerpt":"Waffle House announced it was closing hundreds of stores this week due to SARS-Cov-2 (a.k.a COVID-19). This move garnered quite a bit of media attention since former FEMA Administrator Craig Fugate used the restaurant chain as both an indicator of the immediate and overall severity of a natural disaster. [He's\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/wh-map-2.png?fit=1200%2C1121&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/wh-map-2.png?fit=1200%2C1121&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/wh-map-2.png?fit=1200%2C1121&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/wh-map-2.png?fit=1200%2C1121&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2020\/03\/wh-map-2.png?fit=1200%2C1121&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3352,"url":"https:\/\/rud.is\/b\/2015\/03\/26\/pre-cran-waffle-update-isotype-pictograms\/","url_meta":{"origin":3325,"position":3},"title":"Pre-CRAN waffle update &#8211; isotype pictograms","author":"hrbrmstr","date":"2015-03-26","format":false,"excerpt":"It seems Ruben C. Arslan had the waffle idea about the same time I did. Apart from some extra spiffy XKCD-like styling, one other thing his waffling routines allowed for was using FontAwesome icons. When you use an icon vs a block, you are really making a basic version of\u2026","rel":"","context":"In &quot;Data Visualization&quot;","block_context":{"text":"Data Visualization","link":"https:\/\/rud.is\/b\/category\/data-visualization\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9078,"url":"https:\/\/rud.is\/b\/2018\/03\/12\/steeling-tariffic\/","url_meta":{"origin":3325,"position":4},"title":"Steel-ing a Makeover from Tariffic Post","author":"hrbrmstr","date":"2018-03-12","format":false,"excerpt":"(FWIW I think I even caused myself pain due to the title of this blog post). Kaiser Fung (@junkcharts) did a makeover post on this chart about U.S. steel tariffs: Kaiser's makeover is good (Note: just because I said \"good\" does not mean I'm endorsing the use of pie charts):\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/plot_zoom_png.png?fit=1153%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/plot_zoom_png.png?fit=1153%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/plot_zoom_png.png?fit=1153%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/plot_zoom_png.png?fit=1153%2C1200&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2018\/03\/plot_zoom_png.png?fit=1153%2C1200&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":11746,"url":"https:\/\/rud.is\/b\/2019\/01\/10\/waffle-geoms-other-miscellaneous-in-development-package-updates\/","url_meta":{"origin":3325,"position":5},"title":"Waffle Geoms &#038; Other Miscellaneous In-Development Package Updates","author":"hrbrmstr","date":"2019-01-10","format":false,"excerpt":"More than just sergeant has been hacked on recently, so here's a run-down of various ? updates: waffle The square pie chart generating waffle? package now contains a nascent geom_waffle() so you can do things like this: library(hrbrthemes) library(waffle) library(tidyverse) tibble( parts = factor(rep(month.abb[1:3], 3), levels=month.abb[1:3]), values = c(10, 20,\u2026","rel":"","context":"In &quot;R&quot;","block_context":{"text":"R","link":"https:\/\/rud.is\/b\/category\/r\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/fwg.png?fit=900%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/fwg.png?fit=900%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/fwg.png?fit=900%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2019\/01\/fwg.png?fit=900%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=3325"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3325\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}