Dean Foulds
Dean Foulds
Data Scientist & ML Engineer
βœ‰οΈ deanfoulds@gmail.com πŸŽ“ BSc Mathematics & Physics

Shindo (ιœ‡εΊ¦) β€” Japan Seismic Risk Intelligence Graph

A cascading risk graph connecting earthquakes, fault zones, tsunamis, nuclear facilities, and prefectures β€” built for the Neo4j Aura Agent Hackathon. Named after ιœ‡εΊ¦, Japan’s official seismic intensity scale, because this agent reasons about local impact and cascading consequences, not just raw magnitude at the source.

Launch Live App Β· GitHub


The Core Idea

Japan’s disasters cascade: Fault rupture β†’ Ground shaking β†’ Tsunami β†’ Prefecture inundation β†’ Nuclear facility exposure. A CSV stores events. A graph stores the chain β€” and an AI agent can traverse it in a single query.

The 2011 Tōhoku earthquake didn’t just happen β€” it traversed a graph:

Japan Trench ruptured β†’ M9.1 earthquake struck
  β†’ 40m tsunami generated β†’ Miyagi, Iwate, Fukushima inundated
    β†’ Fukushima Daiichi within 10km β†’ cascading nuclear crisis

Every link in that chain is a graph edge. The agent can trace it, explain it, and ask: which other fault zones have the same potential?


Dataset

Source Detail
USGS Earthquake Hazards Program ~33,875 M4.0+ events, 1950–present
IAEA PRIS Nuclear Reactor Registry 15 nuclear facilities
JMA Fault Zone Data 9 major fault zones
Japan Prefecture Reference 47 prefectures with coastal classifications
NOAA NCEI Historical Tsunami Database 135 tsunami events with measured wave heights
GEBCO 2026 Bathymetry Grid Sea floor depth at every epicentre
JMA Live Feed Real-time events via ATOM eqvol.xml (60s polling)

Formal Ontology

The graph schema is grounded in a formal OWL 2 ontology (ontology/japanese_earthquake.ttl), authored in Turtle format with bilingual English/Japanese labels.

Base URI: http://deanfoulds.xyz/ontology/earthquake#

13 OWL Classes across four domains:

Domain Classes
Seismic events Earthquake, TsunamiEvent, TsunamiWarning, WaveProfile, InundationZone, TsunamiDamage
Geography Prefecture, City
Damage assessment DamageReport, ShakingDamage, FireAfterQuake, LandslideRisk, NuclearIncident

The ontology defines formal object properties (relationships) and data properties (node fields) with XSD types and data source citations for every field.


Graph Schema

Node types (17):

Label Count
Earthquake ~33,875
Prefecture 47
FaultZone 9
NuclearFacility 15
Tsunami ~180
City 33
ShakingDamage, TsunamiEvent, InundationZone, LandslideRisk, FireAfterQuake, TsunamiWarning, WaveProfile, TsunamiDamage, NuclearIncident, DamageReport 3–6 each

Key relationships:

Relationship Meaning
ORIGINATED_ON Earthquake β†’ FaultZone
TRIGGERED Earthquake β†’ Tsunami
STRUCK Earthquake β†’ Prefecture
INUNDATED Tsunami β†’ Prefecture
WITHIN_50KM_OF Earthquake β†’ NuclearFacility
CONTAINS Prefecture β†’ NuclearFacility
hasShakingDamage / hasFireRisk / hasLandslideRisk / hasNuclearIncident Earthquake β†’ damage chain nodes
causedInundation β†’ hasTsunamiDamage Tsunami β†’ InundationZone β†’ TsunamiDamage

12 vector indexes using Voyage AI voyage-3 (1024-dim) across all node types.


Enrichment Pipeline

The graph was built in three stages beyond raw USGS ingestion:

1. GEBCO Sea Floor Depth β€” seaFloorDepthM added to all 32,976 earthquake nodes using GEBCO 2026 bathymetry. Critical for tsunami inference: a shallow shelf quake and a deep trench quake of identical magnitude produce fundamentally different waves. Vectorised numpy lookup (~30s for ~33k nodes).

2. NOAA Tsunami Wave Data β€” 135 historical tsunami events matched and enriched with measured wave heights (waveHeightAtShoreM), fatalities, building damage, and runup counts from the NOAA NCEI Global Historical Tsunami Database.

3. Fault Type Inference β€” faultType (subduction / strike-slip / reverse) inferred for all earthquake nodes via Cypher rules based on depth and location. Result: 81% subduction β€” geologically correct for Japan’s four-plate junction.


Perseus Knowledge Graph Enrichment

The OWL ontology was used as an extraction schema for Lettria Perseus to extract structured damage chain data from prose disaster reports covering six major events (Tōhoku 2011, Kobe 1995, Noto 2024, Fukushima aftershock 2011, Kumamoto 2016, Tokachi-Oki 2003).

Perseus extracted entities and relationships from natural language, exported as CQL, and migrated to Neo4j Aura β€” adding 10 new node types (ShakingDamage, TsunamiEvent, InundationZone, LandslideRisk, FireAfterQuake, TsunamiWarning, WaveProfile, TsunamiDamage, NuclearIncident, DamageReport) and 33 City nodes with sub-prefecture granularity.


Agent Tools

1. Cypher Templates (9 registered) β€” cascade trace, compound risk corridors, historical analog finder, nuclear proximity risk, decade pattern analysis, fault zone lethality, the Hamaoka question, region vulnerability score, graph summary.

2. Text2Cypher β€” natural language to Cypher. Ask: β€œWhich prefectures on the Nankai Trough also have nuclear plants?” or β€œWhat M7+ earthquakes struck Miyagi in the 2000s?”

3. Nearest Neighbour Tsunami Inference β€” finds the most physically similar historical tsunami events using a weighted Cypher similarity score (magnitude weighted 2Γ—) across sea floor depth, latitude, and magnitude dimensions.

4. Vector Semantic Search β€” 12 Voyage AI voyage-3 embedding indexes for semantic similarity across all node types.


Live Feed

The backend continuously ingests real events: JMA ATOM feed polled every 60 seconds, plus a USGS backfill of the last 24 hours on startup. Events appear on the map within one polling cycle.


Stack

Layer Technology
Graph database Neo4j Aura
Backend API FastAPI (Python)
Frontend React + Vite (Cloudflare Pages)
Embeddings Voyage AI voyage-3 (1024-dim)
Agent (chat) Neo4j Aura Agent Builder (GPT-4o)
Agent (predict) Claude Sonnet via Anthropic API
Ontology OWL 2 / Turtle (W3C standard)
NLP extraction Lettria Perseus

Launch Live App