Source data

Third-party files used to develop and test codesystem. They are not committed (data/raw/ is ignored): fetch them again from the URLs below and check the sizes and SHA-256 prefixes. Check each publisher’s terms before redistributing anything.

File Publisher URL Fetched Size SHA-256 (first 16)
ISCO-08_EN.csv ILO https://www.ilo.org/ilostat-files/ISCO/newdocs-08-2021/ISCO-08/ISCO-08%20EN.csv (redirects to webapps.ilo.org) 2026-10-10 224,299 9afc6377d6ed6738
ISIC_Rev_4_english_structure.Txt UN Statistics Division https://unstats.un.org/unsd/classifications/Econ/Download/In%20Text/ISIC_Rev_4_english_structure.Txt 2026-10-10 40,195 18b645efc5a0b001

Also available from the IDM database (schemas "@SIC", "@GSS", "@NOMIS", "@FSQ", "@FHRS", "@TRAVEL", "@TRADE"); see the notes below.

What the files turned out to contain

ISIC Rev.4 (Code, Description; UTF-8): 766 rows = 21 sections (A-U), 88 divisions, 238 groups, 419 classes, which is the published structure. Divisions, groups and classes form a strict prefix hierarchy (every 3- and 4-digit code has its one-digit-shorter parent in the file). A division code is not prefixed by its section letter: the section of a division comes from the section’s own row order, so a section is a grouping of divisions, not a prefix.

ISCO (ISCO_version, major, major_label, sub_major, sub_major_label, minor, minor_label, unit, description; Windows-1252, not UTF-8 – byte 0x92 is an apostrophe): one wide row per unit group, but four versions in one file (ISCO-08: 436 rows, ISCO-88: 390, ISCO-68: 285, ISCO-58: 202), so a loader must filter on ISCO_version. ISCO-08 is exactly the published 10 / 43 / 130 / 436. Leading zeros are lost for the Armed Forces group: major 0 has sub-major 1 (should be 01), minor 11 (011), unit 110 (0110). Without repair 3 of 436 unit groups do not have their parent as a prefix. A code is a string whose width belongs to its level, never a number.

UK SIC 2007, UK SIC 2003 and the ONS crosswalk (from the IDM database, “@SIC” schema)

Extracted on 2026-10-11 from a scratch clone of the production database by tools/export_uk_sic.sql; loaded by tools/load_uk_sic.sql (uk_sic_2007: 21 sections, 88 divisions, 272 groups, 615 classes, 728 subclasses; uk_sic_2003: 699 five-digit codes, no hierarchy; 1,299 crosswalk pairs).

Findings, all handled loudly in the export script rather than silently: * The ONS list has no row for division 16, nor for the 4-digit classes (only padded 5-digit forms, which for a subdivided class are not codes). The hierarchy is rebuilt from the 5-digit rows' own section/division/group/class columns. * Two mistyped codes in the list: 45119 should be 45112 and 82922 should be 82912 (the list’s own class column, the ONS equivalence table, and the UK datahub file all agree). Found by the extension’s own validator (82922 is not under class 8291’s prefix). * The equivalence table has trailing spaces in a few codes; trimmed. * The extension’s own refines check found the stray class 7499 when uk_sic_2007 was first defined against NACE. * Cross-check: data/raw/uk-sic-2007-condensed.csv (UK datahub, 731 five-digit codes, leading zeros dropped) contains every one of our 729 subclasses and two more, 98000 and 99999, which are Companies House pseudo-codes and not part of the classification. Its titles are the short Companies House forms (“Raising of swine/pigs”); the ONS list has “swinepigs”. * 74990 “Non-trading company” (class 7499) is left out of uk_sic_2007: it is not in NACE Rev.2 or the ONS equivalence table.

NACE Rev.2 (Eurostat RAMON)

