Advertisement
Data Processing

The Class Digit: A Container Code's First Character Measures Nothing (SmartDataAI)

What does the "4" in a 42G1 container code measure? Nothing at all — and that is the fault this piece troubleshoots. The first character of an ISO 634...

What does the "4" in a 42G1 container code measure? Nothing at all — and that is the fault this piece troubleshoots. The first character of an ISO 6346 size code is a length class: 2 stands for a 20-foot box, 3 for 30 feet, 4 for 40 feet and the letter L for 45 feet. It is not a count of feet, not a count of anything; it is the name of a row in the standard's table. When a spreadsheet or a cleaning rule treats the digit as a measurement, the failures are systematic: in a 500-row measurement over a ten-code register, the digits-as-feet reading refused 80 rows outright and filed 20 more onto the wrong container — the one genuinely 45-foot box in the register. This piece works through the failure modes in the order a data team meets them.

What The Class Digit means

The Class Digit is an identifier character that denotes a class in a standard's lookup table while wearing the shape of a quantity, so any process that reads it arithmetically — as a length, a count or a magnitude — manufactures errors that look like data. The nearest prior concept in this series is The Two-Scale Code, "an identifier whose digit string splits into fields measured on different scales" (SmartDataAI, batch 58 of this series). A coin cell's digits repay arithmetic: CR2032 really is 20 millimetres across and 3.2 thick, and the reader's task is to split the string at the right boundary on the right scales. A container code's digits repay nothing. Split "42" however you like — at the boundary, evenly, as a single number — and no split yields 40 feet, because the 40 lives in the standard's table, not in the digit. The second character is the same kind of sign: 2 denotes the 8 ft 6 in height class and 5 the 9 ft 6 in class. Both characters are keys; neither is a measurement.

The register: ten size-and-type codes

The register holds ten ISO size-and-type codes with their dimensions and types: 22G1 (20 ft, 8 ft 6 in, general), 22R1 (20 ft, 8 ft 6 in, refrigerated), 25G1 (20 ft, 9 ft 6 in, general), 25U1 (20 ft, 9 ft 6 in, open-top), 32G1 (30 ft, 8 ft 6 in, general), 42G1 (40 ft, 8 ft 6 in, general), 42U1 (40 ft, 8 ft 6 in, open-top), 45G1 (40 ft, 9 ft 6 in, general), 45R1 (40 ft, 9 ft 6 in, refrigerated) and L5G1 (45 ft, 9 ft 6 in, general). Five written forms of each code were measured ten times each: the full code, the two-character size code alone, the size code read as feet, the common name in words, and the type code alone.

The Class Digit: A Container Code's First Character Measures Nothing (SmartDataAI)

Fault one: the spreadsheet that reads digits as feet

Symptom: after a feed is normalised, most container rows vanish and a few land on an implausible box. Cause: the size code's digits were taken as a length in feet. The outcomes in the measurement: "22", "25", "32" and "42" match no length in the register — there is no 22-, 25-, 32- or 42-foot container — so 80 rows are refused. Worse is the fifth case: "45" does match a length, the register's one 45-foot box, L5G1. So the 20 rows belonging to 45G1 and 45R1 — 40-foot high-cube boxes — file onto the 45-foot L5G1, silently, as merges onto a real but wrong item. And L5G1's own rows are refused under this form, because "L5" begins with a letter and yields no digits to read. The reading that looks most like data — a number with a unit — is the only form in the set that both refuses the majority and corrupts the rest.

Fault two: the size code kept, the type code dropped

Symptom: rows survive cleaning but refrigerated and open-top boxes keep arriving as general-purpose. Cause: the record kept the two-character size code and dropped the type code. Size alone merged 80 rows: "22" names both 22G1 and its refrigerated twin 22R1; "25" names a general and an open-top; "42" and "45" behave the same way. Only two size codes resolved exactly — "32", because the register holds one 30-foot box, and "L5", because it holds one 45-foot box. The common name in words ("40 ft, 9 ft 6 in") reproduces the identical pattern — 80 merged, 20 exact — because words and digits carry the same information here: length and height, no type. Translating a code into plain language feels like enrichment and changes nothing about what the record can distinguish.

Fault three: the type code kept, the size dropped

Symptom: a catalogue groups beautifully by equipment type and cannot answer any question about size. Cause: the type code travelled alone. It merged all 100 of its rows: "G1" by itself names six of the register's ten codes, "R1" names two and "U1" names two. The type code is a property of the box — what it is fitted for — and like every bare property in this series, it identifies nothing. The full code, holding size and type together, resolved all 100 rows exactly; it is the only form that did.

Worked example: one booking feed, three faults

A booking feed arrives with three rows: "45R1", "45" and "R1". Round-tripped through the register: "45R1" resolves exactly — the 40-foot, 9 ft 6 in refrigerated box. "45" merges two ways, 45G1 and 45R1: the size is certain, the type is gone, and the difference between the two candidates is a refrigeration unit — the merge must be flagged, not resolved by preference. "R1" merges two ways as well, 22R1 and 45R1, and now the uncertainty is size: a 20-foot refrigerated box or a 40-foot one. Had the feed instead carried the size code's digits into a length column, "45" would have been read as 45 feet and filed onto L5G1 — the one outcome worse than an honest merge, because it arrives dressed as an exact match. The troubleshooting order follows from the three faults: check first whether any length column was derived from the code's digits, then whether type and size both survived, and only then argue about matching rules.

How the register was measured

The ten codes with their lengths, heights and types form the register stated above; the five written forms were generated from it and resolved by the parsers published in this batch's evidence, with the harness output (500 rows: 140 exact, 280 merged, 80 refused) reproduced byte for byte on re-running. Every fate quoted in this piece — including the digits-as-feet merges onto L5G1 and the refusal of "L5" — is a probe record in the results file, round-tripped before writing.

FAQ

What does the first character of an ISO container size code mean? A length class from the standard's table: 2 for 20 ft, 3 for 30 ft, 4 for 40 ft and L for 45 ft. It measures nothing and cannot be converted arithmetically; it must be looked up.

Why did reading the size code as feet corrupt data instead of just failing? Because one value accidentally matched: "45" is a real length in the register (the L5G1 box), so 40-foot boxes coded 45G1 and 45R1 filed onto the 45-foot box as plausible merges, while the other values were refused.

Is the common name ("40 ft high cube" style) safer than the code? It carries the same information as the size code — length and height, no type — and produced the same fates: 80 merged, 20 exact. Plain language is not the same as complete information.

Which single form identifies a container? Only the full size-and-type code: 100 of 100 rows exact. Size alone, type alone and the common name all merge; the digits-as-feet reading refuses or corrupts.

The red line

Never derive a dimension from a container code's digits: the moment a length column is computed from "42" instead of looked up from the standard's table, the dataset gains a 42-foot container that does not exist and loses the 40-foot one that does.

Know someone who needs this? Share it.

Advertisement