Coder Social home page Coder Social logo

sherrykennedy / earthquake_leaflet Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.01 MB

Mapped weekly earthquake data through an API using Leaflet JavaScript Library. Visualized for the web.

HTML 8.40% CSS 2.99% JavaScript 88.61%
javascript leafletjs html5 css api geojson-data webvisualization

earthquake_leaflet's Introduction

Earthquake_Leaflet

Mapped weekly earthquake data through an API using Leaflet JavaScript Library

  • Includes a Level 1 - basic mapping visualization
  • Level 2 - 2 datasets showing 2 overlays, several tiles to visualize the data on.
  • Final : Includes extra styles and a moveable legend.

NOTE: Config file: One must supply their own API_KEY from Map Box

Level 1: Basic Visualization

2-BasicMap

Visualized an earthquake data set.

  1. Get your data set

    3-Data

    The USGS provides earthquake data in a number of different formats, updated every few minutes. Visited the USGS GeoJSON Feed page and picked a data set to visualize. Clicked on a data set, for example "All Earthquakes from the Past 7 Days", one will be given a JSON representation of that data. Used the URL of this JSON to pull in the data for this visualization.

    4-JSON

  2. Import & Visualize the Data

    Created a map using Leaflet that plots all of the earthquakes from the data set based on their longitude and latitude.

    • The data markers reflect the magnitude of the earthquake by their size and and depth of the earthquake by colour. Earthquakes with higher magnitudes should appear larger and earthquakes with greater depth should appear darker in colour.

    • Included popups that provide additional information about the earthquake when a marker is clicked.

    • Created a legend provides context for the map data.

    • The visualization looks something like the map above.


Level 2: More Data

5-Advanced

Re-Plotted the USGS map (weekly earhtquakes) with a second data set (tectonic plate boundaries) on the map to illustrate the relationship between tectonic plates and seismic activity. Visualized the data using overlays. Data on tectonic plates can be found at https://github.com/fraxen/tectonicplates.

  • Plotted a second data set on the map.

  • Added a number of base maps to choose from as well as separate out the two different data sets into overlays that can be turned on and off independently.

  • Added layer controls to the map.

Final:

  • Added additional styling to the popups.
  • Revised the legend that to be movable.
  • Added a favicon for USGS.


© 2021 Trilogy Education Services, a 2U, Inc. brand. All Rights Reserved.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.