agentl agentl Built with agentl

Open data An agentl example

Live earthquakes, refreshed by one YAML file.

Every earthquake the U.S. Geological Survey reports worldwide, on one map. Fetched, checked and stored every 15 minutes by an open-source agentl pipeline that also keeps up when USGS revises a magnitude. Read it below and run it yourself.

  • - quakes in 24 h
  • Largest -
  • Updated every 15 min
  • No API key

Earthquakes worldwide

Loading...

Period
Showing 0 quakes · circle size and colour by magnitude
Quakes, 24 h
-
Quakes, 7 days
-
Largest, 24 h
-
Reviewed by USGS
-

Quakes

MagPlaceTime (UTC)DepthStatus

Click a row to find it on the map; the place links to the USGS event page.

By magnitude

    Pipeline status

    Loading
    Quakes read
    -
    New
    -
    Revised by USGS
    -
    Checks passed
    -
    • Last run-
    • Last success-
    • Sources downloaded-
    • Revised in the last 24 h-
    • History writes-
    • Duration-
    From status.json, written by run.py All workflow runs

    How this page is built

    One pipeline file. No server, no database to run, no API key.

    GitHub Actions runs this agentl pipeline every 15 minutes. It writes two JSON files, and this static page reads them. Below is the exact pipeline.yaml that produced the map above.

    1. 01
      Fetchhttp.get with if_changed
    2. 02
      ParseGeoJSON features to rows
    3. 03
      CheckRanges, unique ids, freshness
    4. 04
      StoreChangeset on id, 30 days
    5. 05
      PublishJSON + run status to this page
    quakes/pipeline.yamlView on GitHub
    # Loading pipeline.yaml...
    1. 1Only download when the feed changes

      if_changed remembers the Last-Modified of the last good run. If the hourly feed is the same, the run stops with outcome no_change and nothing is rewritten. The 7-day feed fills a fresh history.

    2. 2Checks before anything is written

      Latitude and longitude in range, magnitude between -2 and 10, one row per event id, data less than 6 hours old. severity per rule: an impossible row is rejected alone, a quiet feed only warns.

    3. 3Updates when USGS revises

      Automatic solutions are revised for days: new magnitudes, new locations, status automatic to reviewed. mode: changeset on id counts them as updated rows, shown as "Revised by USGS" above.

    4. 4A daily digest of odd rows

      Row rules flag events with no magnitude or an unusual depth without dropping them. With identity: [id], each run emits check.digest: new, ongoing and resolved findings for the day, or "all clear".

    5. 5The run status is data too

      run.py calls agentl.run() with an event listener and turns the result into status.json: the panel above, including a failed run.

    Build your own in an afternoon.

    agentl is an open-source YAML ETL library for Python: connectors, checks, incremental runs and, when you need judgement, LLM agent steps. MIT licensed.

    $ pip install agentl-etl

    Run this pipeline yourself

    $ git clone https://github.com/arimayuji/agentl-examples && cd agentl-examples/quakes $ pip install agentl-etl $ python run.py && python -m http.server -d site 8000