Link Search Menu Expand Document

Homework 9

In this homework, you will be working with Altair in a Juypter notebook. Please read the entire assignment in full before you begin. You might find some helpful information in the Resources section.

Learning goals

  • Understand Altair, Data Types, Graphical Marks, and Visual Encoding Channels
  • Make informative graphs using data visualizations we discussed
  • Interact and transform the data
  • Iterate over graphs and select features that best show the data

Tasks

For this assignment, you will be doing Altair tasks, and you will share your solution in a Jupyter notebook.

You will be asked to perform the following series of tasks, all in jupyter notebook:

  • Import the COVID data (either through requests or through a CSV).
  • In a cell, write a comment that gives an example of Nominal, Ordinal, Quantitative, and Temporal data using the columns in the COVID dataset.
  • Start by creating a default graph where you visualize the relationships between two columns in the data using a default graph (using mark_point).
  • Modify the previous mark_point graph and use visualization elements and arguments to make the graphs easier for users to read and understand.
  • Using the previous two columns, make three new visualizations, choosing from mark_area(), mark_bar(), mark_circle(), mark_line(), mark_rect(), mark_rule(), mark_square(), mark_text(), mark_tick(). For each one, describe a pro and con to using this graph to visualize the data. For each one, also write a comment of what this type of graph allowed you to observe about the data.
  • Make another visualization, choosing from mark_area(), mark_bar(), mark_circle(), mark_line(), mark_rect(), mark_rule(), mark_square(), mark_text(), mark_tick(), where you transform the data (such as bins, averages, etc). Write a comment of what you observe about the data.

Bonus Challenge:

Find an example visualization from the Altair Example Gallery (https://altair-viz.github.io/gallery/), and copy the code into your own notebook, and get it to work with your data source (the COVID dataset).

Resources

https://uwdata.github.io/visualization-curriculum/altair_introduction.html

Tips and Suggestions

When making your graphs, do not try to do everything at once. First make sure the data is showing on the graphs, then start adding other elements/parameters.

Deadlines and Deliverables

The deliverable should be committed and pushed to the main branch of your repository on GitHub. It is due Tuesday, April 20th. Your notebook file (i.e. .ipynb) file should be committed and pushed to your homework repository in a hw9 subdirectory.