PDF Version Available

This document is also available in PDF format: wk13dataviz.pdf

The PDF version includes bookmarks for easy navigation and is optimized for printing.

Accessibility Notice

This document is also available in HTML format at:

Link: https://aholdengouveia.name/AdvData/labs/wk13dataviz.html

The HTML version provides enhanced accessibility features including keyboard navigation, screen reader support, responsive design, dark mode support, and high contrast options.

Request

Request: DATA-6874
Requested by: Operations manager at your company
Data: Your database, and your documented queries from the SQL Review labs

Background

Your manager has read your documented queries, but tables of numbers are hard to take into a meeting. They want charts that answer two of your business questions clearly and honestly, and that everyone on the team can read, including people who use screen readers or can't tell some colours apart.

Learning Outcomes

By the end of this lab, you will be able to:

Lab Instructions

Use your own data set and database. Books are my example data only.

To make charts, you need your query results in a spreadsheet. You can use any spreadsheet tool, such as Google Sheets, which you used in Introduction to Data, or Excel. Two ways to get your results into a spreadsheet, both linked under Resources:

Screenshots

Several parts of this lab ask for a screenshot. Each screenshot should have your name, term, and year. One of the easiest ways to do that is make a text document with your name and term/year on your computer and save it to use all term. Any screenshots that don't include this information won't be counted.

Example screenshot: a web browser showing the Google home page, with a small text editor window in front of it that says YOUR NAME HERE and TERM YEAR
This is an image of what each of your screenshots should look like

Part 1: Get Your Data

  1. Pick 2 of your business questions from the SQL Review labs whose answers would make a good chart. Queries that count, total, or average things by group usually work best. You can update a query, or write a new one, to answer the question better. GROUP BY, which you used in the SQL Scaling lab, is often useful here.
  2. Take a screenshot of each query and its results.

Part 2: Automatic and Designed Charts

For each of your 2 questions, make 2 charts, for 4 charts in total:

  1. An automatic chart: select your data, insert a chart, and keep whatever chart the tool picks, without changing anything.
  2. A designed chart: choose the chart type, title, axis labels, colours, and any notes on purpose, to answer the business question as clearly as you can.

For each designed chart, explain why you chose that chart type, and what you changed from the automatic chart and why.

Part 3: Evaluate Your Charts

  1. Evaluate all 4 charts with the data visualization checklist (linked under Resources), on all 7 points. If a point doesn't apply, explain why not.
  2. For each question, which of the 2 charts would you show your manager, and why?
  3. Check the numbers in each chart against your query results. Does each chart show your data accurately?

Part 4: A Misleading Chart

Make a misleading version of one of your designed charts, on purpose. For example, start the axis above zero so small differences look huge, show an average that hides a big spread, leave out some of the data, or use 3D so sizes are hard to compare.

  1. Show your original chart and the misleading version side by side.
  2. Explain what makes it misleading, and how someone could be fooled by it.
  3. What business decision could go wrong if your manager believed the misleading chart?

Part 5: Accessibility

For the 2 charts you'd show your manager:

  1. Write alt text: 1 or 2 sentences that give the main point of the chart, not just what kind of chart it is. For example, “Bar chart of books by genre. Classics is by far the biggest group, with 50 of 99 books, about three times as many as Fiction, the next biggest.”
  2. Check that your chart doesn't rely on colour alone. If it were printed in black and white, could you still tell everything apart? If not, add data labels or direct labels, and show the updated chart.
  3. Check the contrast of any coloured text against its background with the WebAIM Contrast Checker (linked under Resources), and give the result.

Acceptance Criteria

This request is done when:

Deliverables

One file that includes Parts 1 to 5.

Audience: your manager, the operations manager.

Resources

References, a video, a PowerPoint and some notes are available at my website Link: https://www.aholdengouveia.name/AdvData/Datavis.html

Data visualization checklist Link: https://www.aholdengouveia.name/AdvData/labs/DataVizChecklist.docx

My CSV to Database Converter, for turning query results into a CSV file Link: https://www.aholdengouveia.name/AdvData/labs/csv-to-database.html

SandboxSQL, for running your queries Link: https://www.sandboxsql.com/

Help for making charts in Google Sheets Link: https://support.google.com/docs/answer/63824

Help for making charts in Excel Link: https://support.microsoft.com/en-us/office/create-a-chart-from-start-to-finish-0baf399e-dd61-4e18-8a73-b3fd5d5680c2

WebAIM Contrast Checker Link: https://webaim.org/resources/contrastchecker/