Skip to content

Risk Engineer Argon

See what an earthquake and a tsunami do to every building within one mile of the San Francisco Ferry Building, and what fixes would help.

Core trick

Runs seeded Monte Carlo damage and infrastructure cascade models over real building footprints, then ranks fixes by modeled loss reduction.

Tags

Description

See what an earthquake and a tsunami do to every building within one mile of the San Francisco Ferry Building, and what fixes would help. What it does Risk Engineer Argon is a web app that simulates a preset earthquake, followed by a tsunami or an extreme wave surge, across a one-mile district. Every building changes color and moves according to its own predicted damage. The sidebar lists the weak points by priority and cost. Pick one or more fixes, replay the simulation, and see the district do better.
kylechoi101/Risk_Engineer_Argon★ 00 forksPythonCreated Oct 25, 2026 · last push Oct 25, 2026

README excerpt

# Argon-Risk: San Francisco Waterfront Disaster Simulator

An interactive 3D digital twin of the 1-mile district around the San Francisco Ferry Building (`37.7955° N, 122.3937° W`) for stress-testing a compound earthquake and wave scenario. A Python backend runs seeded Monte Carlo models for building damage and a natech infrastructure cascade (seawall → substations → fuel terminal → pumps …), computes VaR₀.₉₉ and CVaR₀.₉₉, and uses Gemini (`gemini-4-argon`) to propose and explain fixes. The React + three.js frontend plays the scenario across 3,412 real DataSF buildings. When you toggle a fix, the mitigated outcome appears instantly.

The models are a stylized demonstration grounded in public government data. They are not a forecast or an engineering assessment.

## Run the demo

You need Node 20+, Python 3.12+ and [`uv`](https://docs.astral.sh/uv/).

```bash
npm install
(cd backend && uv sync)
npm run demo              # builds the frontend, then serves it + data + API at http://localhost:8000
```

The committed `public/` folder already holds a baked district and baked damage files, so the demo runs offline with no API key.

### Gemini API key (optional)

The key goes in `backend/.env`, which is gitignored. Never commit it.

```bash
cp backend/.env.example backend/.env
# edit backend/.env and set:  GEMINI_API_KEY=your-key
```

| Setting in `backend/.env` | Effect |
|---|---|
| `GEMINI_API_KEY=…` | `npm run bake:damage` asks Gemini for the fix plan. The live `/api/runs` analys

Team