Appendix B — The data API
Every dataset in this course loads with one call. There is no path to get right, no download step in the practice, and no dependence on the room’s wifi.
import qmib
df = qmib.load("core") # the course spine
qmib.catalog() # everything availableload() resolves in three steps and stops at the first that works: a parquet cache in data/, then the committed spine in data/spine/, then the published copy on GitHub Pages. The first call downloads; every call after it reads the cache.
Why it matters for the practice. Run qmib.load() once at home and the ninety minutes in class work offline. A room of thirty people downloading the same file at 15:35 is the single most reliable way to lose the first twenty minutes of a session.
B.1 Outside a clone
In Colab, or anywhere without the repository checked out, point the module at the published copy:
import qmib
qmib.REMOTE = "https://warint.github.io/quantitative-methods/data"
df = qmib.load("core")B.2 What is where
- Columns, units and traps, per group: data dictionaries
- Provenance and flags:
PROVENANCE.md - The module itself:
qmib.py
Raw data files are git-ignored on purpose. Never commit one — qmib fetches and caches instead. The synthetic spine is the deliberate exception: small, licence-free, and committed so the practice runs with no network at all.