The United States Geological Survey (USGS) is interested in building a new set of tools to visualize their earthquake data. The goal is to provide meaningful visualizations that can educate the public and government organizations about issues facing our planet. This challenge involves creating an earthquake visualization using Leaflet.
- HTML
- JavaScript
- Leaflet.js
- JSON
- Visit the USGS GeoJSON Feed page and choose a dataset to visualize.
- Select a dataset, such as "All Earthquakes from the Past 7 Days."
- Obtain the JSON representation of the data from the provided URL.
- Use Leaflet to create a map that plots all the earthquakes from the dataset based on their longitude and latitude.
- Reflect the magnitude of the earthquake by the size of the data markers.
- Reflect the depth of the earthquake by the color of the data markers. Earthquakes with higher magnitudes should appear larger, and earthquakes with greater depth should appear darker in color.
- Include popups that provide additional information about the earthquake when its associated marker is clicked.
- Create a legend to provide context for the map data.
The resulting visualization will allow users to explore earthquake data interactively, providing insights into the location, magnitude, and depth of recent earthquakes.