USGS Earthquake

The USGS Earthquake Hazards Program provides a comprehensive global catalog of earthquake events. No API key is required.

MetaData(USGSEarthquake())
MetaData("", "20,000 events/query", :natural_hazards, Dict(:cdi => "Community Decimal Intensity", :felt => "Number of felt reports", :place => "Description of location", :sig => "Significance (0-1000)", :tsunami => "Tsunami association flag", :time => "Event time (ms since epoch)", :magType => "Magnitude type (ml, mb, mw, etc.)", :type => "Event type (earthquake, quarry blast, etc.)", :mmi => "Modified Mercalli Intensity", :alert => "PAGER alert level"…), :point, "Event-based", "Global", :timeseries, nothing, "Comprehensive catalog", "Public Domain", "https://earthquake.usgs.gov/fdsnws/event/1/", Dict("DataFrames" => "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"))

Bounding Box Query

Query earthquakes within a geographic bounding box. Results are returned as GeoJSON FeatureCollections.

# M4+ earthquakes in California, January 2024
plan = DataAccessPlan(USGSEarthquake(),
    Extent(X=(-125.0, -114.0), Y=(32.0, 42.0)),
    Date(2024, 1, 1), Date(2024, 1, 31);
    minmagnitude = 4.0)
plan
DataAccessPlan for usgsearthquake
  Extent:    Extent(X=(-125.0, -114.0), Y=(32.0, 42.0))
  Time:      2024-01-01 to 2024-01-31 (31 days)
  Variables: cdi, felt, place, sig, tsunami, time, magType, type, mmi, alert, mag, depth
  orderby: time
  limit: 20000
  minmagnitude: 4.0
  API calls: 1
  Est. size: 29.062 KiB

  Request 1: GET Extent(X=(-125.0, -114.0), Y=(32.0, 42.0)), 31 days → usgsearthquake/124a44893d7f0600.json
files = fetch(plan)
data = JSON.parsefile(files[1])
n = length(data["features"])
println("$n earthquakes found")
6 earthquakes found

Point + Radius Query

Query earthquakes within a radius (default 100 km) of a point:

plan = DataAccessPlan(USGSEarthquake(), (-122.4, 37.8),
    Date(2024, 1, 1), Date(2024, 12, 31);
    minmagnitude = 2.0)
plan
DataAccessPlan for usgsearthquake
  Extent:    Point(37.8, -122.4), radius 100 km
  Time:      2024-01-01 to 2024-12-31 (366 days)
  Variables: cdi, felt, place, sig, tsunami, time, magType, type, mmi, alert, mag, depth
  orderby: time
  limit: 20000
  minmagnitude: 2.0
  API calls: 1
  Est. size: 343.125 KiB

  Request 1: GET Point(37.8, -122.4), radius 100 km, 366 days → usgsearthquake/30e25efe084f1966.json

Filtering Options

Keyword Type Description
minmagnitude Float64 Minimum magnitude
maxmagnitude Float64 Maximum magnitude
mindepth Float64 Minimum depth (km)
maxdepth Float64 Maximum depth (km)
limit Int Max events returned (default 20,000)
orderby String Sort order: "time" or "magnitude"

Variables

Each earthquake feature includes:

Variable Description
mag Magnitude
place Description of location
time Event time (ms since epoch)
depth Depth (km)
felt Number of felt reports
cdi Community Decimal Intensity
mmi Modified Mercalli Intensity
alert PAGER alert level
sig Significance (0–1000)
tsunami Tsunami association flag
magType Magnitude type (ml, mb, mw, etc.)
type Event type (earthquake, quarry blast, etc.)