quaker
Lightweight Python CLI and API for USGS earthquake data
Description
quaker is a lightweight Python package that provides both a CLI and a Python API for downloading and querying earthquake data from the USGS Earthquake Hazards Program. It supports downloading events in multiple formats including CSV, GeoJSON, KML, QuakeML, and plain text. You can filter earthquakes by time range, magnitude, depth, and geographic area (rectangular bounds or circular radius). By default it returns events from the last 30 days.
Install
pip install quaker (or clone and pip install .)AI Summary
CLI and Python API for downloading USGS earthquake data with filtering by time, magnitude, depth, and location.
Capabilities
- + Download earthquake event data from USGS in CSV, GeoJSON, KML, QuakeML, or text
- + Filter by time range using ISO 8601 dates
- + Filter by magnitude range (min/max)
- + Filter by depth threshold
- + Search by geographic area (rectangular or circular radius)
- + Handle multi-page queries for large datasets
- + Use as a Python library for programmatic access
Use When
- → When you need to download recent earthquake data from the USGS
- → When analyzing seismic activity in a specific region or time period
- → When you need earthquake data in structured formats for analysis
Avoid When
- x When you need real-time earthquake early warning alerts
- x When you need data from non-USGS seismic networks
- x When you need a graphical map display of earthquakes
Usage Patterns
Download recent earthquakes as CSV
quaker download --format csv Downloads the last 30 days of earthquake data in CSV format
Filter by magnitude and date range
quaker download --format csv --starttime 2024-01-01 --endtime 2024-02-01 --minmagnitude 5.0 Downloads earthquakes of magnitude 5.0+ in January 2024
Search within a radius of a location
quaker download --format geojson --latitude 35.6 --longitude -117.3 --maxradiuskm 100 Downloads earthquakes within 100km of the specified coordinates
Typical Pipelines
quaker download --format csv --minmagnitude 4.0 | csvlens