Learn to use the most powerful tool for working with data.
Even if you've never coded before.
Blog

How to make heatmaps in ggplot
May 1, 2025
Heatmaps are a common way of representing data. In this blog post, I'll show you how to make your own heatmaps using ggplot. In the process, you'll learn a bit about working with the {sf} package, specifically the st_make_grid() function to make a grid, the st_intersection() function to clip the boundaries of your geography to the grid you create, and st_join() to do spatial joins. This blog post is adapted from a lesson in the Mapping with R course . If you want to learn to make heatmaps...

Use shadows in ggplot to highlight findings
April 24, 2025
In our consulting work, we make a lot of the data visualization for parameterized reporting . It’s something I spoke about in my 2024 Cascadia R Conf talk, How to Make a Thousand Plots Look Good: Data Viz Tips for Parameterized Reporting . One example I gave in this talk came from our work with the Johns Hopkins International Vaccine Access Center and the World Health Organization . In this project, we made reports for the Immunization Agenda 2030 project, which tracks the progress countries...

Create your own custom {ggplot2} theme
April 3, 2025
Creating custom themes in {ggplot2} lets you elevate your data visualizations from standard to standout. Whether you’re aiming for a polished, brand-consistent look for your organization or a unique aesthetic that reflects your personal style, a custom theme function makes it easy to apply your design to all figures with a single line of code. In this tutorial, we’ll cover: the essentials of the powerful ggplot2::theme() function, including how to adjust fonts, colors, sizing, and spacing;...

Hide text labels with small values to make charts made in ggplot easier to read
March 13, 2025
One issue that we often face when making data visualization in reports is text not fitting into graphs. This happened to us when working on reports for the Connecticut Data Collaborative and the Partnership for Strong Communities in Connecticut. The reports we made , which show key demographic and housing indicators for towns and counties across the state, have bar charts that show the housing cost burden for renters and home owners in the state. In addition to the categories severe burden...
What's New in R
A weekly roundup of new resources in the world of R.

What’s New in R: June 9, 2025
June 9, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a guide on translating Quartofiles, an exploration of Quarto for book creation, and a tutorial on creating animated population pyramids. Let’s dive in! Translating Quarto (and other markdown files) into any language In this insightful post by Frank Aragona, you’ll learn how to translate Markdown files using R. In this walkthrough, Aragona shows how he used R to translate Quarto files from English to Spanish...

What’s New in R: June 2, 2025
June 2, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring an overview of the Positron code editor, a comprehensive directory of R packages, and a video on creating interactive plots. Let’s dive in! Positron IDE doing Data Analysis with R (Public Beta) In this informative YouTube video, James Balamuta gives an overview of the Positron editor. This editor, designed by the folks at Posit and released publicly last summer, has a lot of great features. If you’re considering...

What’s New in R: May 26, 2025
May 26, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a workshop on creating websites with Quarto, a video tutorial on making dot density maps, and a package for more attractive visualizations of overlapping points. Let’s dive in! Quarto website video series The Quarto team has a comprehensive workshop on building websites using Quarto. This detailed guide walks you through the process of setting up and customizing your own website, making it accessible even for...

What’s New in R: May 19, 2025
May 19, 2025
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a guide on using LLMs to summarize work, a dashboard for WHO data, and a tutorial on storytelling with R and Quarto. Let’s dive in! Remembering what I did this week with LLMs Garrick Aden-Buie explores the use of large language models (LLMs) to create concise work summaries. In his blog post, he shares how he uses several R packages to create summaries of what he accomplished during the previous week. Read More →...
R in 2 Minutes
Short videos highlighting useful R packages and functions.

How to conditionally execute code chunks in Quarto
June 5, 2025
Ever had a Quarto document where some code works perfectly in HTML but looks awful in Word (or vice versa)? I just ran into this problem with tables -{gt} tables look great in HTML but not so hot in Word, while {flextable} works beautifully in Word format. In this quick video, I show you a neat trick for conditionally executing code in Quarto. This is super handy when you're creating documents that need to be exported to multiple formats. No more manually commenting out code or creating...

How to add patterns to your plots with {ggpattern}
May 15, 2025
Ever wanted to add patterns to your plots made with ggplot? You can with the {ggpattern} package! Check out this short intro to the package. If you want to go deeper on {ggpattern}, check out its documentation website for all of the details about how it works. Code used:

Learn to make an R package in less than 2 minutes
April 17, 2025
Have you ever wanted to create your own R package but thought it was too complicated? I used to think the same thing! But I recently learned how to create a simple theme package in R, and I want to show you just how easy it can be. So easy that I can demonstrate the process in just two minutes! In this quick video, I walk you through the step-by-step process of creating your own R package. Here's what I cover: Creating a new package project in RStudio Setting up the package structure using...

Use the {beepr} package to be notified when your R code is done
March 27, 2025
Tired of waiting for your R script to finish running? In my latest "R in 2 Minutes" video, I showcase the {beepr} package, which plays a sound when your code is complete, so you don’t have to keep checking! I demonstrate how it works using a time-consuming task—importing multiple CSV files—and explore various fun sound options, including nostalgic ones. Plus, my son Elias joins as a special guest, adding some comic relief while we wait. This simple trick can save time and make your R coding...
Podcast
Conversations with users around the world about interesting things they are doing with R.

R for the Rest of Us Podcast Episode 26: Deepali Kank
May 8, 2025
In this episode of R for the Rest of Us podcast, I chat with Deepali Kank, a talented R user and data visualization expert. Deepali shares her journey from creating static visualizations in ggplot2 to building interactive charts using Observable Plot, a JavaScript-based tool. We dive into her recent projects, explore how Observable makes it easy to add interactivity, and talk about how it compares with tools like Shiny and Quarto dashboards. If you're curious about expanding your data viz...

R for the Rest of Us Podcast Episode 25: Robert Smith
March 20, 2025
In this episode, I chat with Robert Smith, a health economist and co-founder of Dark Peak Analytics. Rob shares his unique career path from academia to advising the UK government during the COVID-19 pandemic, where he helped shape public health decisions through data modeling. We also discuss his work with Parkrun, a free community running event, and how data science can be used to promote equitable access to fitness. Using R, Rob and his team analyzed participation trends and developed...

R for the Rest of Us Podcast Episode 24: Simon Couch
February 27, 2025
In this episode, I chat with Simon Couch, a software engineer at Posit, where he develops open-source statistical software and maintains several R packages. Simon’s work spans AI-powered coding tools that enhance R workflows and improve efficiency. We dive deep into his latest projects: {pal} (renamed to {chores}) – an AI-powered assistant that streamlines code updates and automates tedious R programming tasks. {gander} – an innovative tool that integrates AI into RStudio and Positron,...

R for the Rest of Us Podcast Episode 23: Terence Teo
February 6, 2025
In this episode, I chat with Terence Teo, Professor at Seton Hall University and expert in creating stunning 3D maps using the {rayshader} package in R. Terence discusses his journey into data visualization, specifically his use of R and the RayShader package to create mesmerizing 3D maps. Terence shares insights from his academic background in political science, his creative process for making maps, and how he balances artistic flair with technical rigor. The discussion dives into geospatial...