Observatory · long-run macro

Sisyphus

Long horizons, honest repetition

A deliberately small, curated World Bank WDI panel for long-run growth, productivity, and external-sector work. Two paced collectors (45 macro + 14 external), retries for transient API errors, weekly UTC schedules. One SQLite warehouse, one API shape shared with the rest of the deluair line. Default port 8010. No login wall.

59
Curated WDI series
~195
Economies
1960-25
Annual window
2
Collectors

What makes this singular

Curated, not exhaustive

Forty-five core long-run indicators plus fourteen external-sector and BoP series across 17 topics. Enough structure for persistence and growth regressions without dumping the entire WDI catalog.

Reproducible by construction

Collectors are versioned code paths, not ad hoc spreadsheets. Staggered UTC schedules (Sunday 05:00 for longrun, 09:00 for external), collection logs, last_fetched_at on sources, same SQLite shape as sibling observatories.

API first, analytics honest

Read-only routes for sources, series, country slices, persistence (AR(1), half-life), shock features, cross-country comparators, and regression-ready panels with balancedness diagnostics. Admin routes behind a key. Built for scripts and papers, not chart galleries.

Why the name

Long-run empirical work is the same hill: update the panel, check the shocks, publish, repeat. The myth is not cynicism here. It is a reminder that serious macro rewards patience and clean data more than hot takes.

17 topics across two packs

The longrun pack covers growth, investment, fiscal, finance, trade, labor, human capital, prices, structure, productivity, welfare, demographic, technology, innovation, environment, and levels. The external pack adds FDI flows, reserves, external debt, and trade in goods and services at BoP values.

2growth
4investment
15external
3trade
3fiscal
3finance
4labor
6human_capital
5demographic
5levels
3structure
1prices
1productivity
1welfare
1technology
1innovation
1environment

Production surface

FastAPI and Starlette middleware: gzip over a size threshold, 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 sisyphus_http_* counters and latency histograms.

  • Warehouse: WAL SQLite, tuned page cache and mmap, optimize on shutdown.
  • Ingestion: one GET per indicator for all countries, 0.45s pacing, retries on 400/429/5xx.
  • 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 (up to 30 codes per request). 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

Full pack collects are long-running (the longrun pack fetches 45 indicators, the external pack 14). The client spaces requests at 0.45s intervals to stay inside the public API comfort zone. For production, set a real admin secret, decide whether the 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 bound, troubleshooting table, deployment notes) lives in the repo:

sisyphus/README.md

Load the warehouse

From the sisyphus/ directory:

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

Integration tests against the live Bank API:

SISYPHUS_LIVE_API=1 uv run pytest tests/integration -q

Then open http://127.0.0.1:8010/docs or call /api/data/sources, /api/data/series/wb_lr.gdp_growth, or /api/data/panel?series_codes=wb_lr.gdp_growth,wb_lr.inflation_cpi&countries=BGD,IND,USA.