-
Metric definitions as code
Why one organisation ends up with three DNA rates, what a metric definition has to pin down, and how a small YAML file compiled to SQL keeps every report on the same number.
-
Data tests that catch real problems
Which data tests find the problems that reach production (grain, relationships, codes, freshness, reconciliation, drift), how to set severity, and where to put them.
-
Anomaly detection for data feeds
Catching a broken daily feed before the dashboard does, with day-of-week baselines, robust z-scores, STL residuals, a slow-drift check, freshness and schema checks, and thresholds that don't bury you in alerts.
-
SQL window functions for patient pathways
ROW_NUMBER, RANK, LAG and window frames applied to first attendances, latest statuses, seven-day totals, continuous spells and 30-day readmissions, with real output and the mistakes that change the answer.
-
Testing analytics code with pytest
What to test in analytics code, how to write known-answer, edge-case and invariant tests, fixtures for small DataFrames, tolerances for numerical results, SQL tests against SQLite, and running the suite in CI.
-
Packaging analysis code as a library
When copied notebook cells should become a package, what pyproject.toml needs, why the src layout helps, how to set dependency bounds, and how to build, version and share the result with uv.