Starting from:

$30

ASSIGNMENT 5 AND 6- dataset (LifeOnEarth)


ASSIGNMENT 5 AND 6
You are given a dataset (LifeOnEarth) where each node is a species (living or extinct) of the earth.
Links between nodes represent ancestor/descendant relationship between species. The tree has been
made by biologists and is constantly evolving with research. The dataset is a tree (a connected graph
without any cycle). The root node id is 1.
Since the dataset contains 35960 species and 35959 links, this is too big for the d3 force layout to
update the force. Hence you have two options:
(A) To visualize a subset of the tree, and
(B) To visualize a summary of the tree by merging some subtrees into single nodes.
In A5, we will explore (A) and in A6, the idea (B).
A5: PLAY WITH FORCE!
Task 1 (80): You are given a test dataset (test.csv). The test data is constructed by taking 4896 rows
from the original data. Your task is to create a force layout for the graph of (test.csv) so that one can
see nice graph structure. Here is a sample output.
Task 2 (20): Add interaction to your visualization so that hovering the mouse on a node shows the
name of that node.
Submission Deadline: See Moodle 1
SUBMISSION
In this assignment you are allowed to choose any programming language. The marker will try
to run your code. However, to obtain a nonzero grade, you must add screenshots for the output
visualization supporting Tasks 1 and 2. Submit a zip file containing all your code and supporting
files.
A6: TREE DRAWING.
Task 1 (40): Write a program that takes an integer k as input. Then the program reads the dataset
(LifeOnEarth) and runs a loop. At each iteration, the algorithm deletes all the current leaves. The
loop will break as soon as the number of nodes in the tree becomes less than k. Here is an example
where k = 4. The loop terminates after the second iteration as the number of nodes is 3, which is less
than k.
input tree, k = 4 First iteration Second iteration
Write the output in a coreTree.csv file for the LifeOnEarth dataset with k = 100.
Task 2 (60): Draw the coreTree.csv so that it looks like a tree (drawn top to bottom, root at top).
Your tree must be crossing free and the labels must always show up on the node labels. You can try
different values of k for fun!
SUBMISSION
In this assignment you are allowed to choose any programming language. The marker will
try to run your code. However, to obtain a nonzero grade, you must submit coreTree.csv for
Task 1, and screenshots for the output visualization supporting Task 2. Please submit a zip file
containing all your code and supporting files.
Submission Deadline: See Moodle 2

More products