Assignment 5 - BST Construction Using Earthquake Data from USGS
Example Output
Learning Outcomes
- Binary Search Tree
- Data Visualization
- Conditions
Goals
The purpose of this assignment is to learn to
- Access remote data through BRIDGES.
- 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
- Open your base code.
- Plug in your credentials.
- Compile and run the code and observe the basic binary search tree
Build the binary search tree with earthquake data
- Your
BSTElement
will use EarthquakeUSGS
as the generic parameter, using
float as the key type (BSTElement<float, EarthquakeUSGS)
- 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.
- Color the root node in a unique color, the remaining nodes in a different
color.
- 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