Skip to content

Mapped weekly earthquake data through an API using Leaflet JavaScript Library. Visualized for the web.

Notifications You must be signed in to change notification settings

SherryKennedy/Earthquake_Leaflet

Repository files navigation

Earthquake_Leaflet

Mapped weekly earthquake data through an API using Leaflet JavaScript Library

  • Includes a Level 1 - basic mapping visualization
  • Level 2 - 2 datasets showing 2 overlays, several tiles to visualize the data on.
  • Final : Includes extra styles and a moveable legend.

NOTE: Config file: One must supply their own API_KEY from Map Box

Level 1: Basic Visualization

2-BasicMap

Visualized an earthquake data set.

  1. Get your data set

    3-Data

    The USGS provides earthquake data in a number of different formats, updated every few minutes. Visited the USGS GeoJSON Feed page and picked a data set to visualize. Clicked on a data set, for example "All Earthquakes from the Past 7 Days", one will be given a JSON representation of that data. Used the URL of this JSON to pull in the data for this visualization.

    4-JSON

  2. Import & Visualize the Data

    Created a map using Leaflet that plots all of the earthquakes from the data set based on their longitude and latitude.

    • The data markers reflect the magnitude of the earthquake by their size and and depth of the earthquake by colour. Earthquakes with higher magnitudes should appear larger and earthquakes with greater depth should appear darker in colour.

    • Included popups that provide additional information about the earthquake when a marker is clicked.

    • Created a legend provides context for the map data.

    • The visualization looks something like the map above.


Level 2: More Data

5-Advanced

Re-Plotted the USGS map (weekly earhtquakes) with a second data set (tectonic plate boundaries) on the map to illustrate the relationship between tectonic plates and seismic activity. Visualized the data using overlays. Data on tectonic plates can be found at https://github.com/fraxen/tectonicplates.

  • Plotted a second data set on the map.

  • Added a number of base maps to choose from as well as separate out the two different data sets into overlays that can be turned on and off independently.

  • Added layer controls to the map.

Final:

  • Added additional styling to the popups.
  • Revised the legend that to be movable.
  • Added a favicon for USGS.


© 2021 Trilogy Education Services, a 2U, Inc. brand. All Rights Reserved.

About

Mapped weekly earthquake data through an API using Leaflet JavaScript Library. Visualized for the web.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published