Publications by hrbrmstr
Strung Out On String Ops – A Brief Comparison of stringi and stringr
I made a promise to someone that my next blog would be about stringi vs stringr and I intend to keep said promise. stringr and stringi do “string operations”: find, replace, match, extract, convert, transform, etc. The stringr package is now part of the tidyverse and is 100% focused on string processing and is pretty much a wrapper package f...
5195 sym R (311 sym/1 pcs) 6 img
Diving Into Dynamic Website Content with splashr
If you do enough web scraping, you’ll eventually hit a wall that the trusty httr verbs (that sit beneath rvest) cannot really overcome: dynamically created content (via javascript) on a site. If the site was nice enough to use XHR requests to load the dynamic content, you can generally still stick with httr verbs — if you can figure out what ...
4637 sym R (3838 sym/6 pcs) 4 img
ggalt 0.4.0 now on CRAN
I’m uncontainably excited to report that the ggplot2 extension package ggalt is now on CRAN. The absolute best part of this package is the R community members who contributed suggestions and new geoms, stats, annotations and integration features. This release would not be possible without the PRs from: Ben Bolker Ben Marwick Jan Schulz Carson...
2430 sym 2 img
Geom❤️
ggplot() + geom_heart() + coord_equal() + labs(title="Happy Valentine's Day") + theme_heart() Presented without exposition (since it’s a silly Geom) This particular ❤️ math pilfered this morning from @dmarcelinobr: library(ggplot2) geom_heart <- function(..., colour = "#67001f", size = 0.5, fill = "#b2182b", ...
516 sym R (1083 sym/2 pcs) 2 img
Spelunking XHRs (XMLHttpRequests) with splashr
splashr has gained some new functionality since the introductory post. First, there’s a whole new Docker image for it that embeds a local web server. Why? The main request for it was to enable rendering of htmlwidgets: splash_vm <- start_splash(add_tempdir=TRUE) DiagrammeR(" graph LR A-->B A-->C C-->E B-->D C-->D ...
2111 sym R (6205 sym/5 pcs) 2 img
Putting It All Together
The kind folks over at @RStudio gave a nod to my recently CRAN-released epidata package in their January data package roundup and I thought it might be useful to give it one more showcase using the recent CRAN update to ggalt and the new hrbrthemes (github-only for now) packages. Labor force participation rate The U.S. labor force participation r...
3264 sym R (2876 sym/5 pcs) 4 img
On Watering Holes, Trust, Defensible Systems and Data Science Community Security
I’ve been threatening to do a series on “data science community security” for a while and had cause to issue this inaugural post today. It all started with this: Hey #rstats folks: don't do this. Srsly. Don't do this. Pls. Will blog why. Just don't do this. https://t.co/qkem5ruEBi— boB Rudis (@hrbrmstr) February 23, 2017 Let me begin wit...
9869 sym R (183 sym/3 pcs) 2 img
Making a Case for case_when
This is a brief (and likely obvious, for some folks) post on the dplyr::case_when() function. Part of my work-work is dealing with data from internet scans. When we’re performing a deeper inspection of a particular internet protocol or service we try to capture as much system and service metadata as possible. Sifting through said me...
765 sym
Exploring 2017 Retail Store Closings with R
A story about one of the retail chains (J.C. Penny) releasing their list of stores closing in 2017 crossed paths with my Feedly reading list today and jogged my memory that there were a number of chains closing many of their doors this year, and I wanted to see the impact that might have on various states. I’m also doing this to add one more ex...
4005 sym R (3562 sym/6 pcs) 2 img
All-in on R⁴ : Progress [bars] on first post
@eddelbuettel’s idea is a good one. (it’s a quick read…jump there and come back). I often wait for a complete example or new package announcement to blog something when a briefly explained snippet might have sufficient utility for many R users. Also, tweets are fleeting and twitter could end up on the island of misfit social media sites if...
2320 sym R (356 sym/2 pcs)