Skip to main content

Section 12.4 Earthquake Tracker Assignment

Subsection 12.4.1 Goals

The purpose of this assignment is to learn to
  1. Access and manipulate remote data through BRIDGES.
  2. Manipulate a GraphAdjList object.
  3. Display a location on a map.
  4. Optionally, perform basic graph operation (connected component)
Please download: Earthquake.zip 1 

Subsection 12.4.2 Programming Tasks

Grab recent earthquake data and build a graph representing the locations of the 100 strongest earthquakes.
  1. Open your scaffolded code.
  2. Plug in your credentials.
  3. Get the most recent 10,000 earthquakes.
  4. Only retain the 100 highest magnitude earthquakes.

Subsection 12.4.3 Place Earthquakes on the map

  1. Create a graph where each earthquake is a vertex.
  2. Add no edges for now.
  3. Pin earthquakes at their longitude and latitude.
  4. Tweak the appearance of vertices if you want (e.g., use a different symbols for earthquake in Hawaii or Alaska).
  5. Compile, run, and visualize.

Subsection 12.4.4 Build a graph based on distances

For each pair of earthquakes:
  1. Compute the distance using calcDistance.
  2. If the earthquakes are closer than 500km, add an edge between them.
Compile, run, and visualize.

Subsection 12.4.5 Show just the graph

  1. Deactivate the map overlay (already done in the scaffolding).
  2. Unpin the vertices by setting their location to infinity.
  3. Compile, run, and visualize.
You have attempted of activities on this page.
bridgesuncc.github.io/assignments/data//4-GraphEQ/java.zip