Coder Social home page Coder Social logo

quake's Introduction

Quake

Quake is a library exposing the U.S. Geological Survey's real-time earthquake data. As described on USGS' Earthquake Hazards Program, "earthquake information is extracted from a merged catalog of earthquakes located by the USGS and contributing networks. Earthquakes will be broadcast within a few minutes for California events, and within 30-minutes for worldwide events".

Installation

via Gem:

[sudo|rvm] gem install quake

via Bundler:

gem "quake"

Basic Usage

Fetch all the earthquakes from the past week:

events = Quake::Event.last_week

Fetch all the earthquakes from the past day:

events = Quake::Event.last_day

Fetch all the earthquakes from the past hour:

events = Quake::Event.last_hour

Fetch all the earthquakes from the past [week|day|hour] with minimum and/or maximum magnitudes:

events = Quake::Event.last_week :min_magnitude => 3
events = Quake::Event.last_week :max_magnitude => 4
events = Quake::Event.last_week :min_magnitude => 3, :max_magnitude => 4

Fetch all the earthquakes from the past [week|day|hour] with a minimum and/or maximum magnitude at or near a location (in km):

events = Quake::Event.last_week :min_magnitude => 2, :epicenter => "37.156, -117.3723"
events = Quake::Event.last_week :min_magnitude => 2, :epicenter => "37.156, -117.3723", :distance => 100

Questions or Problems?

If you have any issues, please add them to GitHub or fork the project and send a pull request (with tests of course). The tests are very straight forward, nothing more than minitest; yay for simplicity!

quake's People

Contributors

chrisbaglieri avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.