

{"id":3243,"date":"2015-02-01T10:34:18","date_gmt":"2015-02-01T15:34:18","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3243"},"modified":"2018-03-07T16:44:05","modified_gmt":"2018-03-07T21:44:05","slug":"new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","title":{"rendered":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &#038; rollovers"},"content":{"rendered":"<p>I&#8217;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 the plots.<\/p>\n<p>### The Grid<\/p>\n<p>The `grid.arrange` (and `arrangeGrob`) functions from the `gridExtra` package come in handy when combining `ggplot2` charts. I wanted a similar way to arrange independent or linked `metricsgraphics` charts, hence `mjs_grid` was born. <\/p>\n<p>`mjs_grid` uses the tag functions in `htmltools` to arrange `metricsgraphics` plot objects into an HTML `<\/p>\n<table>` structure. At present, only uniform tables are supported, but I&#8217;m working on making the grid feature more flexible (just like `grid.arrange`). The current functionality is pretty straightforward:<\/p>\n<p>&#8211; You build individual `metricsgraphics` plots;<br \/>\n&#8211; Optionally combine them in a `list`;<br \/>\n&#8211; Pass in the plots\/lists into `mjs_grid`;<br \/>\n&#8211; Tell `mjs_grid` how many rows &#038; columns are in the grid; and<br \/>\n&#8211; Specify the column widths<\/p>\n<p>But, code > words, so here are some examples. To avoid code repetition, note that you&#8217;ll need the following packages available to run most of the snippets below:<\/p>\n<pre lang=\"rsplus\">library(metricsgraphics)\r\nlibrary(htmlwidgets)\r\nlibrary(htmltools)\r\nlibrary(dplyr)<\/pre>\n<p>First, we&#8217;ll combine a few example plots:<\/p>\n<pre lang=\"rsplus\">tmp <- data.frame(year=seq(1790, 1970, 10), uspop=as.numeric(uspop))\r\ntmp %>%\r\n  mjs_plot(x=year, y=uspop, width=300, height=300) %>%\r\n  mjs_line() %>%\r\n  mjs_add_marker(1850, \"Something Wonderful\") %>%\r\n  mjs_add_baseline(150, \"Something Awful\") -> mjs1\r\n\r\nmjs_plot(rnorm(10000), width=300, height=300) %>%\r\n  mjs_histogram(bins=30, bar_margin=1) -> mjs2\r\n\r\nmovies <- ggplot2::movies[sample(nrow(ggplot2::movies), 1000), ]\r\nmjs_plot(movies$rating, width=300, height=300) %>% mjs_histogram() -> mjs3\r\n\r\ntmp %>%\r\n  mjs_plot(x=year, y=uspop, width=300, height=300) %>%\r\n  mjs_line(area=TRUE) -> mjs4\r\n\r\nmjs_grid(mjs1, mjs2, mjs3, mjs4, ncol=2, nrow=2)<\/pre>\n<p><iframe scrolling=\"no\" frameBorder=\"0\" seamless=\"seamless\" src=\"\/b\/iframes\/gridex\/ex1.html\" height=600 width=650><\/iframe><\/p>\n<p>Since your can pass a `list` as a parameter, you can generate many (similar) plots and then grid-display them without too much code. This one generates 7 random histograms with linked rollovers and displays them in grid. Note that this example has `mjs_grid` using the same algorithm `grid.arrange` does for auto-computing &#8220;optimal&#8221; grid size.<\/p>\n<pre lang=\"rsplus\">lapply(1:7, function(x) {\r\n  mjs_plot(rnorm(10000, mean=x\/2, sd=x), width=250, height=250, linked=TRUE) %>%\r\n    mjs_histogram(bar_margin=2) %>%\r\n    mjs_labs(x_label=sprintf(\"Plot %d\", x))\r\n}) -> plots\r\n\r\nmjs_grid(plots)<\/pre>\n<p><iframe loading=\"lazy\" scrolling=\"no\" frameBorder=\"0\" seamless=\"seamless\" src=\"\/b\/iframes\/gridex\/ex2.html\" height=\"620\" width=\"700\"><\/iframe><\/p>\n<p>And, you can use `do` from `dplyr` to get `ggplot2` `facet_`-like behavior (though, one could argue that interactive graphics should use controls\/selectors vs facets). This example uses the `tips` dataset from `reshape2` and creates a list of plots that are then passed to `mjs_grid`:<\/p>\n<pre lang=\"rsplus\">tips <- reshape2::tips\r\na <- tips %>%\r\n  mutate(percent=tip\/total_bill,\r\n         day=factor(day, levels=c(\"Thur\", \"Fri\", \"Sat\", \"Sun\"), ordered=TRUE)) %>%\r\n  group_by(day) %>%\r\n  do( plot={ day_label <- unique(.$day)\r\n             mjs_plot(., x=total_bill, y=percent, width=275, height=275, left=100) %>%\r\n               mjs_point(color_accessor=sex, color_type=\"category\") %>%\r\n               mjs_labs(x_label=sprintf(\"Total Bill (%s)\", day_label), y_label=\"Tip %\") })\r\n\r\nmjs_grid(a$plot, ncol=2, nrow=2, widths=c(0.5, 0.5))<\/pre>\n<p><iframe scrolling=\"no\" frameBorder=\"0\" seamless=\"seamless\" src=\"\/b\/iframes\/gridex\/ex3.html\" height=600 width=650><\/iframe><\/p>\n<p>### Rollovers<\/p>\n<p>I&#8217;ve had a few requests to support the use of different rollovers and this is a first stab at exposing MetricsGraphics&#8217; native functionality to users of the `metricsgraphics` package. The API changed from MG 1.1.0 to 2.2.0, so I&#8217;m _kinda_ glad I waited for this. It requires knowledge of javascript, D3 and the use of `{{ID}}` as part of the CSS node selector when targeting the MetricsGraphics SVG element that displays the rollover text. Here is a crude, but illustrative example of how to take advantage of this feature (mouseover the graphics to see the altered text):<\/p>\n<pre lang=\"rsplus\">\r\nset.seed(1492)\r\ndat <- data.frame(date=seq(as.Date(\"2014-01-01\"),\r\n                           as.Date(\"2014-01-31\"),\r\n                           by=\"1 day\"),\r\n                  value=rnorm(n=31, mean=0, sd=2))\r\n\r\ndat %>%\r\n  mjs_plot(x=date, y=value, width=500, height=300) %>%\r\n  mjs_line() %>%\r\n  mjs_axis_x(xax_format = \"date\") %>%\r\n  mjs_add_mouseover(\"function(d, i) {\r\n                $('{{ID}} svg .mg-active-datapoint')\r\n                    .text('custom text : ' + d.date + ' ' + i);\r\n                 }\")<\/pre>\n<p><iframe scrolling=\"no\" frameBorder=\"0\" seamless=\"seamless\" src=\"\/b\/iframes\/gridex\/ex4.html\" height=300 width=650><\/iframe><\/p>\n<p>### Postremo<\/p>\n<p>If you are using `metricsgraphics`, drop a link in the comments here to show others how you&#8217;re using it! If you need\/want some functionality (I&#8217;m hoping to get `xts` support into the 0.8 release) that isn&#8217;t already in existing feature requests or something&#8217;s broken for you, post a new [issue on github](https:\/\/github.com\/hrbrmstr\/metricsgraphics\/issues).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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 the plots. ### The Grid [&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":[24,666,678,673,674,36,91],"tags":[810],"class_list":["post-3243","post","type-post","status-publish","format-standard","hentry","category-charts-graphs","category-d3","category-data-visualization","category-datavis-2","category-dataviz","category-html5","category-r","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>New release (0.7) of metricsgraphics htmlwidget \u2014 grids &amp; rollovers - 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\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &amp; rollovers - rud.is\" \/>\n<meta property=\"og:description\" content=\"I&#8217;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 the plots. ### The Grid [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-01T15:34:18+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\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &#038; rollovers\",\"datePublished\":\"2015-02-01T15:34:18+00:00\",\"dateModified\":\"2018-03-07T21:44:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/\"},\"wordCount\":497,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"keywords\":[\"post\"],\"articleSection\":[\"Charts &amp; Graphs\",\"d3\",\"Data Visualization\",\"DataVis\",\"DataViz\",\"HTML5\",\"R\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/\",\"name\":\"New release (0.7) of metricsgraphics htmlwidget \u2014 grids & rollovers - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2015-02-01T15:34:18+00:00\",\"dateModified\":\"2018-03-07T21:44:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2015\\\/02\\\/01\\\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &#038; rollovers\"}]},{\"@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":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids & rollovers - 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\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","og_locale":"en_US","og_type":"article","og_title":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids & rollovers - rud.is","og_description":"I&#8217;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 the plots. ### The Grid [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","og_site_name":"rud.is","article_published_time":"2015-02-01T15:34:18+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\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &#038; rollovers","datePublished":"2015-02-01T15:34:18+00:00","dateModified":"2018-03-07T21:44:05+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/"},"wordCount":497,"commentCount":2,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"keywords":["post"],"articleSection":["Charts &amp; Graphs","d3","Data Visualization","DataVis","DataViz","HTML5","R"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","url":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","name":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids & rollovers - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2015-02-01T15:34:18+00:00","dateModified":"2018-03-07T21:44:05+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"New release (0.7) of metricsgraphics htmlwidget \u2014 grids &#038; rollovers"}]},{"@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-Qj","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3493,"url":"https:\/\/rud.is\/b\/2015\/07\/05\/two-pending-features-to-metricsgraphics\/","url_meta":{"origin":3243,"position":0},"title":"Two pending features to metricsgraphics","author":"hrbrmstr","date":"2015-07-05","format":false,"excerpt":"I've been slowly prodding the [metricsgraphics package](https:\/\/github.com\/hrbrmstr\/metricsgraphics\/) towards a 1.0.0 release, but there are some rough edges that still need sorting out. One of them is the ability to handle passing in variables for the `x` & `y` accessor values (you _can_ pass in bare and quoted strings). This can\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":3460,"url":"https:\/\/rud.is\/b\/2015\/06\/15\/metricsgraphics-0-8-5-is-now-on-cran\/","url_meta":{"origin":3243,"position":1},"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":3194,"url":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/","url_meta":{"origin":3243,"position":2},"title":"New R Package: metricsgraphics","author":"hrbrmstr","date":"2015-01-08","format":false,"excerpt":"Mozilla released the [MetricsGraphics.js library](http:\/\/metricsgraphicsjs.org\/) back in November of 2014 ([gh repo](https:\/\/github.com\/mozilla\/metrics-graphics)) and was greeted with great fanfare. It's primary focus is on crisp, clean layouts for interactive time-series data, but they have support for other chart types as well (though said support is far from comprehensive). I had been\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":3827,"url":"https:\/\/rud.is\/b\/2015\/12\/21\/update-to-metricsgraphics-0-9-0-now-on-cran\/","url_meta":{"origin":3243,"position":3},"title":"Update to metricsgraphics 0.9.0 (now on CRAN)","author":"hrbrmstr","date":"2015-12-21","format":false,"excerpt":"It's been a while since I've updated my [metricsgraphics package](https:\/\/cran.r-project.org\/web\/packages\/metricsgraphics\/index.html). The hit list for changes includes: - Fixes for the new ggplot2 release (metricsgraphics uses the `movies` data set which is now in ggplot2movies) - Updated all javascript libraries to the most recent versions - Borrowed the ability to add\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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/Google-ChromeScreenSnapz001.png?fit=813%2C539&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/Google-ChromeScreenSnapz001.png?fit=813%2C539&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/Google-ChromeScreenSnapz001.png?fit=813%2C539&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2015\/12\/Google-ChromeScreenSnapz001.png?fit=813%2C539&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3364,"url":"https:\/\/rud.is\/b\/2015\/03\/30\/3364\/","url_meta":{"origin":3243,"position":4},"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":3278,"url":"https:\/\/rud.is\/b\/2015\/02\/15\/introducing-the-streamgraph-htmlwidget-r-pacakge\/","url_meta":{"origin":3243,"position":5},"title":"Introducing the streamgraph htmlwidget R Package","author":"hrbrmstr","date":"2015-02-15","format":false,"excerpt":"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\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":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3243","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=3243"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3243\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}