Learn to use the most powerful tool for working with data.
Even if you've never coded before.
Blog
Recreating Financial Times Data Viz of 2024 US Presidential Election
December 5, 2024
A couple weeks ago, in the wake of the presidential election here in the United States, everyone was looking for explanations for the results. One of the most compelling reasons that Donald Trump won came from John Burn-Murdoch . Burn-Murdoch, a columnist and the chief data reporter at the Financial Times, posted this graph showing that incumbents around the world had fared extremely poorly in 2024 . This graph got a ton of attention online not only because the data that underlies it strongly...
An introduction to the {gganimate} package
November 27, 2024
The {gganimate} package is the easiest way to make animated plots in R. If you know how to make plots in ggplot, you can animate them with {gganimate}. Animated plots are a great way to capture attention, especially online where the next shiny object is just a scroll away. If you want to get attention on your data, using animation with a package like {gganimate} is a great option. In this blog post, I’ll show how to use the {gganimate} package by animating data on refugees. As part of our one...
Use vertical white lines instead of axis lines for cleaner charts
November 21, 2024
I recently came across a data viz in the New York Times that used a unique approach to adding axis lines. In this chart about the number of days that members of the United States House of Representatives served as speaker , rather than use traditional axis lines, they used white lines that show up on bars but are hidden otherwise. How can we create a bar chart in ggplot2 without using vertical white lines? This guide will walk you through the steps to create a polished bar plot using gross...
Use smart labeling in ggplot to help your audience understand your graphs
October 24, 2024
When making data viz in R, it’s easy to think that adding label to everything will make your charts easier to understand. This is rarely the case. Instead, when making charts, maps, etc with ggplot, your best bet is to label smartly. Only labeling the most important pieces of your data viz ensures that your audience will grasp what you want them to grasp. In this blog post, I’ll show you how to use smart labeling in ggplot to help your audience understand your graphs. The issue of smart...
What's New in R
A weekly roundup of new resources in the world of R.
What’s New in R: December 9, 2024
December 9, 2024
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a tool for generating blog post summaries using AI, a visualization of Greenland’s ice thickness, and a package to replicate Excel formatting in tables made in R. Let’s dive in! Creating post summaries with AI from Hugging Face Athanasia Mo Mowinckel shares a clever solution for automating blog post summaries using AI. Using the Hugging Face API and R, she demonstrates how to generate concise summaries of blog...
What’s New in R: December 2, 2024
December 2, 2024
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a tutorial on advanced data scraping, a new approach to applying brand guidelines across your various data products, and a new package for creating legends in ggplot2. Let’s dive in! Creating Serverless Shiny Apps with R Shinylive In this video, James Balamuta (aka The Coatless Professor) demonstrates how to use the R package {chromote} to control a web browser for web scraping dynamic websites, specifically...
What’s New in R: November 25, 2024
November 25, 2024
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a guide for transitioning from SAS to R, a fun package for getting started more efficiently on your projects, and a tutorial on creating diamond plots. Let’s dive in! Converting SAS to R: A Data Scientist’s Guide Making the switch from SAS to R can be challenging, but this comprehensive guide from Ted Laderas at Fred Hutchinson Cancer Center’s Data Science Lab makes the transition smoother. The guide provides...
What’s New in R: November 18, 2024
November 18, 2024
Welcome to this week’s edition of What’s New in R ! This week, we’re featuring a YouTube with all of the talks from posit::conf 2024, a curated collection of data science learning resources, and a practical guide to analyzing survey data in R. Let’s dive in! posit::conf(2024) videos One the best parts about posit::conf, the annual data science conference put on by the folks at Posit, is that the videos from it are all made available for free on YouTube. The 2024 talks were released recently...
R in 2 Minutes
Short videos highlighting useful R packages and functions.
Use the view() function to quickly look at your data in R
December 5, 2024
Ever want to take a quick look at your data? In my R in 2 Minutes video, I show how to use the view() function to quickly display data in a separate window. I explain why it's useful at the end of pipelines and how to combine it with functions like filter() . It’s a simple trick that can save time and prevent headaches when working with data in R.
Make all of your plots made in ggplot use consistent fonts
October 31, 2024
Have you ever struggled with keeping fonts consistent across all your data visualizations? It's a common headache, but I've got a solution that'll make your life easier! In my latest blog post, I dive into a couple of little tricks using ggplot2 that'll help you maintain font consistency without having to manually adjust each plot. Here's what I cover: Using the theme_set() function to apply a consistent theme across all your plots Leveraging update_geom_defaults() to set default font...
How to update all of your R packages
October 3, 2024
There are times when working in R that you'll want to update not just one package, but all packages you currently have installed. There are many ways to do this, but I recently saw a tip from Kurt Birson that was so good, I had to make a video to demonstrate it. In the latest R in 2 Minutes video, I show you how to update all of your R packages with just a few lines of code. Here's the code I used in the video:
How to distinguish overlapping points in ggplot
September 19, 2024
Ever made a plot in ggplot where you've got two points that are close together? It can be hard to distinguish them. I've figured out a really nice simple way to make sure all of your points are visible. Code shown in video
Podcast
Conversations with users around the world about interesting things they are doing with R.
R for the Rest of Us Podcast Episode 21: Cédric Vidonne
November 29, 2024
In this episode, I talk with Cédric Vidonne, an Information Management Officer at the United Nations High Commissioner for Refugees (UNHCR) with over 15 years of experience in humanitarian data visualization. Cédric shares his journey from GIS and cartography to creating impactful infographics and embracing the R programming language. He discusses how R has revolutionized data efficiency within UNHCR, where it aids in producing faster, reproducible data products essential for crisis response....
R for the Rest of Us Podcast Episode 20: Christine Parker
November 14, 2024
In this episode, I talk with Christine Parker, the Senior GIS Analyst on the Community Broadband Networks team at the Institute for Local Self Reliance. Christine shares how she used R to clean, combine, and summarize data for a dashboard tracking enrollment in the Affordable Connectivity Program (ACP), a COVID-era initiative to help people access affordable internet. The dashboard gained wide attention. It was shared in advocacy circles, referenced in Congress, and discussed with the White...
R for the Rest of Us Podcast Episode 19: Crystal Lewis
October 10, 2024
In this episode, I chat with Crystal Lewis about data management and her book titled ‘ Data Management in Large-Scale Education Research ’. Crystal, a freelance research data management consultant, shares insights on good planning and systematic implementation of practices that are key to effective data management. She discusses the importance of automated data validation, and outlines a structured approach to data cleaning. Additionally, Crystal reflects on her experience writing an...
R for the Rest of Us Podcast Episode 18: Miles McBain
August 29, 2024
In this episode, I speak with Miles McBain, a data scientist and R package developer from Brisbane, Australia, about patterns and anti-patterns in data analysis reuse. Miles shares his journey from a generalist software developer to a data science specialist, his passion for R, and the evolution of his coding practices. We delve into the intricacies of code reuse in data analysis, discussing common pitfalls to avoid, the benefits of creating reusable code packages, the process of breaking...