Skip to content

Add USGS Earthquake Hazards API source#81

Open
mbtariq82 wants to merge 1 commit intocalesthio:masterfrom
mbtariq82:add-new-sources
Open

Add USGS Earthquake Hazards API source#81
mbtariq82 wants to merge 1 commit intocalesthio:masterfrom
mbtariq82:add-new-sources

Conversation

@mbtariq82
Copy link
Copy Markdown

@mbtariq82 mbtariq82 commented Mar 27, 2026

  • Integrate USGS real-time earthquake monitoring
  • Fetch significant earthquakes (M≥4.0 or tsunami warnings)
  • Display as markers on globe/map with magnitude-based sizing
  • Add to dashboard layers and signals

Summary

This PR adds the USGS Earthquake Hazards Program API as a new real-time data source to Crucix, providing natural disaster intelligence alongside existing geopolitical, economic, and satellite sources.

Why

Crucix provides comprehensive OSINT coverage but lacked natural disaster intelligence. Earthquakes represent critical signals that can:

Trigger geopolitical responses (humanitarian aid, border tensions)
Correlate with existing signals (radiation monitoring near nuclear sites, conflict zones)
Provide early warning for cascading events in volatile regions
Expand coverage into climate change and environmental monitoring domains
The USGS API fills this gap with reliable, real-time data that's free and doesn't require authentication.

Scope

  • Focused bug fix
  • Small UX improvement
  • New source
  • Dashboard change
  • Docs/config change

Validation

Commands run:

# Test USGS source standalone
node apis/sources/usgs.mjs

# Test full sweep integration  
node apis/briefing.mjs | findstr USGS

# Test dashboard server
node --trace-warnings server.mjs
netstat -ano | findstr :3117

Manual validation:
✅ USGS source returns structured earthquake data without errors
✅ Full sweep completes with 30 sources (29/30 successful)
✅ Dashboard server starts on port 3117
✅ Earthquake markers appear on globe/map with correct sizing
✅ Layer toggle includes new "Earthquakes" option
✅ No console errors in browser dev tools

Screenshots

Crucix - Screenshot 2026-03-27 174242

Config and Docs

  • No new environment variables
  • .env.example updated if needed
  • README.md updated if behavior changed

Source Additions

If this PR adds a new source, explain:

  • why the source improves signal quality
    The USGS source enhances Crucix's intelligence by adding natural disaster awareness, which often intersects with geopolitical events. Earthquakes can destabilize regions, trigger humanitarian crises, or correlate with military/nuclear activities. This provides early warning signals that complement existing conflict, radiation, and satellite monitoring.

  • whether it requires an API key
    No API key required - uses public USGS GeoJSON feed.

  • how it degrades when the key is missing
    Graceful degradation: If USGS API is down, source returns empty array with "No recent significant earthquake data" signal.

  • what changed in apis/briefing.mjs and dashboard/inject.mjs
    briefing.mjs: Added USGS import and runSource call in Tier 3
    inject.mjs: Added earthquake data processing and signal extraction

Checklist

  • This PR stays within one bugfix or one feature family
  • I kept unrelated changes out of the diff
  • I considered security for any mixed-source content rendering
  • I tested the changed path locally

- Integrate USGS real-time earthquake monitoring
- Fetch significant earthquakes (M≥4.0 or tsunami warnings)
- Display as markers on globe/map with magnitude-based sizing
- Add to dashboard layers and signals
- Update source count to 28 across codebase
- Add translations and README updates
@mbtariq82 mbtariq82 requested a review from calesthio as a code owner March 27, 2026 17:36
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.

2 participants