Skip to contents

The 'maidr' package provides accessible, interactive visualizations through the MAIDR (Multimodal Access and Interactive Data Representation) system. It converts 'ggplot2' and Base R plots, and experimentally 'lattice' charts, into accessible HTML/SVG formats with keyboard navigation, screen reader support, and sonification capabilities. This enables users with visual impairments to independently explore and understand data visualizations through multiple sensory modalities.

Main Functions

  • show: Display an interactive MAIDR plot in the browser or RStudio Viewer

  • save_html: Save a plot as a standalone HTML file

  • run_example: Run interactive example plots

  • maidr_on: Turn automatic MAIDR interception back on

  • maidr_off: Disable automatic MAIDR interception

  • render_maidr: Render MAIDR plots in Shiny applications

  • maidr_output: Create MAIDR output container for Shiny UI

Supported Plot Types

The package supports a wide variety of plot types from both 'ggplot2' and Base R plotting systems:

ggplot2 plots:

Base R plots:

Experimental plot types: The types above are stable. The package also reads a longer list of charts as prototypes: none has been through a user study, and each may change without a deprecation period. In these docs an experimental type is marked [experimental] after its name; a type with no mark is stable. Every chart read from 'lattice' is one of them, whatever its layer type. Among them:

  • ggplot2 area charts [experimental]

  • ggplot2 contour plots - geom_contour() [experimental]

  • ggplot2 error bars [experimental]

  • ggplot2 Gantt charts - maidr_gantt() [experimental]

  • ggplot2 hexbin plots [experimental]

  • ggplot2 ROC curves - maidr_roc() [experimental]

  • ggplot2 precision-recall curves - maidr_pr_curve() [experimental]

  • ggplot2 volcano plots - maidr_volcano() [experimental]

  • ggplot2 Manhattan plots - maidr_manhattan() [experimental]

  • ggplot2 Kaplan-Meier curves - maidr_survival(), survminer::ggsurvplot() [experimental]

  • ggplot2 percentile bands - ggdist::stat_lineribbon(), stat_summary(geom = "ribbon", fun.data = median_hilow) [experimental]

  • ggplot2 directed graphs - ggraph::ggraph() [experimental]

  • Base R correlograms [experimental]

  • Base R Q-Q plots [experimental]

  • Base R radar charts - stars() [experimental]

  • Base R mosaic plots [experimental]

  • Base R violin plots - vioplot::vioplot() [experimental]

  • Base R word clouds [experimental]

  • lattice bar charts (simple, grouped, stacked) - barchart() [experimental]

  • lattice histograms - histogram() [experimental]

  • lattice box plots - bwplot() [experimental]

  • lattice scatter, line, step and lollipop plots - xyplot() [experimental]

  • lattice density curves - densityplot() [experimental]

  • lattice dot plots - dotplot() [experimental]

  • lattice heat maps - levelplot() [experimental]

  • lattice contour plots - contourplot() [experimental]

  • lattice conditioned (multi-panel) charts - y ~ x | g [experimental]

The full list is under "Experimental Plot Types" in the README.

Accessibility Features

  • Keyboard Navigation: Use arrow keys to explore data points

  • Screen Reader Support: ARIA labels and live regions for announcements

  • Sonification: Audio representation of data patterns

  • Text Summaries: Automatic statistical descriptions

  • Grid Navigation: Efficient exploration of scatter plots

Integration

The package integrates seamlessly with:

  • RStudio: Direct display in the Viewer pane

  • R Markdown/Quarto: library(maidr) in the document makes its plots accessible charts, inline in an HTML page; so does rendering it in a session where maidr is loaded, even only its namespace

  • Shiny: Interactive plots in Shiny apps via render_maidr()

  • Standalone HTML: Export plots for sharing with save_html()

Getting Started

To create your first accessible plot:


library(maidr)
library(ggplot2)

# Create a ggplot2 plot
p <- ggplot(mtcars, aes(x = factor(cyl), y = mpg)) +
  geom_boxplot()

# Display as interactive MAIDR plot
show(p)

# Or save to HTML file
save_html(p, file = "my_plot.html")

For Base R plots:


library(maidr)

# Create a Base R plot
barplot(table(mtcars$cyl))

# Display as interactive MAIDR plot
show()

Author

Maintainer: JooYoung Seo jseo1005@illinois.edu [copyright holder]

Authors: