gitmyhub

FriendsDontLetFriends

R ★ 7.1k updated 9mo ago

Friends don't let friends make certain types of data visualization - What are they and why are they bad.

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.

RRStudiosetup: easycomplexity 1/5

"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.

Where it fits