Observatory · AI and computation

Athena

Economics of AI and computation

Four engines covering the full AI economics stack: silicon (chip families, foundries, trade controls), compute models (frontier labs, training runs, inference costs), markets (hyperscaler capex, cloud regions, venture), and policy/macro (regulation, talent flows, national strategies). Multi-entity warehouse, AI-augmented briefs, ~195 economies. Default port 8007.

53
Collectors
4
Engines
~195
Economies
8007
Default port

What this observatory tracks

Silicon engine

Chip families, foundry capacity, semiconductor trade flows, export controls. Tracks the physical substrate that makes AI compute possible, from wafer starts to packaging and equipment.

Compute models engine

Frontier model releases, training compute estimates, inference cost curves, benchmark progressions. Structured data on labs, architectures, and the economics of scaling.

Markets engine

Hyperscaler capital expenditure, cloud region buildouts, AI venture funding rounds, public-market valuations. Revenue concentration, pricing dynamics, capacity utilization.

Policy and macro engine

National AI strategies, regulatory frameworks, talent migration data, R&D expenditure as share of GDP, compute sovereignty indices. The institutional and fiscal layer around AI adoption.

4 engines, 53 collectors

Each engine groups collectors by economic domain. Collectors pull from public APIs, structured datasets, and institutional sources on staggered UTC schedules. All data lands in a single SQLite warehouse with consistent schema.

silicon
compute models
markets
policy / macro

Production surface

FastAPI and Starlette middleware: gzip, optional CORS for explicit origins, security headers, X-Request-ID on every response, optional JSON log lines via LOG_JSON. Readiness runs SELECT 1 against SQLite. Optional GET /metrics exposes athena_http_* counters and latency histograms. Jinja2 templates for AI-augmented briefs.

  • Warehouse: WAL SQLite, tuned page cache and mmap, optimize on shutdown.
  • Ingestion: httpx async client, APScheduler for staggered UTC collection windows.
  • Briefs: Jinja2 templates rendering structured data into economist-readable summaries.
  • OpenAPI: /docs and /redoc on the running service.

Route map (read-only data)

All under /api/data/. Query parameters support filtering, year windows, pagination, and multi-series panels. Admin routes under /api/admin/ require X-Admin-Key when configured.

GET /api/data/sources: filter, sort, paginate registered sources.
GET /api/data/series/{code}: observations for one series; optional country and year range.
GET /api/data/series/{code}/summary: means, extremes, CAGR, latest YoY change.
GET /api/data/series/{code}/persistence: AR(1), half-life, jump ratio for one country.
GET /api/data/series/{code}/features: YoY growth, rolling vol, shock flags.
GET /api/data/series/{code}/comparators: cross-country ranking for the series.
GET /api/data/country/{iso3}: all series for one economy; optional topic or year.
GET /api/data/country/{iso3}/topics: coverage by topic.
GET /api/data/panel: long-format multi-series extract with balancedness diagnostics.

What operators should know

Fifty-three collectors across four engines means collection runs are substantial. The client spaces requests to stay within public API rate limits. For production, set a real admin secret, decide whether metrics scrape is internal-only, and back up the SQLite file with a quiet window or the SQLite backup API.

The exhaustive manual (schema DDL, every query parameter, troubleshooting, deployment notes) lives in the repo:

athena/README.md

Start the observatory

From the athena/ directory:

make setup && make collect-all && make serve

Integration tests against live APIs:

ATHENA_LIVE_API=1 uv run pytest tests/integration -q

Then open http://127.0.0.1:8007/docs or call /api/data/sources.