Lab: Hierarchical & Structured Data

Assigned: Monday, Mar 6, 2017

Due: Friday, Mar 10, 2017 at 10:30pm

Collaboration: You should work with your assigned partner for this lab.

Overview

For this lab, you will use D3’s force-directed layout to visualize the structure of a large number of routers that make up the internet backbone. This lab will be more open-ended than usual; the only requirement is that you produce a visualization that summarizes at least some of the structure of the internet. You may exclude nodes to speed up the display, style or scale them to convey additional information, or any other adjustment you feel is reasonable. This does not have to be a perfect visualization, but it will be an opportunity for you to practice using the D3 examples and documentation to fine-tune a visualization.

Groups

  • Ruth, Peiyun, and Ritika
  • Kevin and Jinlin
  • Maddy and Linh
  • Tommy and Dennis
  • Ying and An
  • Ben and Uzo
  • Zachary and Connor
  • Bazil and Larry
  • Jemuel and Reilly
  • Minh and Nick R.
  • Alex and Sam
  • JaeEun and Nick K.
  • Trang and Logan

Getting Started

You can find the starter code, which includes the dataset you will visualize, on GitHub at grinnell-cs/datavis-network. The dataset is in a TSV file (which stands for “tab-separated values”). Each row describes an edge in the network. You will need to loop over the edges in this dataset to build a list of nodes before you can generate a visualization.

To build your visualization, you will want to refer to the D3-force API documentation. This example, which shows a small number of nodes, could be a useful starting point: D3 Force-Directed Graph.

I have a few recommendations for your visualization:

  1. You will need to do some pre-processing for your visualization. The dataset includes only edges in the network; you will need to build a list of nodes.
  2. Pay close attention to the requirements for d3.forceSimulation. Nodes must be objects, not simply strings or numbers.
  3. Try subsetting the data in a meaningful way. One possible strategy is to exclude nodes with fewer than 5 connections.
  4. Look at the settings for the force simulation. You can control the spacing of nodes by adjusting these forces.