Skip to content

Add wrapper tool for EONET v3 event search#104

Open
pushwithak wants to merge 1 commit into
NASA-IMPACT:developfrom
pushwithak:feature/eonet-tool
Open

Add wrapper tool for EONET v3 event search#104
pushwithak wants to merge 1 commit into
NASA-IMPACT:developfrom
pushwithak:feature/eonet-tool

Conversation

@pushwithak
Copy link
Copy Markdown

@pushwithak pushwithak commented May 12, 2026

Summary

EONETSearchTool wraps NASA's EONET v3 /events endpoint for natural-event discovery. EONET tracks wildfires, severe storms, volcanoes, floods, earthquakes, sea/lake ice, landslides, drought, dust/haze, snow, temperature extremes, water color anomalies, and manmade events worldwide. The API is public; no authentication required.

Filters

  • category — event type (wildfires, severeStorms, volcanoes, …); omit for all categories
  • statusopen / closed / all (default: open)
  • days OR start/end — recency window (mutually exclusive)
  • bbox — bounding box in standard (min_lon, min_lat, max_lon, max_lat) order; translated to EONET's (minLon, maxLat, maxLon, minLat) request format internally
  • limit — max number of events to return (1–100, default 10)
  • magnitude_id + magnitude_min / magnitude_max — magnitude filtering (e.g. kts for wind speed, ac for acres burned)

Output

Each EONETEvent returns:

  • Raw fields: id, title, description, link, closed, categories, sources, geometry
  • Derived helpers: bbox (envelope across all geometries in standard order), t_start, t_end

The derived spatiotemporal envelope lets downstream tools (CMR queries, Worldview deep links) consume event context without re-parsing GeoJSON.

Configuration (instance-level)

  • base_url, timeout
  • sources — optional allowlist of upstream provider IDs (e.g. ['InciWeb', 'USGS_EHP'])

Enums

EONETCategory and EONETStatus StrEnums added in structures.py.

Usage

from akd_ext.tools import EONETSearchTool, EONETSearchInputSchema
from akd_ext.structures import EONETCategory, EONETStatus

tool = EONETSearchTool()
result = await tool.arun(EONETSearchInputSchema(
    category=EONETCategory.WILDFIRES,
    status=EONETStatus.OPEN,
    bbox=[-124.0, 32.0, -114.0, 42.0],
    days=30,
    limit=10,
))
for event in result.results:
    print(event.id, event.title, event.bbox, event.t_start)

Tests: 8 unit (schema validation) + 11 integration (live EONET API).

- Wraps /api/v3/events with filters for category, status, time-range, bbox, and magnitude
- Each event carries derived bbox / t_start / t_end so downstream tools can consume the spatiotemporal envelope without re-parsing GeoJSON
- Bbox accepted in standard (min_lon, min_lat, max_lon, max_lat); translated to EONET's order internally
- Base URL, timeout, and source allowlist kept in config
- Added EONETCategory and EONETStatus enums in structures.py
- Added tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant