Hits the USGS FDSN /count endpoint with the same parameters as
get_quakes(), returning only the integer event count. Use this before a
large query to check whether you'll hit the 20,000-event cap.
Usage
count_quakes(
start_time,
end_time = Sys.time(),
min_mag = 2.5,
min_lat = -90,
max_lat = 90,
min_lng = -180,
max_lng = 180,
order_by = "time",
limit = NULL
)Arguments
- start_time
POSIXct or character (e.g.
"2026-03-01"). Start of the query window (UTC).- end_time
POSIXct or character. End of the query window (UTC). Defaults to now.
- min_mag
Minimum magnitude. Default
2.5.- min_lat, max_lat
Latitude bounds. Default global (
-90,90).- min_lng, max_lng
Longitude bounds. Default global (
-180,180).- order_by
Sort order:
"time"(default),"time-asc","magnitude", or"magnitude-asc".- limit
Maximum events to return (max 20,000).
NULLuses the USGS default.
