Skip to content

Use JavaScript's Leaflet library along with the Mapbox API to create visualizations of earthquake data from the U.S. Geological Survey.

Notifications You must be signed in to change notification settings

SYDsCorner/Mapping_Earthquakes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mapping_Earthquakes

0 09889000_1594303909_earthquake

Challenge Overview

Purpose:

The purpose of this analysis is to use JavaScript's Leaflet library along with the Mapbox API to create visualizations of GeoJSON earthquake data from the U.S. Geological Survey. The user will be able to select from 3 different map styles, street view, satellite view, and dark view. The user will also be able to toggle earthquakes in the past 7 days, tectonic plate lines, and major earthquake (magnitude greater than 4.5) locations.

Resources

Results

  • The interactive features

    • Earthquakes with tectonic plates

      EQ_with_TectonicPlates

    • Major Earthquakes with tectonic plates

      MajorEQ_with_TectonicPlates

    • Mapbox Styles

      • Streets Style:

        let streets = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}', {
          attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery (c) <a href="https://www.mapbox.com/">Mapbox</a>',
          maxZoom: 18,
          accessToken: API_KEY
        });
        

        1 streets_style

      • Satellite Streets Style:

        let satelliteStreets = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token={accessToken}', {
          attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery (c) <a href="https://www.mapbox.com/">Mapbox</a>',
          maxZoom: 18,
          accessToken: API_KEY
        });
        

        2 satellite_style

      • Dark Style:

        let dark = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/dark-v10/tiles/{z}/{x}/{y}?access_token={accessToken}', {
          attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery (c) <a href="https://www.mapbox.com/">Mapbox</a>',
          maxZoom: 18,
          accessToken: API_KEY
        });
        

        3 dark_style

Summary

  • This earthquakes map was built with earthquake data from around the world which came from the last seven days of earthquake GeoJSON data.
  • On the map,
    • The magnitude and the location of each earthquake will be shown in a popup marker.
    • The diameter of the markers for each earthquake will reflect the magnitude of the earthquakes in their size and color.
    • Earthquakes with higher magnitudes will appear larger and darker in color with a legend providing the context for the map data.
    • Finally, to illustrate the relationship between the location and frequency of seismic activity and tectonic plates, I added fault lines in the map.

About

Use JavaScript's Leaflet library along with the Mapbox API to create visualizations of earthquake data from the U.S. Geological Survey.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published