Premium · 3 plants, 36 CNC machines, six months
SPC for Precision Machining
Six months of control charts with the ground truth underneath
515,442 rows in 15 linked tables: 3 plants, 36 CNC machines, 158 controlled characteristics, 82,950 subgroups and 414,750 individual gauge readings from 2025-01-06 to 2025-06-29, with every cause of every shift recorded next to the data.
Real SPC data never tells you what actually happened. Here, every subgroup carries the true size of the process shift that produced it and where it came from: an assignable cause on the machine, tool wear since the last change, the material lot, the operator's setup, or the process's own drift. The control charts are computed exactly the way a quality engineer would compute them, so you can measure what the charts caught, what they missed, and how fast.
Uses
What it is built for
Control charts and capability
X-bar/R and X-bar/s, Phase I limits from the first 25 subgroups, Cp, Cpk, Pp, Ppk and observed ppm per characteristic, two-sided and upper-limit-only (flatness, true position, surface roughness).
Run-rule and anomaly detection with labels
the six Western Electric/Nelson flags are in the file; the true shift is too, so detection rate, false-alarm rate and average run length can be measured rather than assumed. A benchmark for ML detectors (CUSUM, EWMA, isolation forests, sequence models) against a known truth.
Root cause analysis
join a signal to the cause active on its machine, the material lot, the operator, the hours since the last tool change and the days since maintenance.
Tool wear and predictive maintenance
shaft diameters and surface roughness grow and bores shrink with the hours on a tool, and reset at each change; within-subgroup spread widens as a machine goes longer without maintenance.
Measurement system analysis
each gauge has a crossed GR&R study (ANOVA or range method) and a calibration history; readings sit on the gauge's own resolution, so a coarse gauge shows up as it does on a real chart.
Teaching and dashboards
realistic enough for an SPC course, a Six Sigma project, a Power BI/Tableau quality dashboard, or a MES/QMS demo database.
Project kit
A portfolio project you can check yourself
A brief from the Quality Manager at a precision machining company, 18 questions from warm-up to stretch, and an answer key to grade against. Every answer was worked out twice on these files, in DuckDB SQL and separately in pandas, and the kit was written only when the two agreed.
The brief
Six-month SPC review before the customer audit
From the Quality Manager at a precision machining company · 6 January to 29 June 2025
- BRIEF.mdthe request, from the Quality Manager at a precision machining company
- QUESTIONS.md18 questions, each asking for one value in a stated form
- load.sqlevery table into DuckDB with the right types
- check.pygrades your answers, names the misreading a wrong one matches
- solutions/the answer key and the SQL behind every answer
- WRITEUP_TEMPLATE.mdthe two pages a hiring manager reads
What the checker says
$ python kit/check.py kit/my_answers.csv
Q05 wrong that is the answer when you use Ppk (the overall spread) instead of CpkA wrong answer is named for the mistake it matches, such as the wrong rows in a denominator or a mean where a median is asked, without giving the answer away. --reveal shows one answer and its SQL when you want it.
- Warm-up
- 4
- Core
- 8
- Stretch
- 6
Read all 18 questions
Warm-up
- Q01. Critical features. How many controlled characteristics are marked critical to quality?
- Q02. Readings out of specification. What share of individual readings fell outside specification?
- Q03. Monitoring subgroups. How many subgroups were sampled in Phase II (monitoring, after the baseline)?
- Q04. The machine with the most special causes. Which machine (its machine_code) had the most assignable causes recorded?
Core
- Q05. Not capable. How many characteristics have a Phase I Cpk below 1.0?
- Q06. Recompute a control limit. For characteristic 1, compute the X-bar chart's upper control limit from its Phase I subgroups: the mean of x_bar plus A2 = 0.577 times the mean of x_range.
- Q07. Recompute a Cpk. For characteristic 1, compute Cpk from its Phase I subgroups: sigma-hat is the mean range over d2 = 2.326, and Cpk is the smaller of (USL minus the mean of x_bar) and (the mean of x_bar minus LSL), over 3 sigma-hat.
- Q08. False alarms. Of the Phase II subgroups sampled while no assignable cause was active, what share tripped rule 1 (a point beyond 3 sigma)?
- Q09. Catching a real shift. Of the Phase II subgroups sampled while a cause shifting the mean by 1.5 sigma or more was active (absolute true_cause_shift_sigma of at least 1.5), what share were flagged out of control by any rule?
- Q10. The biggest special causes. Which cause category has the largest average magnitude (magnitude_sigma)?
- Q11. Gauges past 10%. How many gauges have a %GR&R above 10%, the usual threshold for an acceptable gauge?
- Q12. Unplanned tool changes. What share of tool changes were made for a reason other than scheduled life?
Stretch
- Q13. Repeatability from the trials. For gauge 1, compute the repeatability standard deviation from its R&R trials: the square root of the mean, over every part and appraiser, of the sample variance of their three trials. Give it in micrometres.
- Q14. Time to the first signal. For each assignable cause of magnitude 2 sigma or more that was flagged at least once, take the hours from its start to the first out-of-control subgroup sampled under it (active_cause_id). What is the median over those causes, in hours?
- Q15. Alarms with no special cause. Of the Phase II subgroups flagged out of control, what share were sampled while no assignable cause was active?
- Q16. Spread and maintenance. In Phase II, divide each subgroup's s by its characteristic's sigma_within. What is the mean of that ratio for subgroups more than 30 days since maintenance, over its mean for those 30 days or fewer?
- Q17. The hardest supplier. Which supplier's material lots sit furthest from their grade's usual hardness on average (the mean of the absolute hardness_z)?
- Q18. Where CAPAs are raised. Which cause category raises a CAPA on the largest share of its causes?
In the data
What the full files show
Computed from every row of the full dataset when it was packaged, not drawn as a target. The free preview is a slice of the same data.
An X-bar chart with the truth underneath: flatness, characteristic 139
- Subgroup mean
- True assignable cause in force
- Rule tripped
How often the rules fire, by the size of the true shift
- no cause21.4%
- under 0.5 sigma57.1%
- 0.5 to 1 sigma46.8%
- 1 to 1.5 sigma68.7%
- 1.5 to 2 sigma88.6%
- 2 or more sigma98.6%
Assignable causes, by category
- tool wear beyond limit79
- thermal growth58
- fixture loosened43
- material hardness out of range37
- coolant concentration32
- wrong offset entered30
- spindle bearing wear21
Answer key
The truth, in its own columns
What a model, a control chart or an analyst is trying to find ships next to the data, so you can score an answer instead of guessing at it. Each line is measured from the full files.
- subgroups.active_cause_idThe assignable cause in force when the subgroup was sampled, if any.285 distinct, 95% empty
- subgroups.true_cause_shift_sigmaThat cause's shift of the mean, in within-subgroup sigma.-4.36 to 4.62, mean 0.021
- subgroups.true_tool_wear_sigmaTool wear since the last change, in sigma.-0.8 to 0.8, mean 0.14
- subgroups.true_lot_shift_sigmaThe material lot's hardness effect, in sigma.-0.45 to 0.48, mean 0.016
- subgroups.true_operator_shift_sigmaThe operator's setup bias, in sigma.-0.32 to 0.21, mean 0.0048
- subgroups.true_driftThe process mean's own slow drift (AR(1)), in sigma.-0.29 to 0.27, mean 0.00021
- subgroups.true_process_meanThe true process mean at that moment, in the characteristic's unit.-0.12 to 156.1, mean 29.13
- subgroups.noise_factorHow much wider the within-subgroup spread is as maintenance ages.1 to 1.2, mean 1.06
- assignable_causes.magnitude_sigmaEach cause's size, with its category, start, end and direction.0.45 to 4.62, mean 1.55
How it behaves
Measured on the files you download
Each of these is computed from the delivered rows when the dataset is packaged, not written as a target.
- 5.0% of subgroups were sampled while an assignable cause was active; 94% of the Phase II subgroups under a cause of 1.5 sigma or more trip at least one rule, against 21% of those under none (tool wear, lots and drift still move the mean there, and are labelled).
- Rule 1 false-alarm rate, stable Phase II: 0.74% (theory 0.27%); estimated limits from 25 subgroups and an autocorrelated process put it above the textbook 0.27%, as they do in practice.
- 0.33% of readings are out of specification. 14% of characteristics have Cpk below 1.0 and 61% are at 1.33 or better; 25% are marked critical to quality.
Audit
101 of 101 checks pass
Re-run on the delivered files by an independent script with plain pandas. The results ship in INTEGRITY.json.
- every key resolves and every primary key is unique; each characteristic's machine and gauge are on its part's line, each operator on the subgroup's line, each lot belongs to the part and was received before it was used;
- every subgroup has exactly 5 readings; X-bar, max, min, range and s re-add exactly from the readings;
- control limits, Cpk and Ppk recompute from the subgroups and readings; all six rule flags recompute with 0 differences;
- each feature is measured on a gauge that suits it, and every reading sits on its gauge's resolution;
- a cause is only recorded on a subgroup sampled inside that cause's window on that machine;
- the gauge R&R trials recover each gauge's stated %GR&R;
- it reads like a real shop: machines suit their line's process and tools suit their machine; materials and sectors suit the part (no aluminium orthopaedic screws); drawing sizes are whole or half millimetres with standard tolerance bands, and flatness, position and Ra limits are drawing grades; balloon numbers never repeat on a part; hardness is on the scale each material is tested on (HRC for 4140, 17-4PH and Ti-6Al-4V; HRB for 316L, 6061 and brass) inside that grade's usual band; the operator on a chart works that shift; each corrective action answers its cause; gauges are calibrated about once a quarter and one found out of tolerance is always adjusted.
All 101 checks
- ✓ plants.plant_id unique
- ✓ production_lines.line_id unique
- ✓ machines.machine_id unique
- ✓ gauges.gauge_id unique
- ✓ operators.operator_id unique
- ✓ parts.part_id unique
- ✓ characteristics.characteristic_id unique
- ✓ material_lots.lot_id unique
- ✓ tool_changes.tool_change_id unique
- ✓ maintenance_events.maintenance_id unique
- ✓ assignable_causes.cause_id unique
- ✓ subgroups.subgroup_id unique
- ✓ readings.reading_id unique
- ✓ gauge_calibrations.calibration_id unique
- ✓ gauge_rr_trials.trial_id unique
- ✓ production_lines.plant_id -> plants: 0 orphans of 9
- ✓ machines.line_id -> production_lines: 0 orphans of 36
- ✓ gauges.line_id -> production_lines: 0 orphans of 36
- ✓ operators.line_id -> production_lines: 0 orphans of 72
- ✓ parts.line_id -> production_lines: 0 orphans of 40
- ✓ characteristics.part_id -> parts: 0 orphans of 158
- ✓ characteristics.machine_id -> machines: 0 orphans of 158
- ✓ characteristics.gauge_id -> gauges: 0 orphans of 158
- ✓ material_lots.part_id -> parts: 0 orphans of 536
- ✓ tool_changes.machine_id -> machines: 0 orphans of 13000
- ✓ maintenance_events.machine_id -> machines: 0 orphans of 240
- ✓ assignable_causes.machine_id -> machines: 0 orphans of 300
- ✓ subgroups.characteristic_id -> characteristics: 0 orphans of 82950
- ✓ subgroups.operator_id -> operators: 0 orphans of 82950
- ✓ subgroups.material_lot_id -> material_lots: 0 orphans of 78215
- ✓ subgroups.active_cause_id -> assignable_causes: 0 orphans of 4140
- ✓ readings.subgroup_id -> subgroups: 0 orphans of 414750
- ✓ gauge_calibrations.gauge_id -> gauges: 0 orphans of 72
- ✓ gauge_rr_trials.gauge_id -> gauges: 0 orphans of 3240
- ✓ characteristic line = its part's line
- ✓ characteristic machine on its line
- ✓ characteristic gauge on its line
- ✓ subgroup operator on its line
- ✓ every line has one gauge of each kind
- ✓ each feature measured on a gauge that suits it
- ✓ readings sit on their gauge's resolution: max off-grid 0.0000 steps
- ✓ subgroup lot belongs to its part
- ✓ subgroup lot received before sampling
- ✓ subgroups with a lot: 94.3%
- ✓ 5 readings per subgroup
- ✓ sample_no 1..5
- ✓ subgroups.x_bar re-adds from readings: 0 differ
- ✓ subgroups.x_max re-adds from readings: 0 differ
- ✓ subgroups.x_min re-adds from readings: 0 differ
- ✓ subgroups.s re-adds from readings: 0 differ
- ✓ x_range = x_max - x_min
- ✓ measured_at = sampled_at
- ✓ sample_seq is time order
- ✓ control limits = Phase I X-bar/R (A2 .577, D4 2.114)
- ✓ Cpk recomputes (R-bar/d2): max diff 0.0011
- ✓ Ppk recomputes (overall sd): max diff 0.0022
- ✓ Ppk <= Cpk mostly (shifts and drift add variation): 97%
- ✓ rule1_beyond_3sigma recomputes: 0 differ; fires on 4.9%
- ✓ rule2_2of3_beyond_2sigma recomputes: 0 differ; fires on 9.0%
- ✓ rule3_4of5_beyond_1sigma recomputes: 0 differ; fires on 11.8%
- ✓ rule4_8_same_side recomputes: 0 differ; fires on 8.9%
- ✓ trend_6_points recomputes: 0 differ; fires on 0.4%
- ✓ range_beyond_ucl recomputes: 0 differ; fires on 1.2%
- ✓ out_of_control = any rule
- ✓ stable process rarely signals (rule 1): 0.74%
- ✓ rule 1 false-alarm rate, stable Phase II: 0.74% (theory 0.27%); OOC while a >=1.5 sigma cause is active: 94%
- ✓ causes are what the charts catch: 94% vs 21% without
- ✓ cause active only inside its window
- ✓ share of subgroups under a cause: 5.0%
- ✓ x-bar is autocorrelated (drift, wear, lots), not white noise: mean lag-1 autocorrelation 0.34
- ✓ true shifts of 3 sigma-xbar or more are signalled: 94% of 1895
- ✓ OD grows / bore shrinks with hours since tool change: corr 0.32
- ✓ out-of-spec readings rare but present: 0.33% (1374 readings)
- ✓ Cpk spread: some incapable (<1), most capable (>1.33): <1: 14%, >1.33: 61%
- ✓ upper-only features have no LSL
- ✓ no negative flatness/position/roughness
- ✓ GR&R: 10 parts x 3 appraisers x 3 trials
- ✓ GR&R repeatability tracks gauge %GRR: corr 0.97
- ✓ GR&R part effect dominates (parts differ)
- ✓ each machine suits its line's process
- ✓ grinders change wheels, cutting machines change cutters
- ✓ end mills only on milling machines
- ✓ tool changes about once or twice a shift-day per machine: 2.1 per machine per day
- ✓ materials suit their parts
- ✓ orthopaedic screws are medical parts
- ✓ car parts run at far higher volume than aerospace: 160,278 vs 6,485
- ✓ hardness on the scale the material is tested on
- ✓ hardness inside each grade's usual band: 17-4PH stainless 30.6-38.1; 316L stainless 78.5-90.8; 6061-T6 aluminium 52.4-68.0; AISI 4140 steel 26.8-33.2; C36000 brass 70.1-79.9; Ti-6Al-4V 31.1-36.5
- ✓ drawing sizes are whole or half millimetres
- ✓ +/- tolerances are standard bands
- ✓ geometric and Ra limits are drawing grades
- ✓ balloon numbers never repeat on a part
- ✓ profilometer studies use Ra masters (um, held in mm)
- ✓ the operator on a chart works that shift
- ✓ each corrective action answers its cause
- ✓ a spindle service takes longer than a PM: 10.8 h vs 2.5 h
- ✓ planned maintenance is booked on weekday day shifts
- ✓ breakdowns are repaired when they happen, nights and weekends included: 29% outside weekday 06-22
- ✓ gauges calibrated about once a quarter: 2 at most per gauge
- ✓ a gauge found out of tolerance is adjusted
- ✓ no working columns delivered
- ✓ no characteristic scraps like a broken process: worst 51,048 ppm
Tables
15 tables, 515,442 rows
Every table in the zip with what it holds, its rows and its columns. The bars are on a log scale, so the small reference tables still show.
- readingsEvery individual measurement, on its gauge's resolution, with out-of-spec flag414,750 rows · 8 cols
- subgroupsOne row per n=5 sample: X-bar, R, s, Western Electric flags, the lot, operator, hours since tool change, and the TRUE cause of any shift82,950 rows · 36 cols
- tool_changesEvery insert, cutter and drill change or wheel dress, suited to the machine, and why13,000 rows · 5 cols
- gauge_rr_trialsA crossed gauge R&R study per gauge: 10 parts x 3 appraisers x 3 trials3,240 rows · 7 cols
- material_lotsBar-stock heats per part: supplier, received date, hardness on the material's own Rockwell scale536 rows · 8 cols
- assignable_causesEvery special cause: machine, category, start, end, size in sigma, direction, corrective action, CAPA300 rows · 10 cols
- maintenance_eventsPreventive, corrective and spindle work with downtime by kind of job240 rows · 5 cols
- characteristicsThe drawing's controlled features: spec limits, gauge, Phase I control limits, Cp/Cpk, Pp/Ppk, observed ppm158 rows · 40 cols
- gauge_calibrationsQuarterly calibrations: as-found error against the gauge's permitted error, result, adjustment72 rows · 7 cols
- operatorsOperators by line and home shift, experience, certification, setup bias72 rows · 7 cols
- partsMachined parts: family, a material and sector that suit it, drawing revision, annual volume by sector40 rows · 8 cols
- gaugesOne CMM, air bore gauge, micrometer and profilometer per line: resolution, %GR&R, repeatability and reproducibility36 rows · 10 cols
- machinesCNC lathes, machining centres and grinders, each suited to its line, with its own capability factor and PM interval36 rows · 7 cols
- production_linesMachining lines and their process family9 rows · 5 cols
- plantsThree plants and their region3 rows · 3 cols
Explore
Every table, profiled
Each column's type, spread, empties and most common values, measured from the full CSVs. Switch to the first rows to see the data as it sits in the file.
readings.csv
414,750 rows · 8 columns · 2 foreign keys
Keys
Every join resolves
24 foreign keys, 1,344,818 references checked against the table each one points at. None points at a row that does not exist.
assignable_causes
- machine_idmachines.machine_id300 rows checked0 orphans
characteristics
- part_idparts.part_id158 rows checked0 orphans
- line_idproduction_lines.line_id158 rows checked0 orphans
- machine_idmachines.machine_id158 rows checked0 orphans
- gauge_idgauges.gauge_id158 rows checked0 orphans
gauge_calibrations
- gauge_idgauges.gauge_id72 rows checked0 orphans
gauge_rr_trials
- gauge_idgauges.gauge_id3,240 rows checked0 orphans
gauges
- line_idproduction_lines.line_id36 rows checked0 orphans
machines
- line_idproduction_lines.line_id36 rows checked0 orphans
maintenance_events
- machine_idmachines.machine_id240 rows checked0 orphans
material_lots
- part_idparts.part_id536 rows checked0 orphans
operators
- line_idproduction_lines.line_id72 rows checked0 orphans
parts
- line_idproduction_lines.line_id40 rows checked0 orphans
production_lines
- plant_idplants.plant_id9 rows checked0 orphans
readings
- subgroup_idsubgroups.subgroup_id414,750 rows checked0 orphans
- characteristic_idcharacteristics.characteristic_id414,750 rows checked0 orphans
subgroups
- characteristic_idcharacteristics.characteristic_id82,950 rows checked0 orphans
- part_idparts.part_id82,950 rows checked0 orphans
- machine_idmachines.machine_id82,950 rows checked0 orphans
- line_idproduction_lines.line_id82,950 rows checked0 orphans
- operator_idoperators.operator_id82,950 rows checked0 orphans
- material_lot_idmaterial_lots.lot_id78,215 rows checked0 orphans
- active_cause_idassignable_causes.cause_id4,140 rows checked0 orphans
tool_changes
- machine_idmachines.machine_id13,000 rows checked0 orphans
In the zip
What you get
- CSVs: one file per table, with a header row and ISO dates.
- README.md: what each table holds, how the data behaves (measured), what was checked and what to know.
- ANSWER_KEY.md: what happened at the plant, when, where it shows and the query that finds it.
- INTEGRITY.json: the 101 audit checks and their results.
- RECIPE.json: the Misata blueprint that made these exact rows, seed 20250106.
- kit/: the project kit: the brief, 18 questions, load.sql for DuckDB, check.py, the answer key with its SQL, and the write-up template.
All 29 files
- plants.csv93 B
- production_lines.csv278 B
- machines.csv2 KB
- gauges.csv3 KB
- operators.csv3 KB
- parts.csv3 KB
- characteristics.csv41 KB
- material_lots.csv31 KB
- tool_changes.csv758 KB
- maintenance_events.csv10 KB
- assignable_causes.csv33 KB
- subgroups.csv17.6 MB
- readings.csv23.9 MB
- gauge_calibrations.csv5 KB
- gauge_rr_trials.csv85 KB
- README.md9 KB
- INTEGRITY.json14 KB
- RECIPE.json47 KB
- kit/BRIEF.md2 KB
- kit/QUESTIONS.md4 KB
- kit/README.md1 KB
- kit/WRITEUP_TEMPLATE.md2 KB
- kit/check.py3 KB
- kit/load.sql2 KB
- kit/my_answers.csv100 B
- kit/questions.json5 KB
- kit/solutions/ANSWER_KEY.md10 KB
- kit/solutions/key.json7 KB
- kit/solutions/solutions.sql3 KB
Before you use it
Things to know
- Each characteristic is sampled about three times a day (525 subgroups over the six months) at the machine's own times, not on an exact clock.
- A rule flag is true on every subgroup where its condition holds, not only on the first: eight points on one side flag the eighth, ninth and so on.
design_cpkis what the process was designed for;cpkis what the Phase I data shows.- A subgroup sampled before its part's first lot arrived in the window has no lot id (the lot in use came before the window);
days_since_maintenanceandhours_since_tool_changeare empty before a machine's first event in the window. - Feature balloon numbers rise down the drawing and skip the features that are not charted, as on a real control plan.
- Plants, parts, suppliers and people are invented; no real company, product or person is represented.
Questions
Before you buy
Is this real data?
What do I get?
Can I try it before buying?
How was it checked?
Is there a project to do with it?
Can I use it commercially?
What should I know before using it?
Can I get a bigger or different version?
Want it bigger, in another setting, or with your own columns? Have us build it or make it in Studio.
More premium datasets
All 9Vibration through a life that ends in failure
240 machines at 4 plants, two years
Two years of sensor readings, failures, repairs and costs for 240 machines
Answer key
- failure_mode
- true_life_days
- true_failure_at
- +6 more
- Rows
- 179,004
- Tables
- 6
- Checks
- 68 of 68
Free preview18-question projectProfile and previewQA review of manufacturing batch records, by month
One oral-solids plant, five systems, two years
Two years of a pharmaceutical plant's records, from process order to QP release
Answer key
- root_cause
- batch_disposition_outcome
- conclusion
- +6 more
- Rows
- 661,497
- Tables
- 65
- Checks
- 133 of 133
Free previewProfile and previewCard spending each month, debit and credit
2,500 US households at five banks and seven card issuers, two years
Five banks' raw statement lines, with every label behind them
Answer key
- description
- merchant_name
- category
- +6 more
- Rows
- 7,627,186
- Tables
- 14
- Checks
- 50 of 50
Free previewProfile and preview

