Production-ready Python and pipeline patterns for automating Statistical Process Control (SPC). Move quality engineering beyond spreadsheets: build control charts, out-of-control rule detection, MES/SCADA data pipelines, alerting, and audit-ready compliance reporting that run deterministically at manufacturing scale.
Most SPC guidance stops at the textbook formula. A real plant needs the engineering around it: how to pull telemetry from an MES or historian, align asynchronous stations, handle sensor dropout, freeze Phase I limits, evaluate Nelson and Western Electric rules without alarm storms, and tie every reported number back to the exact dataset that produced it. This site fills that gap. Every article ships with runnable, type-annotated Python, AIAG- and NIST-aligned formulas, and the edge-case handling that breaks real pipelines — variable subgroup sizes, float-precision traps, timestamp misalignment, and false-alarm storms.
It is written for quality engineers, manufacturing operations teams, Six Sigma practitioners, and Python data analysts who are automating the quality stack.
The library is organized into four areas that follow the SPC pipeline from raw telemetry to a documented reaction:
| Area | What it covers |
|---|---|
| SPC Fundamentals & Control Chart Taxonomy | Choosing the right chart — X-bar/R, X-bar/S, I-MR, attribute (p/np/c/u), EWMA/CUSUM — deriving AIAG-compliant limits, and gating capability (Cp/Cpk/Pp/Ppk) behind proven stability. |
| Automated Control Chart Generation & Calculation | Vectorized limit engines, dynamic Plotly rendering, rolling-window recalibration, Nelson/Western Electric rule detection, and Airflow orchestration. |
| Manufacturing Data Ingestion & Preprocessing | MES/SCADA connectors, time-series alignment, missing-value policy, outlier filtering, and fail-closed batch validation. |
| SPC Alerting & OCAP Response | Turning an out-of-control signal into action — routing to ticketing and MES, Out-of-Control Action Plans (OCAP), notification channels, and alarm-storm control. |
A few of the strongest worked walkthroughs:
- Calculate X-bar/R control limits in Python
- Implement Nelson rules in Python
- Build an OCAP decision table in Python
- Rolling-window limit recalibration
Every reference is reproducible and cited to the source: the AIAG SPC Reference Manual, ISO 9001:2015, IATF 16949, ASTM E2587, and the NIST/SEMATECH Engineering Statistics Handbook.
This repository holds the source for statistical-process-control.org,
a static site built with Eleventy and deployed on Cloudflare Pages. Content lives as
Markdown under src/content/, with hand-authored inline SVG diagrams, KaTeX formulas, and structured
Schema.org JSON-LD on every page.
npm install # install dependencies
npm run build # build the static site into _site/
npm run serve # local dev server with live reloadIssues and suggestions are welcome — open an issue with a correction, a requested topic, or a real-world edge case you'd like covered.
© Statistical Process Control · statistical-process-control.org