Skip to content
A gem exposing the U.S. Geological Survey's real-time earthquake data
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
tests
.gitignore
.rvmrc
Gemfile
README.md
Rakefile
quake.gemspec

README.md

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 with a magnitude of at least 2:

events = Quake::Event.last_week(2)
Something went wrong with that request. Please try again.