Lecture 17
Duke University
STA 113 - Fall 2023
Peer eval 1 due today at 5pm, comments will be published later this evening.
Set up a meeting with Shelby and your entire team for 30 minutes between today and next Tuesday to review your project.
Due date of last HW: Fri, Dec 8
What do they all have in common?
It is read by screen readers in place of images allowing the content and function of the image to be accessible to those with visual or certain cognitive disabilities.
It is displayed in place of the image in browsers if the image file is not loaded or when the user has chosen not to view images.
It provides a semantic meaning and description to images which can be read by search engines or be used to later determine the content of the image from page context alone.
"CHART TYPE of TYPE OF DATA where REASON FOR INCLUDING CHART`
+ Link to data source somewhere in the text
CHART TYPE
: It’s helpful for people with partial sight to know what chart type it is and gives context for understanding the rest of the visual.TYPE OF DATA
: What data is included in the chart? The x and y axis labels may help you figure this out.REASON FOR INCLUDING CHART
: Think about why you’re including this visual. What does it show that’s meaningful. There should be a point to every visual and you should tell people what to look for.Link to data source
: Don’t include this in your alt text, but it should be included somewhere in the surrounding text. [1] "state"
[2] "year"
[3] "total_employed_rn"
[4] "employed_standard_error_percent"
[5] "hourly_wage_avg"
[6] "hourly_wage_median"
[7] "annual_salary_avg"
[8] "annual_salary_median"
[9] "wage_salary_standard_error_percent"
[10] "hourly_10th_percentile"
[11] "hourly_25th_percentile"
[12] "hourly_75th_percentile"
[13] "hourly_90th_percentile"
[14] "annual_10th_percentile"
[15] "annual_25th_percentile"
[16] "annual_75th_percentile"
[17] "annual_90th_percentile"
[18] "location_quotient"
[19] "total_employed_national_aggregate"
[20] "total_employed_healthcare_national_aggregate"
[21] "total_employed_healthcare_state_aggregate"
[22] "yearly_total_employed_state_aggregate"
Write alt text for the line graph above.
Write alt text for the scatter plot above.
Scatter plots are among the more difficult graphs to describe, especially if there is a need to make specific data point accessible.
Accessible Visualization via Natural Language Descriptions: A Four-Level Model of Semantic Content
Alan Lundgard, MIT CSAIL
Arvind Satyanarayan, MIT CSAIL
IEEE Transactions on Visualization & Computer Graphics (Proceedings of IEEE VIS), 2021
To demonstrate how our model can be applied to evaluate the effectiveness of visualization descriptions, we conduct a mixed-methods evaluation with 30 blind and 90 sighted readers, and find that these reader groups differ significantly on which semantic content they rank as most useful. Together, our model and findings suggest that access to meaningful information is strongly reader-specific, and that research in automatic visualization captioning should orient toward descriptions that more richly communicate overall trends and statistics, sensitive to reader preferences.
Use colorblind friendly color scales (e.g., Okabe Ito, viridis)
nurses_subset |>
ggplot(aes(x = year, y = hourly_wage_median, color = state)) +
geom_point(size = 2) +
ggthemes::scale_color_colorblind() +
scale_y_continuous(labels = label_dollar()) +
labs(
x = "Year", y = "Median hourly wage", color = "State",
title = "Median hourly wage of Registered Nurses"
) +
theme(
legend.position = c(0.15, 0.75),
legend.background = element_rect(fill = "white", color = "white")
)
Deuteranopia: A type of red-green confusion
Default ggplot2 scale
Default ggplot2 scale with deuteranopia
Tritanopia: A type of yellow-blue confusion
Default ggplot2 scale
Default ggplot2 scale with tritanopia
Background and foreground text should have sufficient contrast to be distinguishable by users with different vision
Web app for checking color contrast checking: Colour Contrast Analyser
A WIP R package for checking for color contrast: coloratio
Use shape and color where possible
Default ggplot2 scale
Default ggplot2 scale with deuteranopia
Prefer direct labeling where color is used to display information over a legend
Quicker to read
Ensures graph can be understood without reliance on color
Default ggplot2 scale
Default ggplot2 scale with deuteranopia
Default ggplot2 scale
Default ggplot2 scale with deuteranopia
Separate elements with whitespace or pattern
Allows for distinguishing between data without entirely relying on contrast between colors
Default ggplot2 scale
Default ggplot2 scale with tritanopia
Default ggplot2 scale
Default ggplot2 scale with tritanopia
Find a colorblind friendly color palette other than viridis and those in the colorblindr package. This could be an R package that offers a colorblind friendly color palette or it could be just a palette you find online. Apply it to the scatterplot you previously wrote alt text for.
ggplot2::theme_set(ggplot2::theme_minimal(base_size = 16))
)Demo: Using custom fonts in ggplots!
When you design for accessibility, you benefit everyone
Data sonification is the presentation of data as sound, i.e., auditory equivalent of data visualization.
Data physicalization is the presentation of data as objects you can touch, i.e., sensory equivalent of data visualization.
Examples: https://datajournalism.com/read/longreads/lets-get-physical-how-to-represent-data-through-touch
COVID visualization examples:
Lundgard, Alan, and Arvind Satyanarayan. “Accessible Visualization via Natural Language Descriptions: A Four-Level Model of Semantic Content.” IEEE transactions on visualization and computer graphics (2021).
Silvia Canelón and Liz Hare. Revealing Room for Improvement in Accessibility within a Social Media Data Visualization Learning Community