Skip to content

Create interactive earthquake maps using GeoJSON data

Notifications You must be signed in to change notification settings

Geneille/Mapping_Earthquakes

Repository files navigation

Mapping_Earthquakes

Overview & Purpose

The main objective of this project was to create an interactive map using GeoJSON data. In general, the generated map comprise of three different map overlays, all recorded earthquake data over the 7 days, all the earthquakes with a magnitude greater than 4.5, and tectonic plates location on the earth.

Tools, Resources and Language

Analysis

Code was written in Javascript (see challenge_logic.js) to create the required map, and script was written in HTML so the map can load and be viewed on a webpage (see index.html). Necessary script files/links was rendered in the HTML file to ensure the map would populate as required and accurately. In general, the main steps used to produce the required map were:

  1. Use mapbox tile layer to create the background of the map and create the map object with center, zoom level and default layer.
  2. Add control to the map that will allow the user to change visible layers.
  3. Use d3.json() callback method to make a call to the tectonic plate and earthquake data
  4. Use Leaflet.js Application Programming Interface (API) to populate the geographical map with GeoJSON earthquake and tectonic plate data from a URL.
  5. Write functions to style the required map layers.
  6. Write code to create a legend for the earthquake data.

Results

The main features of the created map with images is listed below.

  1. A control feature that allows the user to change visible layers.

  2. Each earthquake was represented by a circle and color that matches certain features of the earthquake; the higher the magnitude of the earthquake the larger diameter and darker the color (see Figure 1 below).

    Figure 1. Map with a street layer showing earthquakes.

    3
  3. Each earthquake was enabled with a pop up feature that displays pertinent information relevant to the earthquake, as shown in Figure 1 above.

  4. A clearly visbile tectonic plate layer as displayed in Figure 2 below.

    Figure 2. Map with a dark overlay showing the Earth's tectonic plates.

    4

About

Create interactive earthquake maps using GeoJSON data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published