Visualization

Blogs & Slides Only

Buy me a coffeeBuy me a coffee


A Gentle Guide to the Grammar of Graphics with ggplot2💯

By Garrick Aden-Buie

What is this?

Slides and code from workshop by Garrick. This presentation was part of a 5 day Workshop on data analysis using R by the American Statistical Association, University of South Florida Chapter (for this workshop links visit the learning R page.

  1. Link to slides here: https://pkg.garrickadenbuie.com/gentle-ggplot2/#1
  2. Link to code here: https://github.com/gadenbuie/gentle-ggplot2/

A ggplot2 grammar guide💯

By Gina Reynolds

Added Mon Sep 14th, 2020

What is this?
This guide isn’t comprehensive, and it will likely continue to evolve. But it’s at a place that it might be useful to orient you, a colleague, or a student to ggplot2 and extensions.

  1. Link to site here: https://evamaerey.github.io/ggplot2_grammar_guide/about

A ggplot2 Tutorial for Beautiful Plotting in R💯

By Cédric

Added Mon Sep 14th, 2020.

What is this?

Wonderful introductory tutorial to ggplot2 and the wonderful things you could do with it.

  1. Link to blog here: https://cedricscherer.netlify.app/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r/#titles

Adding Sparklines to gt Tables

By R for the Rest of Us

Added Thu Feb 20, 2025

What is this?

This tutorial shows how to add sparklines—small line charts—to gt tables in R using the gtExtras package, making tables more visually informative.

  1. Link to tutorial: https://rfortherestofus.com/2024/02/sparklines-gt

  2. Link to video here: https://www.youtube.com/watch?v=ipUCv49Slag&ab_channel=RfortheRestofUs

Align the assignment operators within a highlighted area

What is this?

Technically not a visualization resource but once you use it on your script, it is so pleasant to look at (at least for me).

  1. Link to animations here: https://github.com/seasmith/AlignAssign

Alternatives to Simple Color Legends in ggplot2

By Meghan Hall

Added Sat Dec 12th, 2021

What is this?

Excerpt from post: Legends, or the way aesthetic values are mapped to data, are an essential part of plots, and this post introduces a few different options for labeling colors effectively.

  1. Link to post here: https://meghan.rbind.io/blog/color-legend/

An Introduction to Hierarchical Modeling

What is this?

This project was built by Michael Freeman, a faculty member at the University of Washington Information School.

  1. All code for this project is on GitHub here: https://github.com/mkfreeman/hierarchical-models/

Advanced data visualization with R and ggplot2 a practical

By Yan Holtz

What is this?

Excerpt from site: It allows to go further with ggplot2: annotation, theme customization, color palette, output formats, scales, and more.

  1. Post here: https://www.yan-holtz.com/PDF/Ggplot2_advancedTP_correction.html

An introduction to cowplot

By Meghan Hall

Added Sat Dec 11, 2021

What is this?

Excerpt from site: “This week’s #TidyTuesday data set is all about lemurs (with data from the Duke Lemur Center), so I figured I would stick with the animal theme and discuss a few functions from Claus Wilke’s cowplot package, which is my personal favorite package for arranging plots made in R”.

  1. Post and course here: https://meghan.rbind.io/blog/cowplot/

Astonishingly easy mapping in R with mapview

By Sharon Machlis

Added Mon Apr 24, 2023

What is this?

Excerpt from site: TCreate interactive maps of GIS data with tooltips, hover text, and legends in one short and simple line of code. Plus get extras like side-by-side sliders and multiple maps in sync.

  1. Post here: https://www.infoworld.com/article/3644848/astonishingly-easy-mapping-in-r-with-mapview.html
  2. Video here: https://www.youtube.com/watch?v=pHOto3VDG9s

Calendar plot in R using ggplot2

What is this?

Excerpt from site: The calendR package allows creating fully customizable ggplot2 calendar plots with a single function. In addition, the package provides arguments to create heatmap calendars. In this tutorial you will learn how to create ready to print yearly and monthly calendar plots in R.

  1. Link to blog here: https://r-coder.com/calendar-plot-r/
  2. Link to package here: https://cran.r-project.org/web/packages/calendR/

Create a ggalluvial plot in R

By SAROJ

Added Sun May 28th, 2023

What is this?

Excerpt from blog: A ggalluvial plot, also known as an alluvial diagram, is a type of visualization used to show how categorical data is distributed among different groups. It is particularly useful for visualizing how categorical variables are related to each other across different levels of a grouping variable.

  1. Link to blog here: https://pyoflife.com/create-a-ggalluvial-plot-in-r/

Create stylish tables in R using formattable

By Laura Ellis

What is this?


Blog that uses formattable to crate pretty tables.

  1. Link to blog here: https://www.littlemissdata.com/blog/prettytables
  2. Link to repo here: https://github.com/lgellis/MiscTutorial/tree/master/Austin

Designing ggplots making clear figures that communicate

By Malcolm Barrett

What is this?

Wonderful slides to make your figures and visualization much clear and communicative. I visit it quite often.

  1. Slides here: https://designing-ggplots.netlify.app/#1

Designing ggplots making clear figures that communicate

By Malcolm Barrett

What is this?

Wonderful slides to make your figures and visualization much clear and communicative. I visit it quite often.

  1. Slides here: https://designing-ggplots.netlify.app/#1

Elevation Maps in R

By Dr. U

Added Thu Feb 20, 2025

What is this?

This comprehensive tutorial demonstrates how to create aesthetically pleasing and informative elevation maps in R using ground elevation data. The author guides readers through the process of obtaining elevation data, processing it, and visualizing it using various R packages.

The tutorial provides detailed code snippets and explanations, making it accessible for users aiming to enhance their geospatial data visualization skills in R.

  1. Link to tutorial here: https://umairdurrani.com/posts/2020-12-25-elevation-maps-in-r/elevation-maps-in-r

Friends Don’t Let Friends Make Bad Graphs 💯

By Chenxin Li, Ph.D.

Added Thu Feb 20, 2025

What is this?

This repository offers an opinionated essay on effective and ineffective data visualization practices. Authored by Dr. Chenxin Li, it provides examples and explanations of common pitfalls in data visualization, such as using bar plots for mean separation or inappropriate color scales. The repository includes R Markdown scripts to reproduce the discussed visualizations, serving as a practical guide for creating accurate and insightful data representations.

  1. Link to repository here: https://github.com/cxli233/FriendsDontLetFriends

ggplot_tricks: A Collection of ggplot2 Tips 💯

By Teun van den Brand

Added Thu Feb 20, 2025

What is this?

ggplot_tricks is a repository that compiles various tips and techniques for enhancing data visualizations using ggplot2 in R. It covers topics such as splicing aesthetics, creating half-geoms, setting midpoints in diverging scales, labeling points, and recycling plots. Here is a list of them to this date:

  1. Link to repository: https://github.com/teunbrand/ggplot_tricks

ggreveal: Incremental ggplot2 Presentations 💯

By Weverthon Machado

Added Thu Feb 20, 2025

What is this?

ggreveal is an R package that enables the incremental presentation of ggplot2 graphs. It allows users to break down a plot into a series of intermediary plots, which can be displayed sequentially, making it particularly useful for teaching and presentations. The package offers functions such as reveal_groups(), reveal_layers(), and reveal_aes() to incrementally reveal different aspects of a plot.

  1. Link to package: https://www.weverthon.com/ggreveal/

How to Create Diamond Plots in R 💯

By Owen Phillips

Added Thu Feb 20, 2025

What is this?

This tutorial provides a comprehensive guide on creating diamond plots in R, a visualization technique that emphasizes confidence intervals over point estimates. Diamond plots are particularly useful in meta-analyses and comparative studies, as they focus on the precision of estimates rather than just the estimates themselves. The guide walks through the process of constructing diamond plots using the ufs package, detailing functions like meansDiamondPlot() and diamondPlot(). It includes practical examples and code snippets, making it accessible for users aiming to enhance their data visualization skills in R.

  1. Link to tutorial here: https://thef5.substack.com/p/how-to-diamond-plots-in-r

How to Fill Maps with Density Gradients Using R, ggplot2, and sf

By Andrew Heiss

Added Thu Feb 20, 2025

What is this?

This tutorial addresses the challenge of overplotting in maps with numerous data points. It explores methods to visualize point density by:

  • Aggregating data within geographic boundaries.

  • Creating grids to summarize point counts.

  • Applying density gradients for smoother visual representation.

The guide provides practical examples using R packages ggplot2 and sf.

  1. Link to tutorial: https://www.andrewheiss.com/blog/2023/07/28/gradient-map-fills-r-sf/

How to Increase Legend Key Size in ggplot2

By datavizpyr

Added Fri Apr 14th, 2023

What is this?

Excerpt from article: In this tutorial, we will learn how to increase the color legend’s point (or legend key) size in ggplot2. Often when you make a plot with multiple groups and large number of data points, the legend key for the color variable are small and can be not legible in the plot.

Here we will see examples of increasing the point size of the legend in a scatter plot using guides() function in ggplot2.

  1. Link to article here: https://datavizpyr.com/increase-legend-key-size-in-ggplot2/

How to Make a Diverging Bar Chart in R 💯

By R for the Rest of Us

Added Thu Feb 20, 2025

What is this?

This tutorial demonstrates how to create diverging bar charts in R using the ggplot2 package. Diverging bar charts are effective for displaying Likert scale data or any dataset with a central neutral point, as they visualize deviations in both directions from a midpoint. The article provides step-by-step instructions, including data preparation, plotting, and customization techniques to enhance the clarity and aesthetics of the chart.

  1. Link to tutorial here: https://rfortherestofus.com/2021/10/diverging-bar-chart/

How to R: Visualizing Distributions

By Nick Martin

Added Mon May 29th, 2023

What is this?

Excerpt from blog: Distributions are a very important thing to understand during any EDA process. In this article we will look into multiple different ways to visualize distributions and how to create those visuals in R.

  1. Link to blog here: https://medium.com/@nickmartin812/how-to-r-visualizing-distributions-49ea4141fb32

Images as Facet Labels in ggplot2

By Dr. U

Added Thu Feb 20, 2025

What is this?

This article explores how to replace facet labels in ggplot2 with images, such as country flags, to create more informative and visually appealing plots. The author provides a step-by-step guide on obtaining image data, integrating it with existing datasets, and utilizing the ggtext and ggh4x packages to display images as facet labels. This technique enhances the interpretability of faceted plots by incorporating visual cues directly into the plot structure.

  1. Link to article here: https://umairdurrani.com/posts/images_in_facets/images_in_facets

Image sizes in an R markdown document

Added Fri Apr 23rd, 2021

What is this?

Excerpt from site: This is part four of our four-part series

Part 1: Specifying the correct figure dimension in {knitr} (this post).

Part 2: What image format should you use for graphics.

Part 3: Including external graphics in your document.

Part 4: Setting default {knitr} options.

  1. Link to site here: https://www.jumpingrivers.com/blog/knitr-rmarkdown-image-size/.be

Improving ggplots with Text Color

By Eric Ekholm

Added Sun Jun 6th, 2021

What is this?

Excerpt from site: instead of having a legend off to the right or the bottom or wherever it is you typically place your legends, I’ve changed the font color of the words “Pass” and “Fail” in the title to contain this same information. We can do this using Claus Wilke’s invaluable {ggtext} package, which provides improved rendering for ggplot2.

  1. Link to article here: https://www.ericekholm.com/posts/2021-03-24-improving-ggplots-with-text-color/

Introduction to Geospatial Visualization with R-R-Ladies Abuja + Abuja R Users

By Rami Krispin

Added Sun Dec 12, 2021

What is this?

Excerpt from site: Introduction to spatial data - Working with sf objects - Plot sf objects with mapview, tmap, and ggplot2 - Create choropleth maps

  1. Link to github repo. andcode here: https://github.com/RamiKrispin/gis-dataviz-workshop
  2. Link to slides here: https://ramikrispin.github.io/gis-dataviz-workshop/#1

Introducing {ggflowchart}

By Nicola Rennie

Added Mon May 29, 2023

What is this?

Excerpt from site: Flowcharts can be a useful way to visualise complex processes, and the new R package {ggflowchart} makes them easy to create in R. This blog post shows you how. Back in April 2022, I participated in the #30DayChartChallenge and for the Storytelling prompt on day 29 in the Uncertainty category, I created the Goldilocks Decision Tree. I also gave a talk to R-Ladies Nairobi on the challenge and used the flowchart as a live-coding example. A summary of the talk ended up as a blog post.

  1. Link to blog here: https://nrennie.rbind.io/blog/introducing-ggflowchart/

Introduction to rbokeh–a vignette

What is this?

Excerpt from vignette: Bokeh is a visualization library that provides a flexible and powerful declarative framework for creating web-based plots. Bokeh renders plots using HTML canvas and provides many mechanisms for interactivity. Bokeh has interfaces in Python, Scala, Julia, and now R. The Bokeh library is written and maintained by the Bokeh Core Team consisting of several members of Continuum Analytics and other members of the open source community. The rbokeh package is written and maintained by Ryan Hafen (@hafenstats) with several contributions from others.

  1. Link to blog here: https://hafen.github.io/rbokeh/articles/rbokeh.html

Introduction to Tableau

By Meghan Hall

Added Dec 11, 2021

What is this?

Excerpt from blog: “A bunch of people have been asking me for some kind of Tableau tutorial, so I’m experimenting with a screencast video on YouTube! The video should be embedded below and is also available here.”

  1. Link to blog here: https://meghan.rbind.io/blog/introduction-to-tableau/
  2. Link to video here: https://www.youtube.com/watch?v=fN7vAfeN0_E&feature=youtu.be

Making a Custom Arrowhead for ggplot2 Using ggarrow and arrowheadr

By W. Joel Schneider

Added Thu Feb 20, 2025

What is this?

This blog post explores the creation of custom arrowheads in ggplot2 using the ggarrow and arrowheadr packages. It provides detailed instructions on designing and implementing custom arrowheads to enhance the clarity and aesthetics of ggplot2 visualizations.

  1. Link to article here: https://wjschne.github.io/posts/2023-08-26-making-a-custom-arrowhead-for-ggplot2-using-ggarrow-and-arrowheadr/

Parameterising a Multi-Part Plot 💯

By Cara Thompson and R for the Rest of Us

Added Thu Feb 20, 2025

What is this?

This blog post by Cara Thompson demonstrates how to create parameterized plots in R to avoid repetitive code, especially when generating multiple variants of interactive graphs. Using the ggplot2 package and the palmerpenguins dataset, the tutorial guides readers through:

  1. Setting up a custom theme and color palette.

  2. Transforming plotting code into a function that accepts arguments for flexibility.

  3. Incorporating conditional statements within the function to adjust plot elements based on input parameters.

  4. Implementing safety checks to handle potential errors and ensure consistent axis limits.

The approach emphasizes efficient coding practices, reducing redundancy, and enhancing the adaptability of plots to different datasets or groups.

  1. Link to article here: https://rfortherestofus.com/2024/06/parameterising-a-multi-part-plot

Principles & Practice of Data Visualization

By Alison Hill

What is this?

Excerpt from site: This is the site for sharing our Data Visualization Labs for CS631 at Oregon Health & Science University. It has exercises and solutions! 💯

  1. Link to the workshop here: https://apreshill.github.io/data-vis-labs-2018/index.html

R graphics with ggplot2 workshop notes

Added Mon Sep 14th, 2020

What is this?

Workshop listed in Harvard’s resources. Materials can be downloaded.

  1. Link to workshop notes: http://tutorials.iq.harvard.edu/R/Rgraphics/Rgraphics.html#geometric_objects_and_aesthetics
  2. Link to download materials here: http://tutorials.iq.harvard.edu/R/Rgraphics.zip

R you ready to make charts?

By Will Chase

Added Mon Sep 14th, 2020

What is this? Slides from Talk given by Will Chase at a Philly dataviz meetup on May 29th, 2019.

  1. Link to slides: https://www.williamrchase.com/slides/ggplot_intro.html#1

Resizing plots

What is this?

How to resize plots in R markdown

  1. Link to blog: https://alyssasfu.wordpress.com/2015/04/03/resizing-plots-in-r-markdown/

The Evolution of a ggplot (Ep. 1)

By Cédric

What is this?

Excerpt from the blog: In this series of blog posts, I aim to show you how to turn a default ggplot into a plot that visualizes information in an appealing and easily understandable way. The goal of each blog post is to provide a step-by-step tutorial explaining how my visualization have evolved from a typical basic ggplot. All plots are going to be created with 100% {ggplot2} and 0% Inkscape.

  1. Link to blog: https://cedricscherer.netlify.app/2019/05/17/the-evolution-of-a-ggplot-ep.-1/

Visualization innovations: Waffleplots and Swarmplots

What is this? Fun blog about how to make Waffleplots and swarmplots.

  1. Link to blog here: https://paulvanderlaken.com/2019/01/25/visualization-innovation-waffleplots-and-swarmplots-aka-beeplots/

Where are the 4+-Car Households?

By Harald Kliems

Added Thu Feb 20, 2025

What is this?

This article explores the distribution of households in the United States that own four or more vehicles. Utilizing data from the American Community Survey, the author presents maps and analyses to identify regions with high concentrations of such households. The study provides insights into transportation patterns, urban planning, and the socio-economic factors influencing vehicle ownership across different areas. This is great for visualization examples (code is within the blog).

  1. Link to article here: https://haraldkliems.netlify.app/posts/2024-02-29-where-are-the-4-car-households/

Visualizing Spatial Data

What is this?

Here is a list of resources to create visualizations with maps

  1. https://www.r-spatial.org/r/2018/10/25/ggplot2-sf-2.html
  2. https://rstudio.github.io/leaflet/projections.html
  3. https://www.r-graph-gallery.com/278-the-maps-library.html
  4. http://www.milanor.net/blog/maps-in-r-introduction-drawing-the-map-of-europe/
  5. https://www.youtube.com/watch?v=wgFVmzSbaQc&list=PL7D2RMSmRO9JOvPC1gbA8Mc3azvSfm8Vv&index=17
  6. https://www.infoworld.com/article/3644848/astonishingly-easy-mapping-in-r-with-mapview.html
  7. https://medium.com/appsilon-data-science/r-ggmap-how-to-visualize-spatial-data-in-r-c46dcf970095
  8. https://carolinamendozab.medium.com/mapping-income-per-capita-by-countries-in-r-using-world-bank-data-cf42eca247c4