Publications by hrbrmstr
New release (0.7) of metricsgraphics htmlwidget — grids & rollovers
I’ve updated my metricsgraphics package to version 0.7. The core MetricsGraphics 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 ...
3201 sym R (1949 sym/5 pcs) 5 tbl
A Step to the Right in R Assignments
I received an out-of-band question on the use of %<>% in my CDC FluView post, and took the opportunity to address it in a broader, public fashion. Anyone using R knows that the two most common methods of assignment are the venerable (and sensible) left arrow <- and it’s lesser cousin =. <- has an evil sibling, <<-, which is used when you want/n...
2930 sym R (1026 sym/5 pcs) 5 tbl
SweetheaRstats
I felt compelled to dust off my 2013 Valentine’s Day #rstats post and make it all Shiny and new again. I used the same math from that post, but made the polygon a bit sharper and used ggplot2 for the plotting. To kick it up a bit, I decided to pay homage to a local company (Necco) who makes the venerable Sweethearts candies that are popular thi...
1684 sym
Introducing the streamgraph htmlwidget R Package
We were looking for a different type of visualization for a project at work this past week and my thoughts immediately gravitated towards streamgraphs. 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 but have a “draw you in” aesthetic ...
2813 sym R (1068 sym/4 pcs) 1 img 4 tbl
Streamgraph package now supports continuous x axis scale
A post on StackOverflow asked about using a continuous variable for the x-axis (vs dates) in my streamgraph package. 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 halfway behind me now, I kicked out a new rev of the package/widget that has support f...
1024 sym R (439 sym/1 pcs) 1 tbl
New R Package – ipapi (IP/Domain Geolocation)
I noticed that the @rOpenSci folks had an interface to ip-api.com on their ToDo list so I whipped up a small R package to fill said gap. Their IP Geolocation API will take an IPv4, IPv6 or FQDN and kick back a ASN, lat/lon, address and more. The ipapi package exposes one function – geolocate which takes in a character vector of any mixture of ...
1323 sym R (1739 sym/1 pcs) 1 tbl
Streamgraph htmlwidget version 0.7 released (adds support for markers & annotations)
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 graphics if at all possible, trust me). To i...
3532 sym R (2665 sym/4 pcs) 4 tbl
Simple Lower US 48 Albers Maps & Local (no-API) City/State Geocoding in R
I’ve been seeing an uptick in static US “lower 48″ maps with “meh” projections this year, possibly caused by a flood of new folks resolving to learn R but using pretty old documentation or tutorials. I’ve also been seeing an uptick in folks needing to geocode US city/state to lat/lon. I thought I’d tackle both in a quick post to sho...
3373 sym R (2638 sym/3 pcs) 4 img 3 tbl
Making waffle charts in R (with the new ‘waffle’ package)
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’m partial to “waffle charts” or “square pie charts”. @eagereyes did a great post a while ago on them (make sure to read the ‘debate’...
2824 sym R (799 sym/3 pcs) 8 img 3 tbl
Fixing Colors & Proportions in Jerusalem Post Election Graphics
Vis expert Naomi Robbins did an excellent critique of the graphics 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 two new pac...
1873 sym R (1849 sym/2 pcs) 4 img 2 tbl