explaingit

cxli233/friendsdontletfriends

7,055RAudience · researcherComplexity · 1/5Setup · easy

TLDR

A visual guide to 16 common data visualization mistakes, like hiding data behind bar charts or using red-green color pairs, with side-by-side before-and-after examples and reproducible R code.

Mindmap

mindmap
  root((friendsdontletfriends))
    What it covers
      16 chart mistakes
      Before and after examples
      R reproducible code
    Common mistakes
      Bar plot means
      Small sample violins
      Red-green color pairs
      Pie charts
    Audience
      Researchers
      Data analysts
      Instructors
    Tech stack
      R
      RStudio
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Review your own charts against 16 mistake patterns to spot misleading or hard-to-read design choices before publishing

USE CASE 2

Use the side-by-side examples as teaching material in a data visualization course or workshop

USE CASE 3

Run the included R code to reproduce and adapt the example charts for your own presentations or papers

Tech stack

RRStudio

Getting it running

Difficulty · easy Time to first run · 5min

R and RStudio are only needed to run the example scripts, the charts and explanations in the README require no setup to read.

In plain English

"Friends Don't Let Friends Make Bad Graphs" is an opinionated guide to data visualization mistakes, written by a plant biology professor at Michigan State University. The repository serves as a visual essay rather than a software library, using R code to generate example charts that illustrate common pitfalls and show better alternatives side by side. The guide covers sixteen chart types and situations where poor design choices lead to misleading or hard-to-read results. Each entry includes before-and-after graphics along with an explanation of what goes wrong with the bad approach. The topics span a range of everyday mistakes: using bar plots to compare group means (which hides the actual distribution of data), drawing violin plots when the sample size is too small to have a meaningful shape, applying color scales that run from low to high when the data only goes in one direction, and making bar plot meadows where dozens of bars are crammed into a single chart with no clear grouping. Other entries address heat maps that skip the step of reordering rows and columns by similarity, heat maps that do not check for outliers before choosing a color scale, pie charts (which make precise comparisons difficult), concentric donut charts, red-green color pairings that are invisible to people with color blindness, and several more. Each mistake is explained in plain terms with a concrete example, and the R code to reproduce every graphic is included in the repository Scripts folder. The project was created as a teaching resource and has been cited with a formal DOI, suggesting it has been referenced in academic contexts. It requires R and RStudio to run the code, but the charts and explanations in the README can be read by anyone without running any code.

Copy-paste prompts

Prompt 1
I have a bar chart comparing group means across 4 categories. Based on the friendsdontletfriends guide, what chart type should I use instead to show the full data distribution?
Prompt 2
Using the friendsdontletfriends R scripts, help me recreate the small-sample violin plot mistake example and then show the better alternative for a dataset with only 8 data points.
Prompt 3
Which chart types in the friendsdontletfriends list are inaccessible to people with red-green color blindness, and what are the recommended color palette alternatives?
Prompt 4
Show me how to replace a bar plot meadow from friendsdontletfriends with a grouped or faceted chart that is easier to read.
Open on GitHub → Explain another repo

← cxli233 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.