Using Mapbox & Leaflet maps displaying the most recent earthquakes over the past 7 days. API calls to retrieve data including GeoJSON.
The objective is to use a URL for GeoJSON earthquake data from the USGS website and retrieve geographical coordinates and the magnitudes of earthquakes for the last seven days. Create an interactive map with three different map styles, displaying earthquake and tectonic data, using styles to display earthquake data based on magnitude, and using lineString to display tectonic plate data.
- Create webpage with HTML.
- Add style and legend with CSS.
- Use JavaScript and the D3.js library to retrieve the coordinates and magnitudes of the earthquakes from the GeoJSON data.
- Use the Leaflet library to plot the data on a Mapbox map through an API request and create interactivity for the earthquake data.
- Data Source: Earthquake data from the past 7 days is obtained in GeoJSON format from the USGS website Tectonic plate data is obtained in GeoJSON format from fraxen's GitHub repository
- Software: HTML, CSS, JavaScript, D3, Leaflet, Mapbox, Visual Studio Code, 1.73.0