

{"id":3278,"date":"2015-02-15T11:54:37","date_gmt":"2015-02-15T16:54:37","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3278"},"modified":"2018-03-07T16:44:05","modified_gmt":"2018-03-07T21:44:05","slug":"introducing-the-streamgraph-htmlwidget-r-pacakge","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/","title":{"rendered":"Introducing the streamgraph htmlwidget R Package"},"content":{"rendered":"<p>We were looking for a different type of visualization for a project at work this past week and my thoughts immediately gravitated towards [streamgraphs](http:\/\/www.leebyron.com\/else\/streamgraph\/). The TLDR on streamgraphs is they they are generalized versions of stacked area graphs with free baselines across the x axis. They are somewhat [controversial](http:\/\/www.visualisingdata.com\/index.php\/2010\/08\/making-sense-of-streamgraphs\/) but have a &#8220;draw you in&#8221; aesthetic appeal (which is what we needed for our visualization).<\/p>\n<p>You can make streamgraphs\/stacked area charts pretty easily in D3, and since we needed to try many different sets of data in the streamgraph style, it made sense to make this an R [htmlwidget](http:\/\/www.htmlwidgets.org\/). Thus, the [streamgraph package](https:\/\/github.com\/hrbrmstr\/streamgraph) was born.<\/p>\n<p>### Making a streamgraph<\/p>\n<p>The package isn&#8217;t in CRAN yet, so you have to do the `devtools` dance:<\/p>\n<pre lang=\"rsplus\">devtools::install_github(\"hrbrmstr\/streamgraph\")<\/pre>\n<p>Streamgraphs require a continuous variable for the x axis, and the `streamgraph` widget\/package works with years or dates (support for `xts` objects and `POSIXct` types coming soon). Since they display categorical values in the area regions, the data in R needs to be in [long format](http:\/\/blog.rstudio.org\/2014\/07\/22\/introducing-tidyr\/) which is easy to do with `dplyr` &#038; `tidyr`.<\/p>\n<p>The package recognizes when years are being used and does all the necessary conversions for you. It also uses a technique similar to `expand.grid` to ensure all categories are represented at every observation (not doing so makes `d3.stack` unhappy).<\/p>\n<p>Let&#8217;s start by making a `streamgraph` of the number of movies made per year by genre using the `ggplot2` `movies` dataset:<\/p>\n<pre lang=\"rsplus\">library(streamgraph)\r\nlibrary(dplyr)\r\n\r\nggplot2::movies %>%\r\n  select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>%\r\n  tidyr::gather(genre, value, -year) %>%\r\n  group_by(year, genre) %>%\r\n  tally(wt=value) %>%\r\n  streamgraph(\"genre\", \"n\", \"year\") %>%\r\n  sg_axis_x(20) %>%\r\n  sg_fill_brewer(\"PuOr\") %>%\r\n  sg_legend(show=TRUE, label=\"Genres: \")<\/pre>\n<p><center><b>Movie count by genre by year<\/b><iframe loading=\"lazy\" style=\"max-width=100%\" src=\"\/b\/sg\/one.html\" sandbox=\"allow-same-origin allow-scripts\" width=\"100%\" height=\"400\" scrolling=\"no\" seamless=\"seamless\" frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>We can also mimic an example from the [Name Voyager](http:\/\/www.bewitched.com\/namevoyager.html) project (using the `babynames` R package) but change some of the aesthetics, just to give an idea of how some of the options work:<\/p>\n<pre lang=\"rsplus\">library(dplyr)\r\nlibrary(babynames)\r\nlibrary(streamgraph)\r\n\r\nbabynames %>%\r\n filter(grepl(\"^(Alex|Bob|Jay|David|Mike|Jason|Stephen|Kymberlee|Lane|Sophie|John|Andrew|Thibault|Russell)$\", name)) %>%\r\n  group_by(year, name) %>%\r\n  tally(wt=n) %>%\r\n  streamgraph(\"name\", \"n\", \"year\", offset=\"zero\", interpolate=\"linear\") %>%\r\n  sg_legend(show=TRUE, label=\"DDSec names: \")<\/pre>\n<p><center><b>Data-Driven Security Podcast guest+host names by year<\/b><iframe loading=\"lazy\" style=\"max-width=100%\" src=\"\/b\/sg\/two.html\" sandbox=\"allow-same-origin allow-scripts\" width=\"100%\" height=\"400\" scrolling=\"no\" seamless=\"seamless\" frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>There are  more examples over at [RPubs](http:\/\/rpubs.com\/hrbrmstr\/streamgraph04) and [github](http:\/\/hrbrmstr.github.io\/streamgraph\/), but I&#8217;ll close with a streamgraph of housing data originally made by [Alex Bresler](http:\/\/asbcllc.com\/blog\/2015\/february\/cre_stream_graph_test\/):<\/p>\n<pre lang=\"rsplus\">dat <- read.csv(\"http:\/\/asbcllc.com\/blog\/2015\/february\/cre_stream_graph_test\/data\/cre_transaction-data.csv\")\r\n\r\ndat %>%\r\n  streamgraph(\"asset_class\", \"volume_billions\", \"year\") %>%\r\n  sg_axis_x(1, \"year\", \"%Y\") %>%\r\n  sg_fill_brewer(\"PuOr\") %>%\r\n  sg_legend(show=TRUE, label=\"Assets: \")<\/pre>\n<p><center><b>Commercial Real Estate Transaction Volume by Asset Class Since 2006<\/b><iframe loading=\"lazy\" style=\"max-width=100%\" src=\"\/b\/sg\/three.html\" sandbox=\"allow-same-origin allow-scripts\" width=\"100%\" height=\"400\" scrolling=\"no\" seamless=\"seamless\" frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>While the radical volume change would have been noticeable in almost any graph style, it&#8217;s especially noticeable with the streamgraph version as your eyes tend to naturally follow the curves of the flow.<\/p>\n<p>### Fin<\/p>\n<p>While I wouldn&#8217;t have these replace my trusty ggplot2 faceted bar charts for regular EDA and reporting, streamgraphs can add a bit of color and flair, and may be an especially good choice when you need to view many categorical variables over time.<\/p>\n<p>As usual, issues\/feature requests on [github](http:\/\/github.com\/hrbrmstr\/streamgraph) and showcase\/general feedback in the comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We were looking for a different type of visualization for a project at work this past week and my thoughts immediately gravitated towards [streamgraphs](http:\/\/www.leebyron.com\/else\/streamgraph\/). The TLDR on streamgraphs is they they are generalized versions of stacked area graphs with free baselines across the x axis. They are somewhat [controversial](http:\/\/www.visualisingdata.com\/index.php\/2010\/08\/making-sense-of-streamgraphs\/) but have a &#8220;draw you in&#8221; [&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":false,"_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":[666,678,673,674,91],"tags":[810],"class_list":["post-3278","post","type-post","status-publish","format-standard","hentry","category-d3","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>Introducing the streamgraph htmlwidget R 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\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introducing the streamgraph htmlwidget R Package - rud.is\" \/>\n<meta property=\"og:description\" content=\"We were looking for a different type of visualization for a project at work this past week and my thoughts immediately gravitated towards [streamgraphs](http:\/\/www.leebyron.com\/else\/streamgraph\/). The TLDR on streamgraphs is they they are generalized versions of stacked area graphs with free baselines across the x axis. They are somewhat [controversial](http:\/\/www.visualisingdata.com\/index.php\/2010\/08\/making-sense-of-streamgraphs\/) but have a &#8220;draw you in&#8221; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-15T16:54:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-07T21:44:05+00:00\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Introducing the streamgraph htmlwidget R Package\",\"datePublished\":\"2015-02-15T16:54:37+00:00\",\"dateModified\":\"2018-03-07T21:44:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\"},\"wordCount\":479,\"commentCount\":17,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"keywords\":[\"post\"],\"articleSection\":[\"d3\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\",\"url\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\",\"name\":\"Introducing the streamgraph htmlwidget R Package - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"datePublished\":\"2015-02-15T16:54:37+00:00\",\"dateModified\":\"2018-03-07T21:44:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introducing the streamgraph htmlwidget R 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":"Introducing the streamgraph htmlwidget R 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\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/","og_locale":"en_US","og_type":"article","og_title":"Introducing the streamgraph htmlwidget R Package - rud.is","og_description":"We were looking for a different type of visualization for a project at work this past week and my thoughts immediately gravitated towards [streamgraphs](http:\/\/www.leebyron.com\/else\/streamgraph\/). The TLDR on streamgraphs is they they are generalized versions of stacked area graphs with free baselines across the x axis. They are somewhat [controversial](http:\/\/www.visualisingdata.com\/index.php\/2010\/08\/making-sense-of-streamgraphs\/) but have a &#8220;draw you in&#8221; [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/","og_site_name":"rud.is","article_published_time":"2015-02-15T16:54:37+00:00","article_modified_time":"2018-03-07T21:44:05+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Introducing the streamgraph htmlwidget R Package","datePublished":"2015-02-15T16:54:37+00:00","dateModified":"2018-03-07T21:44:05+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/"},"wordCount":479,"commentCount":17,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"keywords":["post"],"articleSection":["d3","Data Visualization","DataVis","DataViz","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/","url":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/","name":"Introducing the streamgraph htmlwidget R Package - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2015-02-15T16:54:37+00:00","dateModified":"2018-03-07T21:44:05+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Introducing the streamgraph htmlwidget R 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-QS","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3302,"url":"https:\/\/rud.is\/b\/2015\/03\/12\/streamgraph-htmlwidget-version-0-7-released-adds-support-for-markers-annotations\/","url_meta":{"origin":3278,"position":0},"title":"Streamgraph htmlwidget version 0.7 released (adds support for markers &#038; annotations)","author":"hrbrmstr","date":"2015-03-12","format":false,"excerpt":"In preparation for using some of our streamgraphs for production (PDF\/print) graphics, I ended up having to hand-edit labels in on one of the graphics in an Adobe product. This bumped up the priority on adding annotation functions to the streamgraph package (you really don't want to have to hand-edit\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3292,"url":"https:\/\/rud.is\/b\/2015\/03\/07\/streamgraph-package-now-supports-continuous-x-axis-scale\/","url_meta":{"origin":3278,"position":1},"title":"Streamgraph package now supports continuous x axis scale","author":"hrbrmstr","date":"2015-03-07","format":false,"excerpt":"A post on [StackOverflow](http:\/\/stackoverflow.com\/questions\/28725604\/streamgraphs-dataviz-in-r-wont-plot) asked about using a continuous variable for the x-axis (vs dates) in my [streamgraph package](http:\/\/github.com\/hrbrmstr\/streamgraph). While I provided a workaround for the question, it helped me bump up the priority for adding support for continuous x axis scales. With the [DBIR](http:\/\/www.verizonenterprise.com\/DBIR\/) halfway behind me now, I\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":3364,"url":"https:\/\/rud.is\/b\/2015\/03\/30\/3364\/","url_meta":{"origin":3278,"position":2},"title":"A look at airline crashes in R with googlesheets, dplyr &#038; ggplot2","author":"hrbrmstr","date":"2015-03-30","format":false,"excerpt":"Over on The DO Loop, @RickWicklin does a nice job [visualizing the causes of airline crashes](http:\/\/blogs.sas.com\/content\/iml\/2015\/03\/30\/visualizing-airline-crashes\/) in SAS using a mosaic plot. More often than not, I find mosaic plots can be a bit difficult to grok, but Rick's use was spot on and I believe it shows the data\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":3977,"url":"https:\/\/rud.is\/b\/2016\/02\/27\/create-vega-lite-specs-widgets-with-the-vegalite-package\/","url_meta":{"origin":3278,"position":3},"title":"Create Vega-Lite specs &#038; widgets with the vegalite package","author":"hrbrmstr","date":"2016-02-27","format":false,"excerpt":"[Vega-Lite](http:\/\/vega.github.io\/vega-lite\/) 1.0 was [released this past week](https:\/\/medium.com\/@uwdata\/introducing-vega-lite-438f9215f09e#.yfkl0tp1c). I had been meaning to play with it for a while but I've been burned before by working with unstable APIs and was waiting for this to bake to a stable release. Thankfully, there were no new shows in the Fire TV, Apple\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/gallery.png?fit=1200%2C595&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/gallery.png?fit=1200%2C595&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/gallery.png?fit=1200%2C595&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/gallery.png?fit=1200%2C595&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/02\/gallery.png?fit=1200%2C595&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3460,"url":"https:\/\/rud.is\/b\/2015\/06\/15\/metricsgraphics-0-8-5-is-now-on-cran\/","url_meta":{"origin":3278,"position":4},"title":"metricsgraphics 0.8.5 is now on CRAN!","author":"hrbrmstr","date":"2015-06-15","format":false,"excerpt":"I'm super-pleased to announce that the Benevolent CRAN Overlords [accepted the metricsgraphics package](http:\/\/cran.r-project.org\/web\/packages\/metricsgraphics\/index.html) into CRAN over the weekend. Now, you no longer need to rely on github\/devtools to use [MetricsGraphics.js](http:\/\/metricsgraphicsjs.org\/) charts from your R scripts. If you're not familiar with `htmlwidgets`, take a look at [the official site for them](http:\/\/www.htmlwidgets.org\/).\u2026","rel":"","context":"In &quot;d3&quot;","block_context":{"text":"d3","link":"https:\/\/rud.is\/b\/category\/d3\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3243,"url":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","url_meta":{"origin":3278,"position":5},"title":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &#038; rollovers","author":"hrbrmstr","date":"2015-02-01","format":false,"excerpt":"I've updated my [metricsgraphics](https:\/\/github.com\/hrbrmstr\/metricsgraphics) package to version [0.7](https:\/\/github.com\/hrbrmstr\/metricsgraphics\/releases\/tag\/v0.7). The core [MetricsGraphics](http:\/\/metricsgraphicsjs.org) JavaScript library has been updated to version 2.1.0 (from 1.1.0). Two blog-worthy features since releasing version 0.5 are `mjs_grid` (which is a `grid.arrange`-like equivalent for `metricsgraphics` plots and `mjs_add_rollover` which lets you add your own custom rollover text to\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":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3278","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=3278"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3278\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}