Publications by hrbrmstr
Get by with a little (R) help from your friends (at GitHub)
@JennyBryan posted her slides from the 2015 R Summit and they are a must-read for instructors and even general stats/R-folk. She’s one of the foremost experts in R+GitHub and her personal and class workflows provide solid patterns worth emulation. One thing she has mentioned a few times—and included in her R Summit talk—is the idea that you...
2072 sym R (1848 sym/1 pcs) 2 img 1 tbl
Two pending features to metricsgraphics
I’ve been slowly prodding the metricsgraphics package 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 now be achieved (in the dev01 branch) via mjs_plot_ and in mjs_plot...
1961 sym R (586 sym/1 pcs) 1 tbl
Faceted “World Population by Income” Choropleths in ggplot
Poynter did a nice interactive piece on world population by income (i.e. “How Many Live on How Much, and Where”). I’m always on the lookout for optimized shapefiles and clean data (I’m teaching a data science certificate program starting this Fall) and the speed of the site load and the easy availability of the data set made this one a �...
4952 sym R (3337 sym/6 pcs) 2 img 6 tbl
R Package to access the Open Movie Database (OMDB) API
It’s not on CRAN yet, but there’s a devtools-installable R package for getting data from the OMDB API. It covers all of the public API endpoints: find_by_id: Retrieve OMDB info by IMDB ID search find_by_title: Retrieve OMDB info by title search get_actors: Get actors from an omdb object as a vector get_countries: Get countries from an omdb o...
1082 sym R (4385 sym/1 pcs) 2 img 1 tbl
Using the new ‘viridis’ colormap in R (thanks to Simon Garnier)
Nathaniel Smith and Stéfan van der Walt presented [YouTube] a new colormap (for Python) at SciPy 2015 called viridis. From the authors: The default colourmap in Matplotlib is the colourful rainbow-map called Jet, which is deficient in many ways: small changes in the data sometimes produce large perceptual differences and vice-versa; its lightne...
3902 sym R (2418 sym/8 pcs) 10 img 8 tbl
A Path Towards Easier Map Projection Machinations with ggplot2
The $DAYJOB doesn’t afford much opportunity to work with cartographic datasets, but I really like maps and tinker with shapefiles and geo-data when I can, plus answer a ton of geo-questions on StackOverflow. R makes it easy—one might even say too easy—to work with maps. All it takes to make a map of the continental United States (CONUS) is:...
9012 sym R (2225 sym/11 pcs) 22 img 11 tbl
Roll Your Own Gist Comments Notifier in R
As I was putting together the coord_proj ggplot2 extension I had posted a gist that I shared on Twitter. Said gist received a comment (several, in fact) and a bunch of us were painfully reminded of the fact that there is no built-in way to receive notifications from said comment activity. @jennybryan posited that it could be possible to use IFTTT...
2575 sym R (3271 sym/1 pcs) 1 tbl
Making Static/Interactive Voronoi Map Layers In ggplot/leaflet
Despite having shown various ways to overcome D3 cartographic envy, there are always more examples that can cause the green monster to rear it’s ugly head. Take the Voronoi Arc Map example. For those in need of a primer, a Voronoi tesslation/diagram is: …a partitioning of a plane into regions based on distance to points in a specific subset...
4527 sym R (4268 sym/10 pcs) 4 img 10 tbl
Introducing the nominatim geocoding package
In the never-ending battle for truth, justice and publishing more R packages than Oliver, I whipped out an R package for the OpenStreetMap Nominatim API. It actually hits the MapQuest Nominatim Servers for most of the calls, but the functionality is the same. The R package lets you: address_lookup: Lookup the address of one or multiple OSM objec...
2009 sym R (7905 sym/5 pcs) 2 img 5 tbl
Two New R Packages – qrencoder & passwordrandom
Believe it or not, there are two [1] [2] questions on @StackOverflowR about how to make QR codes in R. I personally think QR codes are kinda hokey, but who am I to argue with pressing needs of the #rstats community? I found libqrencode and it’s highly brew-able and apt-able (probably yum-able, too, if you lean that way), so it was super-easy to...
1423 sym R (1128 sym/2 pcs) 2 img 2 tbl