Appendix G — Accessibility

library(tidyverse)
library(sonify)
set.seed(8675309)

G.1 Visual Impairment

Here is some code to simulate different relationships.

dat <- tibble(
  x = seq(-3, 3, .01),
) |>
  mutate(
    none = rnorm(n()),
    linear_pos = x + rnorm(n()),
    linear_neg = -x + rnorm(n()),
    quadratic = x^2 + rnorm(n()),
    category = sample(c("control", "experimental"), n(), TRUE)
  )

G.1.1 Sonify

Siegert & Williams (2017)

No relationship sounds like a steady or randomly wavering tone.

ggplot(dat, aes(x = x, y = none)) +
  geom_point() +
  geom_smooth()
A scatterplot with 'x' on the x axis with range -3 to 3, and 'none' on the y-axis with range -3 to 3. There are 601 points (solid black circles) and a trendline at about y = 0 that curves up slightly at both ends.
Figure G.1
sonify(dat$x, dat$none)

A linear positive relationship sounds like an increasing tone.

ggplot(dat, aes(x = x, y = linear_pos)) +
  geom_point() +
  geom_smooth()
A scatterplot with 'x' on the x axis with range -3 to 3, and 'linear_pos' on the y-axis with range -6 to 6. There are 601 points (solid black circles) and a trendline with a slope of 1 (from -3, -3 to 3, 3). Points are spread out about +/- 2 from the trendline).
Figure G.2
sonify(dat$x, dat$linear_pos)

A linear negative relationship sounds like a decreasing tone.

ggplot(dat, aes(x = x, y = linear_neg)) +
  geom_point() +
  geom_smooth()
A scatterplot with 'x' on the x axis with range -3 to 3, and 'linear_neg' on the y-axis with range -6 to 6. There are 601 points (solid black circles) and a trendline with a slope of -1 (from -3, 3, to 3, -3). Points are spread out about +/- 2 from the trendline).
Figure G.3
sonify(dat$x, dat$linear_neg)

This quadratic relationship decreases in pitch and then increases.

ggplot(dat, aes(x = x, y = quadratic)) +
  geom_point() +
  geom_smooth()
A scatterplot with 'x' on the x axis with range -3 to 3, and 'linear_neg' on the y-axis with range -12 to 10. There are 601 points (solid black circles) and a trendline with a U-shaped quadratic pattern starting about -3, 8, with a lowest point of 0, 0, and ending about 3, 8. Points are spread out about +/- 2 from the trendline).
Figure G.4
sonify(dat$x, dat$quadratic)

G.1.2 BrailleR

BrailleR Godfrey et al. (2020)

# BrailleR was removed from CRAN recently, if it's not back, try
# remotes::install_github("ajrgodfrey/BrailleR")
library(BrailleR)
ggplot(dat, aes(x = x, y = linear_neg)) +
  geom_point() +
  geom_smooth()
This is an untitled chart with no subtitle or caption.
It has x-axis '' with labels -2, 0 and 2.
It has y-axis '' with labels -6, -3, 0, 3 and 6.
It has 2 layers.
Layer 1 is a set of 601 big solid circle points of which about 93% can be seen.
Layer 2 is a 'lowess' smoothed curve with 95% confidence intervals covering 2.9% of the graph.
A scatterplot with 'x' on the x axis with range -3 to 3, and 'linear_neg' on the y-axis with range -6 to 6. There are 601 points (solid black circles) and a trendline with a slope of -1 (from -3, 3, to 3, -3). Points are spread out about +/- 2 from the trendline).
Figure G.5

You can see it doesn’t alway get everything right. It only readds the axis labels if they have been explicitly set.

ggplot(dat, aes(x = category, y = quadratic, fill = category)) +
  geom_violin(show.legend = FALSE) +
  labs(x = "Category",
       y = "Score")
This is an untitled chart with no subtitle or caption.
It has x-axis 'Category' with labels control and experimental.
It has y-axis 'Score' with labels 0, 4 and 8.
The chart is a violin graph that VI cannot process.
A violin plot with 'category' on the x-axis and labels 'contol' and 'experimental', and `quadratic' on the y-axis with range -2 to 12. Two white shapes show the distribution, which is bottom-heavy and ranging from about -2 to 9 for both categories with no obvious difference.
Figure G.6

G.2 Resources