Skip to content
R for the Rest of Us Logo

R for the Rest of Us Blog

R for the Rest of Us Podcast Episode 1: Cédric Scherer and Georgios Karamanis

In this first episode of the R for the Rest of Us podcast, I speak with designers Cédric Scherer and Georgios Karamanis about how they learned data viz, why they use R for their work, and how they get inspired. Listen to the Audio Version Watch the Video Version Also, there is a video version that has a walkthrough of how they made their Scientific American data viz. You can find that on YouTube . The chapter in my book R Without Statistics that this discussion led to is available as a draft...

Aligning Your Axes

At R For The Rest of Us, we spend a lot of time creating bespoke parameterised reports for our clients . In these reports, we often use CSS to create polished documents and to control the placement of our images. We've written about this approach elsewhere . In a recent project creating a needs assessment report on farmworkers in Oregon , we needed a bit of extra problem solving to make sure that the X axes of two plots, placed side by side, were aligned horizontally. This is the main thing...

How to merge data and calculate multilevel summaries

In one of the lessons in Fundamentals of R , I teach people how to use the group_by() and summarize() functions to calculate simple summaries (e.g. if I have population data on all states, what is the total population of the United States?). But what if you want to group by a group that's not in the original data frame? We got a question on this recently: Let's say I had state level data with numerical values per state. Let's say I wanted to assign each state to relevant regions, like...

How to tidy select all that apply questions in R

Surveys often have multiple choice, select all that apply questions. Being able to wrangle this type of data in R can be challenging. Figuring out the right way to get your data into the (tidy) structure necessary for visualizing it with ggplot can be complicated. And, to make things even more complicated, different survey tools spit out data from select all that apply questions in different formats. This blogpost is going to demonstrate how we would use tidy data principles and the tidyverse...

How to get started with the bookdown package

Ever since I started working on my book R Without Statistics people have asked me for details on how I'm writing it. If your mental model for how a book gets written involves dozens of Word documents, you may be in for a surprise ( my father certainly was ). In writing R Without Statistics, I'm using the bookdown package . The bookdown package allows you to create a series of RMarkdown files, bundle them together, and create an online book like I've done with R Without Statistics. I recently...

Announcing R Without Statistics

n early 2020, I started to have conversations with publishers about doing a book on R. I was excited about the possibility, but wasn't exactly sure what the book would be about. Then COVID came and, with two young kids at home, writing a book was not going to happen. In the two years since then, I had a lot of time to think about what type of R book I am uniquely placed to write. By last fall, I had a decent idea : a book that highlights all of the ways you can use R that don't involve...

How to make heatmaps with R using ggplot2 and leaflet

We're often asked by clients to make maps, and oftentimes they ask us to make heatmaps. For example, we made heatmaps with {ggplot2} in these reports on 2020 U.S. Census outreach efforts . And we made interactive heatmaps with the {leaflet} package in this map for the Asian Pacific Islander Council . Also known as choropleth maps, heatmaps are incredibly useful and easy to understand maps. At their simplest, heatmaps require two things: Shapefiles for the regions of interest. Your regions...

Why R is Magic

A couple weeks ago, I had the opportunity to speak to some folks at Western Michigan University. I called my talk Why R is Magic. Because, well, it is. I busted out my favorite R party trick: doing a survey and immediately generating a report with RMarkdown . I even tried something new by sending out the reports to people by email using the gmailr package . (Yes, you can send email from R. Did you now know that it’s magic?) The folks at the Western Michigan Evaluation Center were kind enough...

What the heck does `summarise()` ungrouping output (override with `.groups` argument) mean?

Ever been using R and gotten this message? summarise() ungrouping output (override with .groups argument) What the heck does it mean? This is not an error. It’s just R’s way (the dplyr package specifically) of telling you what is happening with your data. Here’s a quick explanation of what this message is all about and how to avoid it. Hope that helps! Just a heads up that newer versions of the dplyr package dropped this behavior. So if you never see the summarise() ungrouping output...

How To Make Data Viz That Matches Your Organization's Branding

Here at R for the Rest of Us, we make a lot of reports for clients . And one of the most important things we do in these reports is use the clients' colors throughout. Picking a color scheme that ties in with a client's brand or that evokes the subject matter behind the data is what allows the plot to contribute to, rather than detract from, the main story the client is seeking to tell. It's what we've done for the last several years working on Oregon by the Numbers . The report uses the...