Skip to content

Converts ggplot2 and Base R plots into accessible format with MAIDR (Multimodal Access and Interactive Data Representation)

License

Notifications You must be signed in to change notification settings

xability/r-maidr

Repository files navigation

maidr maidr logo

R-CMD-check Lifecycle: experimental

Overview

maidr (Multimodal Access and Interactive Data Representation) makes data visualizations accessible to users with visual impairments. It converts ggplot2 and Base R plots into interactive, accessible HTML/SVG formats with keyboard navigation, screen reader support, and sonification.

The package provides two main functions:

  • show() displays an interactive accessible plot in RStudio Viewer or browser
  • save_html() exports a plot as a standalone HTML file

Installation

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

# Or install development version from GitHub
pak::pak("xability/r-maidr")

# Alternative: using pacman (auto-installs if missing)
pacman::p_load_gh("xability/r-maidr")

Usage

ggplot2

library(maidr)
library(ggplot2)

p <- ggplot(mpg, aes(x = class)) +
  geom_bar(fill = "steelblue") +
  labs(title = "Vehicle Classes", x = "Class", y = "Count")

# Display interactive accessible plot
show(p)

# Or save to file
save_html(p, "vehicle_classes.html")

Base R

library(maidr)

# Create plot first
barplot(
  table(mtcars$cyl),
  main = "Cars by Cylinder Count",
  xlab = "Cylinders",
  ylab = "Count"
)

# Then call show() without arguments
show()

Supported plot types

maidr supports common visualization types in both ggplot2 and Base R:

  • Bar charts (simple, grouped, stacked)
  • Histograms
  • Scatter plots
  • Line plots
  • Box plots
  • Heatmaps

Accessibility features

  • Keyboard navigation - explore data points using arrow keys
  • Screen reader support - full ARIA labels and live announcements
  • Sonification - hear data patterns through sound
  • Text descriptions - automatic statistical summaries

Getting help

Learning more

  • vignette("getting-started", package = "maidr") for an introduction
  • vignette("plot-types", package = "maidr") for supported visualizations
  • vignette("shiny-integration", package = "maidr") for Shiny apps

About

Converts ggplot2 and Base R plots into accessible format with MAIDR (Multimodal Access and Interactive Data Representation)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •