

{"id":3194,"date":"2015-01-08T16:50:52","date_gmt":"2015-01-08T21:50:52","guid":{"rendered":"http:\/\/rud.is\/b\/?p=3194"},"modified":"2018-03-07T16:44:05","modified_gmt":"2018-03-07T21:44:05","slug":"new-r-package-metricsgraphics","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/","title":{"rendered":"New R Package: metricsgraphics"},"content":{"rendered":"<p>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&#8217;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).<\/p>\n<p>I had been pondering building an R package to help generate these charts when Ramnath Vaidyanathan, Kenton Russell &amp; JJ Allaire came up with the insanely awesome [htmlwidgets](http:\/\/www.htmlwidgets.org\/) R package, which is the best javascript<->R bridge to-date. Here&#8217;s a quick take on how to make a basic line chart before going into some package (and MetricsGraphics) details:<\/p>\n<pre lang=\"rsplus\">library(metricsgraphics)\r\n\r\ntmp <- data.frame(year=seq(1790, 1970, 10), uspop=as.numeric(uspop))\r\n\r\ntmp %>%\r\n  mjs_plot(x=year, y=uspop) %>%\r\n  mjs_line() %>%\r\n  mjs_add_marker(1850, \"Something Wonderful\") %>%\r\n  mjs_add_baseline(150, \"Something Awful\")<\/pre>\n<p><center><b>Example of Basic MetricsGrahpics Chart<\/b><iframe loading=\"lazy\" style=\"max-width=100%\" src=\"\/b\/mjs\/1.html\" sandbox=\"allow-same-origin allow-scripts\" width=\"100%\" height=\"350\" scrolling=\"no\" seamless=\"seamless\" frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>One of the package goals (which should be evident from the example) is that it had to conform to the new &#8220;piping&#8221; idiom, made popular through the [magrittr](https:\/\/github.com\/smbache\/magrittr), [ggvis](http:\/\/ggvis.rstudio.com\/) and [dplyr](http:\/\/github.com\/dplyr) packages. This made it possible to avoid one function with a ton of parameters and help break out the chart building into logical steps. While it may not have the flexibility of `ggplot2`, you can do some neat things with MetricsGraphics charts, like use multiple lines:<\/p>\n<pre lang=\"rsplus\">set.seed(1492)\r\nstocks <- data.frame(\r\n  time = as.Date('2009-01-01') + 0:9,\r\n  X = rnorm(10, 0, 1),\r\n  Y = rnorm(10, 0, 2),\r\n  Z = rnorm(10, 0, 4))\r\n\r\nstocks %>%\r\n  mjs_plot(x=time, y=X, width=500, height=350) %>%\r\n  mjs_line() %>%\r\n  mjs_add_line(Y) %>%\r\n  mjs_add_line(Z) %>%\r\n  mjs_axis_x(xax_format=\"date\") %>%\r\n  mjs_add_legend(c(\"X\", \"Y\", \"Z\"))<\/pre>\n<p><center><b>Stocks X, Y &#038; Z over time<\/b><iframe loading=\"lazy\" style=\"max-width=100%\" src=\"\/b\/mjs\/2.html\" sandbox=\"allow-same-origin allow-scripts\" width=\"100%\" height=\"450\" scrolling=\"no\" seamless=\"seamless\" frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>and, pretty configurable scatterplots:<\/p>\n<pre lang=\"rsplus\">library(RColorBrewer)\r\n\r\nmtcars %>%\r\n  mjs_plot(x=wt, y=mpg, width=500, height=350) %>%\r\n  mjs_point(color_accessor=cyl,\r\n            x_rug=TRUE, y_rug=TRUE,\r\n            size_accessor=carb,\r\n            size_range=c(5, 10),\r\n            color_type=\"category\",\r\n            color_range=brewer.pal(n=11, name=\"RdBu\")[c(1, 5, 11)]) %>%\r\n  mjs_labs(x=\"Weight of Car\", y=\"Miles per Gallon\")<\/pre>\n<p><center><b>Motor Trend Cars &#8211; mpg~wt<\/b><iframe loading=\"lazy\" style=\"max-width=100%\" src=\"\/b\/mjs\/3.html\" sandbox=\"allow-same-origin allow-scripts\" width=\"100%\" height=\"350\" scrolling=\"no\" seamless=\"seamless\" frameBorder=\"0\"><\/iframe><\/center><\/p>\n<p>The `htmlwidgets` developers go into [great detail](http:\/\/www.htmlwidgets.org\/develop_intro.html) on how to create a widget, but there are some central points I&#8217;ll cover and potentially reiterate. <\/p>\n<p>First, use the `htmlwidgets::scaffoldWidget` that `htmlwidgets` provides to kickstart your project. It&#8217;ll setup the essentials and free your time up to work on the interface components. You will need to edit the generated `yaml` file to use the minified javascript files for things like jquery or d3 since Chrome will be unhappy if you don&#8217;t.<\/p>\n<p>Next, remember that all you&#8217;re doing is building an R object with data to be passed into a javascript function\/environment. MetricsGraphics made this a bit easier for me since the main graphic configuration is one, giant parameter list (take a look at the `metricsgraphics.js` source in github). <\/p>\n<p>Third, if you need to customize the html generation function in the main `packagename_html` file, ensure you pass in `class` to the main `div` element. I was very pleased to discover that you can return a list of HTML elements vs  a single one:<\/p>\n<pre lang=\"rsplus\">metricsgraphics_html <- function(id, style, class, ...) {\r\n  list(tags$div(id = id, class = class, style=style),\r\n       tags$div(id = sprintf(\"%s-legend\", id), class = sprintf(\"%s-legend\", class)))\r\n}<\/pre>\n<p>and that may eventually enable support for facet-like functionality without manually creating multiple plots.<\/p>\n<p>Fourth, try to build around the piping idiom. It makes it so much easier to add parameters and manage the data environment. <\/p>\n<p>Fifth, use `iframe`s for embedding your visualizations in other documents (like this blog post). It avoids potential namespace collisions and frees you from having to cut\/paste HTML from one doc to another.<\/p>\n<p>And, lastly, remember that you can generate your own `elementId` in the event you need to use it with your javascript visualization library (like I had to).<\/p>\n<p>Currently, `metricsgraphics` is at 0.4.1 and has support for most of the basic chart types along with linking charts (in `Rmd` files). You can install it from the [github repo](https:\/\/github.com\/hrbrmstr\/metricsgraphics) and make sure to file all issues or feature requests there. If you make something with it like @abresler [did](http:\/\/asbcllc.com\/blog\/2015\/January\/ww2_tanks\/), drop a note in the comments!<\/p>\n<p>Now, go forth and wrap some libraries!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;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 pondering building an R package [&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,673,674,91,699],"tags":[810],"class_list":["post-3194","post","type-post","status-publish","format-standard","hentry","category-charts-graphs","category-d3","category-datavis-2","category-dataviz","category-r","category-rstudio","tag-post"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>New R Package: metricsgraphics - 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\/01\/08\/new-r-package-metricsgraphics\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New R Package: metricsgraphics - rud.is\" \/>\n<meta property=\"og:description\" content=\"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&#8217;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 pondering building an R package [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-08T21:50:52+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\/01\/08\/new-r-package-metricsgraphics\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"New R Package: metricsgraphics\",\"datePublished\":\"2015-01-08T21:50:52+00:00\",\"dateModified\":\"2018-03-07T21:44:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/\"},\"wordCount\":589,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886\"},\"keywords\":[\"post\"],\"articleSection\":[\"Charts &amp; Graphs\",\"d3\",\"DataVis\",\"DataViz\",\"R\",\"RStudio\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/\",\"url\":\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/\",\"name\":\"New R Package: metricsgraphics - rud.is\",\"isPartOf\":{\"@id\":\"https:\/\/rud.is\/b\/#website\"},\"datePublished\":\"2015-01-08T21:50:52+00:00\",\"dateModified\":\"2018-03-07T21:44:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rud.is\/b\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"New R Package: metricsgraphics\"}]},{\"@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 R Package: metricsgraphics - 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\/01\/08\/new-r-package-metricsgraphics\/","og_locale":"en_US","og_type":"article","og_title":"New R Package: metricsgraphics - rud.is","og_description":"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&#8217;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 pondering building an R package [&hellip;]","og_url":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/","og_site_name":"rud.is","article_published_time":"2015-01-08T21:50:52+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\/01\/08\/new-r-package-metricsgraphics\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"New R Package: metricsgraphics","datePublished":"2015-01-08T21:50:52+00:00","dateModified":"2018-03-07T21:44:05+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/"},"wordCount":589,"commentCount":3,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"keywords":["post"],"articleSection":["Charts &amp; Graphs","d3","DataVis","DataViz","R","RStudio"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/","url":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/","name":"New R Package: metricsgraphics - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2015-01-08T21:50:52+00:00","dateModified":"2018-03-07T21:44:05+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2015\/01\/08\/new-r-package-metricsgraphics\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"New R Package: metricsgraphics"}]},{"@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-Pw","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":3460,"url":"https:\/\/rud.is\/b\/2015\/06\/15\/metricsgraphics-0-8-5-is-now-on-cran\/","url_meta":{"origin":3194,"position":0},"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":3827,"url":"https:\/\/rud.is\/b\/2015\/12\/21\/update-to-metricsgraphics-0-9-0-now-on-cran\/","url_meta":{"origin":3194,"position":1},"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":3493,"url":"https:\/\/rud.is\/b\/2015\/07\/05\/two-pending-features-to-metricsgraphics\/","url_meta":{"origin":3194,"position":2},"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":3243,"url":"https:\/\/rud.is\/b\/2015\/02\/01\/new-release-0-7-of-metricsgraphics-htmlwidget-grids-rollovers\/","url_meta":{"origin":3194,"position":3},"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":[]},{"id":3325,"url":"https:\/\/rud.is\/b\/2015\/03\/18\/making-waffle-charts-in-r-with-the-new-waffle-package\/","url_meta":{"origin":3194,"position":4},"title":"Making waffle charts in R (with the new &#8216;waffle&#8217; package)","author":"hrbrmstr","date":"2015-03-18","format":false,"excerpt":"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\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":4154,"url":"https:\/\/rud.is\/b\/2016\/03\/18\/stacking-the-deck-against-treemaps\/","url_meta":{"origin":3194,"position":5},"title":"Stacking the deck against treemaps","author":"hrbrmstr","date":"2016-03-18","format":false,"excerpt":"So, I (unapologetically) did this to @Highcharts last week: @hrbrmstr Your loss of words inspired this post!! https:\/\/t.co\/3KO0BP0k0u @hadleywickham @ma_salmon @tdmv @bearloga @rushworth_a @awhstin\u2014 Highcharts (@Highcharts) March 18, 2016 They did an awesome makeover (it's interactive if you follow the link): And, I'm not kidding, it's actually a really good\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":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2016\/03\/RStudioScreenSnapz021.png?fit=1200%2C695&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3194","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=3194"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/3194\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=3194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=3194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=3194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}