The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

GGenemy

Lifecycle: experimental CRAN status

Enemy of Bad Practices in Data Visualization

GGenemy is an R package that audits your ggplot2 visualizations for accessibility issues, misleading practices, and readability problems. Think of it as a linter for your data visualizations.

Why GGenemy?

Data visualizations can inadvertently mislead or exclude audiences through:

GGenemy catches these issues automatically and suggests fixes.

Installation

# Install from CRAN (coming soon)
install.packages("GGenemy")

# Or install development version from GitHub:
# install.packages("devtools")
devtools::install_github("andytai7/GGenemy")

Quick Start

library(GGenemy)
library(ggplot2)

# Create a plot with some issues
p <- ggplot(mtcars, aes(wt, mpg, color = factor(cyl))) +
  geom_point() +
  scale_color_manual(values = c("red", "green", "blue"))

# Run comprehensive audit
report <- gg_audit(p)
print(report)

Key Features

Comprehensive Auditing

# Check everything
gg_audit(your_plot)

# Check specific aspects
gg_audit(your_plot, checks = c("color", "scales"))

Color Accessibility

Detects problematic color combinations and suggests colorblind-safe alternatives:

gg_audit_color(your_plot)

Colorblind Simulation

See how your plot appears to colorblind users:

# Simulate different types of color vision deficiency
gg_simulate_cvd(your_plot, type = "deutan")  # green-blind
gg_simulate_cvd(your_plot, type = "protan")  # red-blind
gg_simulate_cvd(your_plot, type = "tritan")  # blue-blind

Scale & Axis Checks

Catches misleading practices:

gg_audit_scales(your_plot)

Automatic Fixes

Get code suggestions or apply fixes automatically:

# Get copy-paste code suggestions
gg_suggest_fixes(your_plot)

# Apply automatic fixes
fixed_plot <- gg_suggest_fixes(your_plot, auto_fix = TRUE)

Accessibility Auditing

Checks for:

gg_audit_accessibility(your_plot)

Example Workflow

library(ggplot2)
library(GGenemy)

# Create a problematic plot
problematic_plot <- ggplot(mtcars, aes(x = wt, y = mpg, color = factor(cyl))) +
  geom_point(size = 1) +
  scale_color_manual(values = c("red", "green", "blue")) +
  labs(title = "Plot", x = "wt", y = "mpg")

# Audit it
report <- gg_audit(problematic_plot)

# Get fix suggestions
gg_suggest_fixes(problematic_plot)

# Apply automatic fixes
improved_plot <- gg_suggest_fixes(problematic_plot, auto_fix = TRUE)

# View the improved plot
print(improved_plot)

Philosophy

GGenemy believes in:

  1. Accessibility First: Visualizations should be perceivable by everyone
  2. Honest Representation: Data should be presented without distortion
  3. Clarity Over Aesthetics: Readability trumps flashiness
  4. Constructive Guidance: We suggest fixes, not just criticisms

Roadmap

Contributing

GGenemy is in active development! Contributions are welcome:

Citation

citation("GGenemy")

License

MIT © Andy Man Yeung Tai


GGenemy: Making data visualization more accessible, honest, and clear.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.