Assignment 5 - BST Construction Using Earthquake Data from USGS

Example Output

Learning Outcomes

  1. Binary Search Tree
  2. Data Visualization
  3. Conditions

Goals

The purpose of this assignment is to learn to

  1. Access remote data through BRIDGES.
  2. Manipulate a binary search tree using th earthquake magnitude (or some other attribute) as a search key

You will generate a visualization that looks like the figure above.

Description

Task

Build a binary search tree where each node represents an earthquake record

Steps

  1. Open your base code.
  2. Plug in your credentials.
  3. Compile and run the code and observe the basic binary search tree

Build the binary search tree with earthquake data

  1. Your BSTElement will use EarthquakeUSGS as the generic parameter, using float as the key type (BSTElement<float, EarthquakeUSGS)
  2. Write an insert() method, creating and inserting earthquake records into the the binary search tree, using the magnitude of the quake as a search key.
  3. Color the root node in a unique color, the remaining nodes in a different color.
  4. Traverse the tree to find the largest, smallest quakes, or highlight quakes by magnitude, by location, by date, etc.

Extensions

Help

For Java

BSTElement documentation

Element documentation

EarthquakeUSGS documentation

For C++

BSTElement documentation

Element documentation

EarthquakeUSGS documentation

For Python

BSTElement documentation

Element Documentation

EarthquakeUSGS documentation