Earthquake data is continuously measured and traced by the United States Geological Survey (USGS). In addition to the earthquake's location and time, the USGS note other features such as its depth and magnitude. index.html and https://sbowe1.github.io/leaflet-javascript/ display this earthquake data plotted on a world map, courtesy of JavaScript and Leaflet.
A screenshot of the final map created in Part 2 is shown below.
From the USGS GeoJSON feed, the "M2.5+ Earthquakes from the Past 30 Days" dataset was accessed and used. Each feature was converted into a circle marker, with its size corralating to the earthquake's magnitude and the color with its depth in kilometers. When clicked, a popup describes the earthquake's location, time, magnitude, and depth.
The JavaScript code for Part 1 is in earthquake.js.
Part 2 builds on the map generated in Part 1, adding in Tectonic Plate boundaries and providing other options for the base of the map. Tectonic plate boundaries were obtained from Github user fraxen in JSON format. The Tectonic Plates appear as red-orange lines across the map. On the top right of the screen, a menu allows for toggling between base map options and turning the earthquake and tectonic plate layers on/off.
The JavaScript code for Part 2 is in tectonic.js.