CAPP 30239 - Data Visualization for Policy Analysis

Data visualizations are powerful tools that can be used to explore, explain, convince and mislead. When working with data in a policy context, the clarity of a visualization and choices made during its design can have repercussions on the people that find themselves represented by pixels on a screen.

This course introduces important theoretical concepts for data visualization, focusing on explanatory visualization— building visualizations to explain or persuade. We will cover theory related to visualizations like perception of color and common visualization programming paradigms, primarily grammar of graphics.

In addition to the theory-focused content the course will have a significant programming component: starting with a major Python visualization library (Altair), and providing an introduction to the ubiquitous D3 library. The latter will require picking up a bit of HTML, CSS, and JavaScript as we go.

!!! warning “What to Expect”

While lecture content will focus on theoretical concepts, expect to write a significant amount of code independently.

You will be writing quite a few visualizations in Python, and may need to clean & prepare some data as a prerequisite to producing your visualizations.

In the latter half of the course we will cover _some_ HTML/CSS/JavaScript, with the expectation that you will spend some time outside of class learning these from online materials.

Two major assignments will have you building out a data visualization portfolio related to policy areas of your own choosing. These assignments will include peer critique— productive critique and incorporation of feedback is essential to building effective visualizations.

Goals

  • Understand & appreciate what makes a good data visualization.
  • Learn practical visualization techniques that will apply in any language & library.
  • Build a portfolio of static & interactive visualizations using real-world policy data.
  • Gain exposure to useful libraries in Python and JavaScript.

Prerequisites

  • CAPP 30122 (Computer Science with Applications 2) or equivalent
  • CAPP 30235 (Databases for Public Policy) or equivalent

Course Staff

James Turk

Email: jturk@uchicago.edu

Office: JCL 398E

Teaching Assistant: Nguyen Tran

Office Hours

Who Where When
James Turk JCL 398E Tuesday 3:30-5:00pm
James Turk JCL 398E Thursday 3:30-4:30pm
Nguyen Tran JCL JCL Common Area 2A Friday 10:30am-11:30am
Nguyen Tran Zoom (See Ed Post) Saturday 10:30am-11:30am

!!! note

James also has openings for appointments available: <https://cal.com/jamesturk/autumn-office-hours>

Please note that these are limited and they are shared between multiple classes. Please be considerate in your usage and favor the drop-in office hours for help on assignments.

Schedule

Time: Tuesday & Thursday, 2:00pm-3:20pm

Location: Ryerson 276

Week Tuesday Thursday
1 Sep 30
The Value of Data Visualization
Oct 2
Grammar of Graphics with Altair
2 Oct 7
Perception and Color
Oct 9
Color on the Screen
3 Oct 14
Chart Design
Oct 16
Models of Good Visualization
4 Oct 21
Evaluation & Critique: Practice Discussion
Oct 23
Narrative
5
Web Week 1
Oct 28
HTML/CSS
Oct 30
SVG
6
Web Week 2
Nov 4
JS
Nov 6
D3
7
Nov 11
Uncertainty
Nov 13
Animation & Interaction
8 Nov 18
Mapping in the Browser
Nov 20
More Animation & Interaction
Thanksgiving No Class
9 Dec 2
Special Topics
Dec 4
Wrap-Up

See Coursework for more details on assignments.

Readings

TODO: update/link readings

Software

This course will be using Altair and D3.js for instruction and assignments.

For your project, you will be free to use other libraries.

Pre-approved options:

  • Altair
  • Seaborn
  • plotnine
  • D3 (JS)
  • Vega (JS)
  • P5.js (JS)

If you’d like to use a framework not already on this list, please ask first.

You may not use:

  • matplotlib (except as a dependency to other libraries, like Seaborn)
  • streamlit
  • Plotly Dash

!!! warning

If you choose a library other than Altair or D3, please understand that course staff will be more limited in their ability to provide assistance.

Coursework

There are two major assignments, each of which will earn a total of six SNU grades (spread across four milestones):

There are also a handful of additional small assignments each with a single grade. The grading scheme is designed in a way to allow you to consider some of these to be optional depending on what you hope to get out of the course & your available time.

Assignment Schedule

  • Assignments will be posted at least a week before they are due, typically more.
  • All work is due by 11:59pm on the stated day.
Assignment Points Late Allowed? Date Week
Static Project Proposal 1 Y Saturday, Oct 4 1
Altair Practice 1 Y Friday, Oct 10 2
Analysis: Part 1 0.5 N Monday, Oct 13 3
Static Feedback Draft 1 Y Saturday, Oct 18 3
Static Peer Critique 1 N Saturday, Oct 25 4
Analysis: Part 2 0.5 N Tuesday, Oct 28 4
Static Final Deliverable 3 Y Monday, Nov 3 6
HTML/CSS Practice 1 Y Friday, Nov 7 6
Interactive Proposal 1 Y Friday, Nov 7 6
Analysis: Part 3 1 N Sunday, Nov 16 7
Interactive Prototype 1 Y Friday, Nov 21* 8
Interactive Peer Critique 1 N Monday, Dec 1 9
d3 Practice 1 Y Friday, Dec 5 9
Portfolio Site 1 Y Friday, Dec 5 9
Interactive Final Deliverable 3 N Monday, Dec 8 (Project Fair 11am-1pm) 10
Participation Grade 1

Late Work

You start the quarter with three 24 hour “lateness tokens”.

These tokens may be distributed as you wish among any projects where lateness is allowed. (indicated above) Submitting an assignment between 1 and 24 hours late will use a token.

Submitting an assignment late without tokens to spend will result in penalty. Certain assignments, particularly those related to peer critique, may not be submitted late without immediate penalty.

The penalty for late work is having the maximum grade capped at an N. After 48 hours it may be deemed Ungradable.

Given the fact that the major projects have the concept of resubmission & revision built in, there is no room in the schedule for additional resubmissions of work.

Grading

Each assignment/milestone will be graded on an S/N/U scale:

Grade Points Rationale
Satisfactory 1 The work meets the necessary criteria with no major omissions.
Needs Improvement 0.5 The work fails to meet one or more major criteria, or a large number of minor criteria.
Ungradable 0 The work does not meet even the minimal criteria to be considered complete (~50% of task).

As described in more detail on their respective pages, the final submissions of the two projects will earn multiple grades: Visual Design, Narrative, and Code Quality.

Final Grade

There will be 19 points available (6 from static, 6 from interactive, and 7 from small assignments).

There is some intentional padding in the grading scheme. This is intended to compensate for the trade-offs one must make when working at this pace & taking two other classes.

You may skip a small assignment here or there depending on your schedule & what you hope to get out of the course. It is also possible to submit half-complete work for partial credit, which may be a good approach if you feel you’ve gotten what you need out of a practice exercise.

!!! note

In the interest of fairness, I will not make individual extensions in this class barring legitimate emergencies.

The aforementioned padding & late policy are intended to provide for busy weeks and small personal disruptions.
Minimum Score Grade
17 A
16 A-
15 B+
14 B
13 B-
11 C+
<11 will be discussed

Acknowledgments

Thanks to Andrew McNutt and Alex Kale for providing resources that were invaluable in the creation of these materials.