data/raw/NACERev.2_EN_CTI_20070214_131821_utf8.csv (sha256 b5a29f22119c856c…), supplied by John among a set of RAMON files (*_COT_* has the explanatory notes, *_DE_* German, OGDEXT_KLASSDB_NACERev2_1.zip an Austrian OGD extract: not used). ;-separated, German header. 21 sections, 88 divisions, 272 groups, 615 classes, loaded by tools/prepare_nace.py. Its sections and divisions are exactly ISIC Rev.4’s (same sets, same section for every division), so nace_rev2 is loaded with refines => 'isic_rev4', shared_levels => 2, and checked by the extension itself at definition. UK SIC 2007 repeats all 996 NACE codes exactly once 74990 “Non-trading company” (class 7499, a Companies House code) is left out, so uk_sic_2007 is loaded with refines => 'nace_rev2': a three-system chain on real data, ISIC > NACE > UK SIC.

UK SOC 2020 and the ONS Extended SOC (Version 7, 27 August 2026)

data/raw/Extended_SOC_framework.csv (supplied by John, from the ONS download extendedsoc2020structureanddescriptionszip20260827.zip, which also has Extended_SOC_descriptions.csv – long descriptions per group, not loaded – and an information sheet). Loaded by tools/prepare_soc.py and tools/load_soc.sql as two systems: uk_soc_2020 (the standard: 9 major, 26 sub-major, 104 minor and 412 unit groups, exactly the published counts) and uk_soc_2020_extended (adds 1,384 sub-unit groups, codes like 1111/01, and refines => 'uk_soc_2020', which the extension checks). Every unit group has sub-unit groups, and no defect was found in the file. Not loaded: a SOC 2020 to ISCO-08 correspondence, which the ONS publishes separately.

ONS SOC 2010 to ISCO-08 correspondence

data/raw/ug201002soc2010toisco08v2_tcm77-283163.xls (supplied by John, 2.8 MB; ONS User Guide 2010: 02.1). This is SOC 2010, not SOC 2020 – there is no SOC 2020 to ISCO-08 file here yet. The workbook was exported to CSV with Numbers (one CSV per sheet, in data/raw/soc2010_isco08/) and read by tools/prepare_soc2010.py; tools/load_soc2010.sql loads it. * 369 SOC 2010 unit groups (a flat system uk_soc_2010: the file has no higher levels) and 385 pairs onto 291 ISCO-08 unit groups. The 50/50 and 40/60 split percentages are not kept. * A check that did not depend on our own code: the file’s “Unmapped ISCO08” sheet lists 145 ISCO-08 unit groups; 291 + 145 = 436, the number of ISCO-08 unit groups, with no overlap, and the extension’s own unmapped count for the loaded crosswalk is the same 145.

SOC 2020 to ISCO-08 (derived from the ONS SOC 2020 coding index)

Downloaded 2026-10-11 by Claude, at John’s instruction, from the ONS page “SOC 2020 volume 2: the coding index” (link “Excel”, version 14, dated 27 August 2026): data/raw/soc2020volume2thecodingindexexcel20260827v2.xlsx, 3.7 MB. The ONS page “Classifying SOC 2020 to ISCO-08” says there is no simple unit-group mapping for SOC 2020 (job titles split across several ISCO-08 groups); the ONS dual-coded every title of the index to both, and refers users to the SOC 2010 table (above) for a unit-group one. So the crosswalks loaded by tools/load_soc2020_isco.sql are derived: a pair means at least one of the 32,670 indexed job titles is coded to both groups. Nothing is said of how many titles or people a pair covers. * 1,899 unit-group pairs (all 412 SOC 2020 unit groups mapped; 425 of 436 ISCO-08 unit groups reached) and 3,076 sub-unit pairs. * Skipped: 231 “see …” cross-reference entries (the placeholder }}}} in every column) and 4 records without an ISCO-08 code (3 of unit group 8160, 1 of 4131/06). * Needs openpyxl to read the workbook; the other loaders need only the standard library.