Polishing Charts

Due: Nov 02 by 11:59pm

Weight: This assignment is worth 1% of your final grade.

Purpose: The purpose of this assignment is to finish the data visualization skill you have been building since week 6 by adding your own house style (colors, fonts, scales, and annotations), then use it to polish a chart and check that the polish didn’t introduce anything wrong.

Assessment: This assignment is graded using a check system:

  • ✔+ (110%): Responses shows phenomenal thought and engagement with the course content. I will not assign these often.
  • ✔ (100%): Responses are thoughtful, well-written, and show engagement with the course content. This is the expected level of performance.
  • ✔− (50%): Responses are hastily composed, too short, and/or only cursorily engages with the course content. This grade signals that you need to improve next time. I will hopefully not assign these often.

Notice that this is essentially a pass/fail system. I’m not grading your writing ability and I’m not counting the number of words you write - I’m looking for thoughtful engagement. One or two sentences is not enough. Write at least a paragraph and show me that you did the readings assigned.

1. Get Organized

Open your course repo (eda-f26/eda-netID) in Positron using File › Open Folder - open the folder itself, not a file inside it. If you haven’t cloned your course repo yet, follow the steps in HW1 first.

Everything for this assignment lives in the hw9 folder. Open the hw9.qmd file inside it - that’s the only file you need to edit. Take notes and write example code under the “Begin notes here” heading as you go through the readings and exercises below, then write your reflection under the “Reflection” heading at the end.

2. Read & Practice

This week we’ll get into the weeds with techniques for polishing up your charts. This is a critically important step for making your charts easy for others to understand and effective as a central tool for communicating important results. It’s also where you can be highly creative!

The readings listed below are broken into two groups:

  1. Design principles
  2. Coding techniques to implement those principles

Design principles

Color is the part of polishing that’s easiest to get wrong, so most of the design readings focus on it: which kind of color scale fits which kind of data, and the common ways color goes wrong (too many colors, colors that mean nothing, and colors that people with color vision deficiencies can’t tell apart).

Coding techniques

The R4DS chapter below covers most of the ggplot tools for polishing: labels and titles, annotations, scales, legends, and themes. An agent can write all of this code for you, but polish is also where an agent is most likely to slip something past you. It will happily write a title or annotation that makes a claim the data doesn’t support, or format numbers in the wrong units, and the chart will look great while saying something false. You need to know these tools well enough to read the code and check what it’s doing.

  • R4DS: 11 - Communication
  • The scales package, which formats axis labels (e.g., label_percent(), label_dollar(), label_comma())

Optional:

3. Finish your skill, then polish a chart

Over the past few weeks you have built up your own data visualization skill (e.g., .claude/skills/my-dataviz/SKILL.md) with guidance for different kinds of charts. This week you will add the finishing layer: your house style. When you’re done, you’ll have one skill you can use to make polished charts for Mini Project 3 and your final project.

Add your house style

  1. Open Claude Code in your course repo and ask it to help you add a section on polishing to your existing skill, using the readings above as source material (you can give it the URLs). Ask it to extend the skill you already have, not write a new one.
  2. Read what it wrote. Does the new section capture the guidance from the readings? Some things worth checking for:
    • Does it set a color palette, and is that palette color blind friendly?
    • Does it say what makes a good title (e.g., stating the main takeaway rather than just naming the variables)?
    • Does it say how to format numbers on axes using the scales package (percentages, dollars, commas)?
    • Does it say when to directly label or annotate instead of using a legend?
    • Does it say when it’s okay (and not okay) to truncate an axis or use a log scale?
  3. Make it yours. This is your house style, so make choices you like. Pick your fonts, your theme, your palette, and your rules for titles and captions. If you set a palette or theme in week 6, decide if you still like it.

Polish a chart

Go back to a chart you made earlier in the semester (in class, in a previous homework, or for your project). Ask Claude to polish it using your skill (invoke it with /your-skill-name), then check the result:

  • Check every claim. Read the title, subtitle, and every annotation, and verify each one against the data. If the title says something “doubled” or was “the highest ever,” confirm it in the data yourself. This is the most important check.
  • Check the colors. Save the chart as an image with ggsave(), then run colorspace::cvd_emulator("your-chart.png") from the colorspace package to see what it looks like to someone with a color vision deficiency. Can you still tell the groups apart?
  • Check the scales. Are the numbers formatted in the right units? If an axis doesn’t start at zero, or uses a log scale, is there a good reason?

If something is wrong, fix it, and consider whether your skill should be updated so that it gets it right next time.

In your hw9.qmd file, include:

  • A few sentences on what you put in your house style, and what you changed after Claude drafted it.
  • The before and after versions of your chart, side by side or one after the other.
  • A few sentences on what you had to check or correct. Did any title or annotation make a claim that wasn’t quite right? How did the colors hold up in the color vision deficiency check?

4. Reflect

This week, include in your reflection an image or link to a chart you’ve seen that you felt was really well-polished, and say specifically what makes it look polished.

Reflect on what you’ve learned while going through these readings and exercises. Is there anything that jumped out at you? Anything you found particularly interesting or confusing?

Write at least a paragraph in your hw9.qmd file, and include at least one question. The teaching team will review the questions we get and will try to answer them either in Slack or in class.

Some thoughts you may want to try in your reflection:

  • “I used to think ______, now I think ______ 🤔”
  • Discuss some of the key insights or things you found interesting in the readings or recent class periods.
  • Connect the course content to your own work or project you’re working on.

5. Submit

To submit your assignment, follow these instructions:

  1. Render your .qmd file by either clicking the “Preview” button in Positron or running quarto render in the terminal.
  2. Open the rendered html file and make sure it looks good! Is all the formatting as you expected?
  3. Commit and push your work using GitHub Desktop: look at the diff, write a short commit message, click Commit, then Push.
NoteRemember

Your work isn’t submitted until you’ve pushed it. Committing only saves the change on your own computer – go look at your repo on GitHub.com and confirm your work is actually there before you call this done.