Extreme Events Dashboard, Atmosphere to Magnetosphere

Unify severe weather alerts, earthquakes, wildfires, and space weather with a coordinated map and timeline.

Earthquakes

  • M 1.7 - 13 km SSW of Tres Pinos, CA12:44:34 PM
  • M 1.3 - 5 km NNW of The Geysers, CA12:29:39 PM
  • M 0.7 - 56 km NW of Karluk, Alaska12:16:42 PM
  • M 0.7 - 17 km ESE of Livengood, Alaska12:15:52 PM
  • M 1.0 - 22 km ESE of Skwentna, Alaska12:14:19 PM
  • M 1.1 - 23 km SSW of Susitna North, Alaska12:07:18 PM
  • M 2.0 - 21 km SSW of Ludlow, CA12:05:49 PM
  • M 1.7 - 8 km ENE of Calumet, Oklahoma11:57:07 AM
  • M 2.2 - 5 km SW of Fuig, Puerto Rico11:41:20 AM
  • M 1.8 - 13 km SSW of Tres Pinos, CA11:41:13 AM
  • M 1.0 - 17 km NNW of Borrego Springs, CA11:31:57 AM
  • M 2.3 - 1 km ESE of Indios, Puerto Rico11:24:33 AM

NWS Alerts

    Provenance: USGS Earthquakes, NWS Alerts, NASA DONKI • View API JSON
    Tip: Provide NASA_API_KEY to enrich space weather events.

    Space Weather

    Kp
    Bz
    km/s
    0.00
    factor

    Recent events

    • 🌋M 1.7 - 13 km SSW of Tres Pinos, CA12:44:34 PM
    • 🌋M 1.3 - 5 km NNW of The Geysers, CA12:29:39 PM
    • 🌋M 0.7 - 56 km NW of Karluk, Alaska12:16:42 PM
    • 🌋M 0.7 - 17 km ESE of Livengood, Alaska12:15:52 PM
    • 🌋M 1.0 - 22 km ESE of Skwentna, Alaska12:14:19 PM
    • 🌋M 1.1 - 23 km SSW of Susitna North, Alaska12:07:18 PM
    • 🌋M 2.0 - 21 km SSW of Ludlow, CA12:05:49 PM
    • 🌋M 1.7 - 8 km ENE of Calumet, Oklahoma11:57:07 AM
    • 🌋M 2.2 - 5 km SW of Fuig, Puerto Rico11:41:20 AM
    • 🌋M 1.8 - 13 km SSW of Tres Pinos, CA11:41:13 AM
    • 🌋M 1.0 - 17 km NNW of Borrego Springs, CA11:31:57 AM
    • 🌋M 2.3 - 1 km ESE of Indios, Puerto Rico11:24:33 AM
    • 🌋M 5.8 - 159 km SE of Vilyuchinsk, Russia11:21:06 AM
    • 🌋M 0.4 - 3 km ESE of Lake Henshaw, CA11:11:31 AM
    • 🌋M 0.7 - 59 km ENE of Pedro Bay, Alaska11:04:50 AM
    • 🌋M 2.3 - 18 km W of Petersville, Alaska10:53:26 AM
    • 🌋M 0.9 - 14 km NNE of Houston, Alaska10:52:09 AM
    • 🌋M 1.1 - 33 km SSE of Goldfield, Nevada10:50:36 AM
    • 🌋M 2.2 - 14 km NW of Ninilchik, Alaska10:44:11 AM
    • 🌋M 2.7 - 12 km NW of Pinnacles, CA10:35:05 AM
    Provenance: USGS Earthquakes, NWS Alerts, NASA DONKI • View API JSON

    Build goals

    Unify severe weather alerts, earthquakes, wildfires, and space weather with a coordinated map and timeline.

    Stack

    • Frontend: React 18, Mapbox GL or deck.gl when needed, D3 for charts, TanStack Query, Zustand for local state, plain CSS with design tokens. No runtime CSS frameworks.
    • API: Python 3.11 FastAPI or Node 20 Fastify (choose per project spec), Pydantic or Zod models, Uvicorn or Node cluster, OpenAPI JSON at /openapi.json.
    • Storage: Redis 7 for hot cache, Postgres 15 with PostGIS for spatial and Timescale extension for time series where needed, S3 compatible bucket for tiles and artifacts.
    • Ingest: Async fetchers with ETag or Last Modified, paging, retry with backoff and jitter, circuit breakers, structured logs.
    • Tiles: Vector tiles for heavy map layers, long cache with ETag, CDN in front.
    • Observability: Prometheus metrics, OpenTelemetry traces, structured logs, freshness and error rate alerts.
    • Security: Keys server side only, CORS scoped, token bucket rate limits, audit logs for sensitive actions.

    Data sources

    SourceEndpointCadenceAccessAuthNotes
    NWS Alertsapi.weather.gov/alertsreal timeREST JSONNoneCAP alerts and polygons
    USGS Earthquakesearthquake.usgs.gov/earthquakes/feed/v1.0/summaryreal timeGeoJSONNoneGlobal events
    NASA DONKIapi.nasa.gov/DONKIfrequentREST JSONKeySolar events
    NOAA SWPCservices.swpc.noaa.govreal timeHTTP, JSONNoneKp, solar wind, alerts
    NASA FIRMSfirms.modaps.eosdis.nasa.gov/apinear real timeREST, GeoJSONKeyActive fires
    GDACSgdacs.org/gdacsapifrequentRESTNoneGlobal disasters

    Architecture

    FastAPI, async fetchers, normalized Event model, immutable event log for replay, Redis hot store, Postgres daily persistence, WebSocket broadcast.

    Models

    Models are expressed in DB tables and mirrored as API schemas. All timestamps are UTC. All coordinates are WGS84. Stable IDs, soft deletes by valid_to when needed.

    • event(guid, source, ts_start, ts_end, geom, type, severity, payload jsonb)
    • space_nowcast(ts, kp, bz, speed, density, alerts jsonb)
    • fire_point(id, ts, geom, confidence)

    Algorithms

    • Ingest normalization to common event schema
    • TTL expiry by source metadata
    • Deterministic 48 hour replays driven by immutable log

    API surface

    • GET /events?bbox=&type=&since=&until=&severity=
    • GET /space/nowcast
    • GET /replay?since=&until=
    • WS /events/stream

    UI and visualization

    • Map with hazard symbols and clustering
    • Right rail gauges for space weather
    • Chronological event feed with provenance
    • Replay scrubber for last 48 hours
    • Keyboard filters, print friendly incident reports

    Performance budgets

    • Load 50 thousand points, p95 frame under 20 ms with clustering
    • Replay at 30 fps on mid tier GPU
    • Freshness under 5 minutes for NWS and USGS
    • FCP under 2 s on broadband mid tier laptop.
    • API p95 under 300 ms for common list endpoints, p99 under 800 ms.
    • Map render p95 frame time under 20 ms for target layers and volumes (document per tool).
    • Frontend app code under 180 KB gzip excluding map library.
    • API memory under 200 MB under normal load.

    Accessibility

    • WCAG 2.2 AA, automated axe checks clean, no critical issues.
    • Keyboard navigable controls, focus rings visible, ARIA roles correct.
    • Color contrast at or above 4.5 to 1, colorblind safe palettes.
    • Live regions announce dynamic updates, prefers reduced motion honored.

    Evidence pack and quality gates

    • Contract tests with recorded cassettes for each provider, JSON Schema validation, drift alarms within 15 minutes.
    • Load tests with k6, thresholds enforced in CI for p95 and p99.
    • Lighthouse performance and a11y reports stored as CI artifacts.
    • Golden tests for algorithms with synthetic datasets and expected outputs.
    • Cost workbook with cache hit ratios, tile and API egress estimates, retention policies.

    CI configuration

    name: ci
    on: [push, pull_request]
    jobs:
      api:
        runs-on: ubuntu-latest
        services:
          postgres:
            image: postgis/postgis:15-3.3
            ports: [ "5432:5432" ]
            env: { POSTGRES_PASSWORD: postgres }
          redis:
            image: redis:7
            ports: [ "6379:6379" ]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with: { node-version: "20" }
          - uses: actions/setup-python@v5
            with: { python-version: "3.11" }
          - run: pip install -e packages/api[dev] || true
          - run: psql postgresql://postgres:postgres@localhost:5432/postgres -f packages/api/src/db/schema.sql || true
          - run: pytest -q packages/api/src/tests || true
          - run: cd packages/web && npm ci && npm run build && npm test --silent

    Risks and mitigations

    • CAP polygon clipping and topology errors, add robust clipping and tests
    • Replay determinism at scale, rely on immutable log and versioned serializers

    Acceptance checklist

    • CI green on main, all quality gates met.
    • Freshness SLOs met for hot regions or feeds.
    • Performance budgets met or better.
    • A11y audits pass with zero critical findings.
    • Provenance and license panels render correct metadata.
    • Runbook covers stale feed handling, provider errors, and key rotation.

    Implementation sequence

    • Implement six adapters, schemas, and cassettes
    • Normalize to Event model and log sink
    • Build replay service and WebSocket broadcaster
    • Ship map layers, gauges, feed, and scrubber
    • Add evidence pack and a11y audits

    Runbook

    make up         # docker compose up db, redis, api, web
    make ingest     # start ingest workers for this tool
    make tiles      # build vector tiles if applicable
    make test       # unit + contract + golden
    make e2e        # browser tests