This map has been deployed to Render: https://visualizing-seismic-data.onrender.com
Note: To run this on your PC, you must use your own Mapbox token key.
Data source: USGS GeoJSON
For this step change the JavaScript in the index.html to Leaflet-Step-1/js/logic.js:
<script type="text/javascript" src="Leaflet-Step-1/js/logic.js"></script>
A map that plots all earthquakes in the past 7 days based on their longitude and latitude was created:
- Data markers reflect the magnitude of the earthquakes in their size and color. Earthquakes with higher magnitudes appears larger and darker in color.
- The map includes popups that provide additional information about the earthquake when a marker is clicked.
- A legend that provides context for the map data was created.
Data source: https://github.com/fraxen/tectonicplates
For this step change the JavaScript in the index.html to Leaflet-Step-2/js/logic.js:
<script type="text/javascript" src="Leaflet-Step-2/js/logic.js"></script>
- The second data set, with data on tectonic plates, was added to the map to illustrate the relationship between tectonic plates and seismic activity.
- Three base map layers were created to choose from: light, satellite, outdoors
- Two data sets, earthquakes and tectonic plates, were separated into overlays that could be turned on and off independently.
- Layer controls were added to the map.
- The legend for the earthquakes layer was configured to be turned on and off together with the layer
- When the earthquakes layer is on, it is kept always on top (helpful resource)
- JavaScript
- Leaflet.js
- D3.js
- HTML/CSS
- GeoJSON
- Mapbox API